From 35be56e3d80d245c44e747bd21ba06def1f6f730 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 22 Jul 2026 09:34:24 +0000 Subject: [PATCH] Configurations: 'specification/compute/resource-manager/Microsoft.Compute/Bulkactions/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: '73e39fb58efdac318be1f603997bb57ec9831408' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6600595 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 4 + .../_metadata.json | 6 +- .../azure-mgmt-compute-bulkaction/api.md | 6719 +++++++++++- .../api.metadata.yml | 4 +- .../apiview-properties.json | 296 +- .../azure/mgmt/compute/bulkaction/_client.py | 61 +- .../mgmt/compute/bulkaction/_configuration.py | 9 +- .../mgmt/compute/bulkaction/_validation.py | 66 + .../azure/mgmt/compute/bulkaction/_version.py | 2 +- .../mgmt/compute/bulkaction/aio/_client.py | 62 +- .../compute/bulkaction/aio/_configuration.py | 9 +- .../bulkaction/aio/operations/__init__.py | 14 + .../bulkaction/aio/operations/_operations.py | 7058 +++++++++++- .../compute/bulkaction/models/__init__.py | 416 + .../mgmt/compute/bulkaction/models/_enums.py | 867 ++ .../mgmt/compute/bulkaction/models/_models.py | 8574 ++++++++++++++- .../compute/bulkaction/operations/__init__.py | 14 + .../bulkaction/operations/_operations.py | 9450 +++++++++++++++-- .../azure/mgmt/compute/bulkaction/types.py | 3723 ++++++- ...lk_create_custom_cancel_maximum_set_gen.py | 42 + ...custom_create_or_update_maximum_set_gen.py | 148 + ...lk_create_custom_delete_maximum_set_gen.py | 42 + ..._async_operation_status_maximum_set_gen.py | 42 + .../bulk_create_custom_get_maximum_set_gen.py | 43 + ..._list_by_resource_group_maximum_set_gen.py | 43 + ...om_list_by_subscription_maximum_set_gen.py | 42 + ...tances_operation_cancel_maximum_set_gen.py | 42 + ...ration_create_or_update_maximum_set_gen.py | 402 + ...tances_operation_delete_maximum_set_gen.py | 42 + ...instances_operation_get_maximum_set_gen.py | 43 + ...on_get_operation_status_maximum_set_gen.py | 42 + ..._list_by_resource_group_maximum_set_gen.py | 43 + ..._list_by_resource_group_minimum_set_gen.py | 43 + ...on_list_by_subscription_maximum_set_gen.py | 42 + ...on_list_by_subscription_minimum_set_gen.py | 42 + ...n_list_virtual_machines_maximum_set_gen.py | 44 + ..._list_occurrence_by_vms_maximum_set_gen.py | 43 + .../occurrences_cancel_maximum_set_gen.py | 49 + .../occurrences_delay_maximum_set_gen.py | 50 + .../occurrences_get_maximum_set_gen.py | 43 + ...ist_by_scheduled_action_maximum_set_gen.py | 43 + ...urrences_list_resources_maximum_set_gen.py | 44 + .../operations_list_maximum_set_gen.py | 2 +- .../operations_list_minimum_set_gen.py | 2 +- ...n_extension_list_by_vms_maximum_set_gen.py | 43 + ...on_operation_status_get_maximum_set_gen.py | 42 + ...ctions_attach_resources_maximum_set_gen.py | 53 + ..._cancel_next_occurrence_maximum_set_gen.py | 48 + ...ctions_create_or_update_maximum_set_gen.py | 68 + ...cheduled_actions_delete_maximum_set_gen.py | 41 + ...ctions_detach_resources_maximum_set_gen.py | 48 + ...heduled_actions_disable_maximum_set_gen.py | 41 + ...cheduled_actions_enable_maximum_set_gen.py | 41 + .../scheduled_actions_get_maximum_set_gen.py | 42 + ..._list_by_resource_group_maximum_set_gen.py | 42 + ...ns_list_by_subscription_maximum_set_gen.py | 40 + ..._actions_list_resources_maximum_set_gen.py | 43 + ...actions_patch_resources_maximum_set_gen.py | 53 + ...igger_manual_occurrence_maximum_set_gen.py | 42 + ...cheduled_actions_update_maximum_set_gen.py | 66 + ...wledge_operation_errors_maximum_set_gen.py | 43 + ...wledge_operation_errors_minimum_set_gen.py | 43 + ..._operations_bulk_cancel_maximum_set_gen.py | 8 +- ..._operations_bulk_cancel_minimum_set_gen.py | 8 +- ..._operations_bulk_create_maximum_set_gen.py | 633 ++ ..._operations_bulk_create_minimum_set_gen.py | 43 + ...rations_bulk_deallocate_maximum_set_gen.py | 8 +- ...rations_bulk_deallocate_minimum_set_gen.py | 2 +- ..._operations_bulk_delete_maximum_set_gen.py | 8 +- ..._operations_bulk_delete_minimum_set_gen.py | 2 +- ...k_get_operations_status_maximum_set_gen.py | 8 +- ...k_get_operations_status_minimum_set_gen.py | 8 +- ...erations_bulk_hibernate_maximum_set_gen.py | 17 +- ...erations_bulk_hibernate_minimum_set_gen.py | 2 +- ...k_list_operation_errors_maximum_set_gen.py | 43 + ...k_list_operation_errors_minimum_set_gen.py | 43 + ...operations_bulk_reimage_maximum_set_gen.py | 73 + ...k_operations_bulk_start_maximum_set_gen.py | 17 +- ...k_operations_bulk_start_minimum_set_gen.py | 2 +- ...ns_bulk_vdi_flex_create_maximum_set_gen.py | 648 ++ ...ns_bulk_vdi_flex_create_minimum_set_gen.py | 53 + ...ions_mgmt_bulk_create_custom_operations.py | 983 ++ ...gmt_bulk_create_custom_operations_async.py | 1023 ++ ...nch_bulk_instances_operation_operations.py | 436 + ...lk_instances_operation_operations_async.py | 455 + ...ns_mgmt_occurrence_extension_operations.py | 29 + ...t_occurrence_extension_operations_async.py | 30 + ...ulk_actions_mgmt_occurrences_operations.py | 80 + ...tions_mgmt_occurrences_operations_async.py | 85 + ...t_scheduled_action_extension_operations.py | 29 + ...duled_action_extension_operations_async.py | 30 + ...uled_action_operation_status_operations.py | 30 + ...ction_operation_status_operations_async.py | 31 + ...tions_mgmt_scheduled_actions_operations.py | 254 + ...mgmt_scheduled_actions_operations_async.py | 273 + ...tual_machine_bulk_operations_operations.py | 145 +- ...achine_bulk_operations_operations_async.py | 145 +- .../tsp-location.yaml | 2 +- 98 files changed, 43550 insertions(+), 1792 deletions(-) create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_validation.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_cancel_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_create_or_update_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_delete_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_async_operation_status_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_resource_group_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_subscription_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_cancel_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_create_or_update_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_delete_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_operation_status_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_minimum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_minimum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_virtual_machines_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_cancel_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_delay_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_get_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_resources_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_extension_list_by_vms_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_operation_status_get_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_delete_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_disable_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_enable_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_get_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_update_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_minimum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_minimum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_minimum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_reimage_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_maximum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_minimum_set_gen.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations_async.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations_async.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations_async.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations_async.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations_async.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations_async.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations.py create mode 100644 sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations_async.py diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/CHANGELOG.md b/sdk/compute/azure-mgmt-compute-bulkaction/CHANGELOG.md index 6ac8406a831d..fab566144bcc 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/CHANGELOG.md +++ b/sdk/compute/azure-mgmt-compute-bulkaction/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.0.0b2 (2026-07-22) + +tool can't generate changelog for this release, please update manually. + ## 1.0.0b1 (2026-07-17) ### Other Changes diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/_metadata.json b/sdk/compute/azure-mgmt-compute-bulkaction/_metadata.json index 53241e8c5aeb..469a0a053bc2 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/_metadata.json +++ b/sdk/compute/azure-mgmt-compute-bulkaction/_metadata.json @@ -1,9 +1,9 @@ { - "apiVersion": "2026-06-06", + "apiVersion": "2026-07-06-preview", "apiVersions": { - "Microsoft.Compute": "2026-06-06" + "Microsoft.Compute": "2026-07-06-preview" }, - "commit": "33edaba41251144ab48a9ba923a61697f81b1aa8", + "commit": "73e39fb58efdac318be1f603997bb57ec9831408", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/compute/resource-manager/Microsoft.Compute/Bulkactions", "emitterVersion": "0.63.3", diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/api.md b/sdk/compute/azure-mgmt-compute-bulkaction/api.md index 282d07ad9eb2..e0dfc40975da 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/api.md +++ b/sdk/compute/azure-mgmt-compute-bulkaction/api.md @@ -2,7 +2,14 @@ namespace azure.mgmt.compute.bulkaction class azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient: implements ContextManager + bulk_create_custom: BulkCreateCustomOperations + launch_bulk_instances_operation: LaunchBulkInstancesOperationOperations + occurrence_extension: OccurrenceExtensionOperations + occurrences: OccurrencesOperations operations: Operations + scheduled_action_extension: ScheduledActionExtensionOperations + scheduled_action_operation_status: ScheduledActionOperationStatusOperations + scheduled_actions: ScheduledActionsOperations virtual_machine_bulk_operations: VirtualMachineBulkOperationsOperations def __init__( @@ -13,6 +20,7 @@ namespace azure.mgmt.compute.bulkaction *, api_version: str = ..., cloud_setting: Optional[AzureClouds] = ..., + polling_interval: Optional[int] = ..., **kwargs: Any ) -> None: ... @@ -30,7 +38,14 @@ namespace azure.mgmt.compute.bulkaction namespace azure.mgmt.compute.bulkaction.aio class azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient: implements AsyncContextManager + bulk_create_custom: BulkCreateCustomOperations + launch_bulk_instances_operation: LaunchBulkInstancesOperationOperations + occurrence_extension: OccurrenceExtensionOperations + occurrences: OccurrencesOperations operations: Operations + scheduled_action_extension: ScheduledActionExtensionOperations + scheduled_action_operation_status: ScheduledActionOperationStatusOperations + scheduled_actions: ScheduledActionsOperations virtual_machine_bulk_operations: VirtualMachineBulkOperationsOperations def __init__( @@ -41,6 +56,7 @@ namespace azure.mgmt.compute.bulkaction.aio *, api_version: str = ..., cloud_setting: Optional[AzureClouds] = ..., + polling_interval: Optional[int] = ..., **kwargs: Any ) -> None: ... @@ -57,7 +73,7 @@ namespace azure.mgmt.compute.bulkaction.aio namespace azure.mgmt.compute.bulkaction.aio.operations - class azure.mgmt.compute.bulkaction.aio.operations.Operations: + class azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations: def __init__( self, @@ -65,649 +81,5216 @@ namespace azure.mgmt.compute.bulkaction.aio.operations **kwargs ) -> None: ... - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged[Operation]: ... - - - class azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations: - - def __init__( + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name']}, api_versions_list=['2026-07-06-preview']) + async def begin_cancel( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + location: str, + name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... @overload - async def bulk_cancel_operations( + async def begin_create_or_update( self, resource_group_name: str, location: str, - request_body: CancelOperationsContent, + name: str, + resource: LocationBasedBulkCreateCustom, *, content_type: str = "application/json", **kwargs: Any - ) -> CancelOperationsResponse: ... + ) -> AsyncLROPoller[LocationBasedBulkCreateCustom]: ... @overload - async def bulk_cancel_operations( + async def begin_create_or_update( self, resource_group_name: str, location: str, - request_body: CancelOperationsContent, + name: str, + resource: LocationBasedBulkCreateCustom, *, content_type: str = "application/json", **kwargs: Any - ) -> CancelOperationsResponse: ... + ) -> AsyncLROPoller[LocationBasedBulkCreateCustom]: ... @overload - async def bulk_cancel_operations( + async def begin_create_or_update( self, resource_group_name: str, location: str, - request_body: IO[bytes], + name: str, + resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> CancelOperationsResponse: ... + ) -> AsyncLROPoller[LocationBasedBulkCreateCustom]: ... - @overload - async def bulk_deallocate_operation( + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'delete_instances']}, api_versions_list=['2026-07-06-preview']) + async def begin_delete( self, resource_group_name: str, location: str, - request_body: ExecuteDeallocateContent, + name: str, *, - content_type: str = "application/json", + delete_instances: Optional[bool] = ..., **kwargs: Any - ) -> DeallocateResourceOperationResponse: ... + ) -> AsyncLROPoller[None]: ... - @overload - async def bulk_deallocate_operation( + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def get( self, resource_group_name: str, location: str, - request_body: ExecuteDeallocateContent, - *, - content_type: str = "application/json", + name: str, **kwargs: Any - ) -> DeallocateResourceOperationResponse: ... + ) -> LocationBasedBulkCreateCustom: ... - @overload - async def bulk_deallocate_operation( + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'async_operation_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def get_async_operation_status( + self, + location: str, + async_operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_resource_group( self, resource_group_name: str, location: str, - request_body: IO[bytes], - *, - content_type: str = "application/json", **kwargs: Any - ) -> DeallocateResourceOperationResponse: ... + ) -> AsyncItemPaged[LocationBasedBulkCreateCustom]: ... - @overload - async def bulk_delete_operation( + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_subscription( + self, + location: str, + **kwargs: Any + ) -> AsyncItemPaged[LocationBasedBulkCreateCustom]: ... + + + class azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name']}, api_versions_list=['2026-07-06-preview']) + async def begin_cancel( self, resource_group_name: str, location: str, - request_body: ExecuteDeleteContent, - *, - content_type: str = "application/json", + name: str, **kwargs: Any - ) -> DeleteResourceOperationResponse: ... + ) -> AsyncLROPoller[None]: ... @overload - async def bulk_delete_operation( + async def begin_create_or_update( self, resource_group_name: str, location: str, - request_body: ExecuteDeleteContent, + name: str, + resource: LocationBasedLaunchBulkInstancesOperation, *, content_type: str = "application/json", **kwargs: Any - ) -> DeleteResourceOperationResponse: ... + ) -> AsyncLROPoller[LocationBasedLaunchBulkInstancesOperation]: ... @overload - async def bulk_delete_operation( + async def begin_create_or_update( self, resource_group_name: str, location: str, - request_body: IO[bytes], + name: str, + resource: LocationBasedLaunchBulkInstancesOperation, *, content_type: str = "application/json", **kwargs: Any - ) -> DeleteResourceOperationResponse: ... + ) -> AsyncLROPoller[LocationBasedLaunchBulkInstancesOperation]: ... @overload - async def bulk_get_operations_status( + async def begin_create_or_update( self, resource_group_name: str, location: str, - request_body: GetOperationStatusContent, + name: str, + resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> GetOperationStatusResponse: ... + ) -> AsyncLROPoller[LocationBasedLaunchBulkInstancesOperation]: ... - @overload - async def bulk_get_operations_status( + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'delete_instances']}, api_versions_list=['2026-07-06-preview']) + async def begin_delete( self, resource_group_name: str, location: str, - request_body: GetOperationStatusContent, + name: str, *, - content_type: str = "application/json", + delete_instances: Optional[bool] = ..., **kwargs: Any - ) -> GetOperationStatusResponse: ... + ) -> AsyncLROPoller[None]: ... - @overload - async def bulk_get_operations_status( + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def get( self, resource_group_name: str, location: str, - request_body: IO[bytes], + name: str, + **kwargs: Any + ) -> LocationBasedLaunchBulkInstancesOperation: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'async_operation_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def get_operation_status( + self, + location: str, + async_operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_resource_group( + self, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> AsyncItemPaged[LocationBasedLaunchBulkInstancesOperation]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_subscription( + self, + location: str, + **kwargs: Any + ) -> AsyncItemPaged[LocationBasedLaunchBulkInstancesOperation]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'filter', 'skiptoken', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_virtual_machines( + self, + resource_group_name: str, + location: str, + name: str, *, - content_type: str = "application/json", + filter: Optional[str] = ..., + skiptoken: Optional[str] = ..., **kwargs: Any - ) -> GetOperationStatusResponse: ... + ) -> AsyncItemPaged[VirtualMachine]: ... + + + class azure.mgmt.compute.bulkaction.aio.operations.OccurrenceExtensionOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'resource_uri', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_occurrence_by_vms( + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncItemPaged[OccurrenceExtensionResource]: ... + + + class azure.mgmt.compute.bulkaction.aio.operations.OccurrencesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... @overload - async def bulk_hibernate_operation( + async def begin_cancel( self, resource_group_name: str, - location: str, - request_body: ExecuteHibernateContent, + scheduled_action_name: str, + occurrence_id: str, + body: CancelOccurrenceRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> HibernateResourceOperationResponse: ... + ) -> AsyncLROPoller[ResourceOperationResponse]: ... @overload - async def bulk_hibernate_operation( + async def begin_cancel( self, resource_group_name: str, - location: str, - request_body: ExecuteHibernateContent, + scheduled_action_name: str, + occurrence_id: str, + body: CancelOccurrenceRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> HibernateResourceOperationResponse: ... + ) -> AsyncLROPoller[ResourceOperationResponse]: ... @overload - async def bulk_hibernate_operation( + async def begin_cancel( self, resource_group_name: str, - location: str, - request_body: IO[bytes], + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> HibernateResourceOperationResponse: ... + ) -> AsyncLROPoller[ResourceOperationResponse]: ... @overload - async def bulk_start_operation( + async def begin_delay( self, resource_group_name: str, - location: str, - request_body: ExecuteStartContent, + scheduled_action_name: str, + occurrence_id: str, + body: DelayRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> StartResourceOperationResponse: ... + ) -> AsyncLROPoller[ResourceOperationResponse]: ... @overload - async def bulk_start_operation( + async def begin_delay( self, resource_group_name: str, - location: str, - request_body: ExecuteStartContent, + scheduled_action_name: str, + occurrence_id: str, + body: DelayRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> StartResourceOperationResponse: ... + ) -> AsyncLROPoller[ResourceOperationResponse]: ... @overload - async def bulk_start_operation( + async def begin_delay( self, resource_group_name: str, - location: str, - request_body: IO[bytes], + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> StartResourceOperationResponse: ... + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'occurrence_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def get( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + **kwargs: Any + ) -> Occurrence: ... -namespace azure.mgmt.compute.bulkaction.models + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_scheduled_action( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> AsyncItemPaged[Occurrence]: ... - class azure.mgmt.compute.bulkaction.models.ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - INTERNAL = "Internal" + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'occurrence_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + **kwargs: Any + ) -> AsyncItemPaged[OccurrenceResource]: ... - class azure.mgmt.compute.bulkaction.models.CancelOperationsContent(_Model): - operation_ids: list[str] + class azure.mgmt.compute.bulkaction.aio.operations.Operations: - @overload def __init__( self, - *, - operation_ids: list[str] + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[Operation]: ... - class azure.mgmt.compute.bulkaction.models.CancelOperationsResponse(_Model): - results: list[ResourceOperation] + class azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionExtensionOperations: - @overload def __init__( self, - *, - results: list[ResourceOperation] + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.DeadlineType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - COMPLETE_BY = "CompleteBy" - INITIATE_AT = "InitiateAt" - UNKNOWN = "Unknown" + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'resource_uri', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_vms( + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncItemPaged[ScheduledActionResources]: ... - class azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse(_Model): - description: str - location: str - results: Optional[list[ResourceOperation]] - type: str + class azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionOperationStatusOperations: - @overload def __init__( self, - *, - description: str, - location: str, - results: Optional[list[ResourceOperation]] = ..., - type: str + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'operation_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def get( + self, + location: str, + operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... - class azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse(_Model): - description: str - location: str - results: Optional[list[ResourceOperation]] - type: str + class azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations: - @overload def __init__( self, - *, - description: str, - location: str, - results: Optional[list[ResourceOperation]] = ..., - type: str + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.ErrorAdditionalInfo(_Model): - info: Optional[Any] - type: Optional[str] - - - class azure.mgmt.compute.bulkaction.models.ErrorDetail(_Model): - additional_info: Optional[list[ErrorAdditionalInfo]] - code: Optional[str] - details: Optional[list[ErrorDetail]] - message: Optional[str] - target: Optional[str] - - - class azure.mgmt.compute.bulkaction.models.ErrorResponse(_Model): - error: Optional[ErrorDetail] + async def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceAttachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... @overload - def __init__( + async def begin_attach_resources( self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceAttachRequest, *, - error: Optional[ErrorDetail] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - + async def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + + @overload + async def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + + @overload + async def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + + @overload + async def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: ScheduledAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ScheduledAction]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: ScheduledAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ScheduledAction]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ScheduledAction]: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name']}, api_versions_list=['2026-07-06-preview']) + async def begin_delete( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceDetachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + + @overload + async def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceDetachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + + @overload + async def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceOperationResponse]: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name']}, api_versions_list=['2026-07-06-preview']) + async def begin_disable( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name']}, api_versions_list=['2026-07-06-preview']) + async def begin_enable( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def begin_trigger_manual_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> AsyncLROPoller[Occurrence]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: ScheduledActionUpdate, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: ScheduledActionUpdate, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + async def get( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> ScheduledAction: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncItemPaged[ScheduledAction]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged[ScheduledAction]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> AsyncItemPaged[ScheduledActionResource]: ... + + @overload + async def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourcePatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceOperationResponse: ... + + @overload + async def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourcePatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceOperationResponse: ... + + @overload + async def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceOperationResponse: ... + + + class azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AcknowledgeBulkOperationErrorsResponse: ... + + @overload + async def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AcknowledgeBulkOperationErrorsResponse: ... + + @overload + async def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AcknowledgeBulkOperationErrorsResponse: ... + + @overload + async def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: CancelOperationsContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CancelOperationsResponse: ... + + @overload + async def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: CancelOperationsContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CancelOperationsResponse: ... + + @overload + async def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CancelOperationsResponse: ... + + @overload + async def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteCreateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + async def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteCreateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + async def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + async def bulk_deallocate_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteDeallocateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DeallocateResourceOperationResponse: ... + + @overload + async def bulk_deallocate_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteDeallocateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DeallocateResourceOperationResponse: ... + + @overload + async def bulk_deallocate_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DeallocateResourceOperationResponse: ... + + @overload + async def bulk_delete_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteDeleteContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DeleteResourceOperationResponse: ... + + @overload + async def bulk_delete_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteDeleteContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DeleteResourceOperationResponse: ... + + @overload + async def bulk_delete_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DeleteResourceOperationResponse: ... + + @overload + async def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: GetOperationStatusContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> GetOperationStatusResponse: ... + + @overload + async def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: GetOperationStatusContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> GetOperationStatusResponse: ... + + @overload + async def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> GetOperationStatusResponse: ... + + @overload + async def bulk_hibernate_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteHibernateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> HibernateResourceOperationResponse: ... + + @overload + async def bulk_hibernate_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteHibernateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> HibernateResourceOperationResponse: ... + + @overload + async def bulk_hibernate_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> HibernateResourceOperationResponse: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'lookback_in_minutes', 'accept']}, api_versions_list=['2026-07-06-preview']) + def bulk_list_operation_errors( + self, + resource_group_name: str, + location: str, + *, + lookback_in_minutes: Optional[int] = ..., + **kwargs: Any + ) -> AsyncItemPaged[ResourceOperation]: ... + + @overload + async def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ReimageResourceOperationResponse: ... + + @overload + async def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ReimageResourceOperationResponse: ... + + @overload + async def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ReimageResourceOperationResponse: ... + + @overload + async def bulk_start_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteStartContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> StartResourceOperationResponse: ... + + @overload + async def bulk_start_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteStartContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> StartResourceOperationResponse: ... + + @overload + async def bulk_start_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> StartResourceOperationResponse: ... + + @overload + async def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteVdiCreateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + async def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteVdiCreateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + async def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + +namespace azure.mgmt.compute.bulkaction.models + + class azure.mgmt.compute.bulkaction.models.AcceleratorManufacturer(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AMD = "AMD" + NVIDIA = "Nvidia" + XILINX = "Xilinx" + + + class azure.mgmt.compute.bulkaction.models.AcceleratorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FPGA = "FPGA" + GPU = "GPU" + + + class azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsRequest(_Model): + operation_ids: list[str] + + @overload + def __init__( + self, + *, + operation_ids: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse(_Model): + acknowledged: list[str] + not_found: list[str] + skipped: list[str] + + @overload + def __init__( + self, + *, + acknowledged: list[str], + not_found: list[str], + skipped: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INTERNAL = "Internal" + + + class azure.mgmt.compute.bulkaction.models.AdditionalCapabilities(_Model): + hibernation_enabled: Optional[bool] + ultra_ssd_enabled: Optional[bool] + + @overload + def __init__( + self, + *, + hibernation_enabled: Optional[bool] = ..., + ultra_ssd_enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.AdditionalUnattendContent(_Model): + component_name: Optional[Literal["Microsoft-Windows-Shell-Setup"]] + content: Optional[str] + pass_name: Optional[Literal["OobeSystem"]] + setting_name: Optional[Union[str, SettingNames]] + + @overload + def __init__( + self, + *, + component_name: Optional[Literal[Microsoft-Windows-Shell-Setup]] = ..., + content: Optional[str] = ..., + pass_name: Optional[Literal[OobeSystem]] = ..., + setting_name: Optional[Union[str, SettingNames]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.AllInstancesDown(_Model): + all_instances_down_automatically_approve: Optional[bool] + + @overload + def __init__( + self, + *, + all_instances_down_automatically_approve: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.AllocationStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CAPACITY_OPTIMIZED = "CapacityOptimized" + LOWEST_PRICE = "LowestPrice" + PRIORITIZED = "Prioritized" + + + class azure.mgmt.compute.bulkaction.models.ApiEntityReference(_Model): + id: Optional[str] + + @overload + def __init__( + self, + *, + id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ApiError(_Model): + code: Optional[str] + details: Optional[list[ApiErrorBase]] + innererror: Optional[BulkInstancesInnerError] + message: Optional[str] + target: Optional[str] + + @overload + def __init__( + self, + *, + code: Optional[str] = ..., + details: Optional[list[ApiErrorBase]] = ..., + innererror: Optional[BulkInstancesInnerError] = ..., + message: Optional[str] = ..., + target: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ApiErrorBase(_Model): + code: Optional[str] + message: Optional[str] + target: Optional[str] + + @overload + def __init__( + self, + *, + code: Optional[str] = ..., + message: Optional[str] = ..., + target: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ApplicationProfile(_Model): + gallery_applications: Optional[list[VMGalleryApplication]] + + @overload + def __init__( + self, + *, + gallery_applications: Optional[list[VMGalleryApplication]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ArchitectureType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ARM64 = "ARM64" + X64 = "X64" + + + class azure.mgmt.compute.bulkaction.models.BootDiagnostics(_Model): + enabled: Optional[bool] + storage_uri: Optional[str] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + storage_uri: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkActionVmExtensionProperties(_Model): + auto_upgrade_minor_version: Optional[bool] + enable_automatic_upgrade: Optional[bool] + force_update_tag: Optional[str] + protected_settings: Optional[dict[str, Any]] + protected_settings_from_key_vault: Optional[KeyVaultSecretReference] + provision_after_extensions: Optional[list[str]] + publisher: Optional[str] + settings: Optional[dict[str, Any]] + suppress_failures: Optional[bool] + type: Optional[str] + type_handler_version: Optional[str] + + @overload + def __init__( + self, + *, + auto_upgrade_minor_version: Optional[bool] = ..., + enable_automatic_upgrade: Optional[bool] = ..., + force_update_tag: Optional[str] = ..., + protected_settings: Optional[dict[str, Any]] = ..., + protected_settings_from_key_vault: Optional[KeyVaultSecretReference] = ..., + provision_after_extensions: Optional[list[str]] = ..., + publisher: Optional[str] = ..., + settings: Optional[dict[str, Any]] = ..., + suppress_failures: Optional[bool] = ..., + type: Optional[str] = ..., + type_handler_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomAllocationStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LOWEST_PRICE = "LowestPrice" + PRIORITIZED = "Prioritized" + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomDistributionStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BEST_EFFORT_BALANCED = "BestEffortBalanced" + BEST_EFFORT_SINGLE_ZONE = "BestEffortSingleZone" + PRIORITIZED = "Prioritized" + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverride(_Model): + extensions: Optional[list[BulkactionVMExtension]] + identity: Optional[VirtualMachineIdentity] + plan: Optional[Plan] + tags: Optional[dict[str, str]] + virtual_machine_name: Optional[str] + virtual_machine_profile: Optional[BulkactionVMProperties] + + @overload + def __init__( + self, + *, + extensions: Optional[list[BulkactionVMExtension]] = ..., + identity: Optional[VirtualMachineIdentity] = ..., + plan: Optional[Plan] = ..., + tags: Optional[dict[str, str]] = ..., + virtual_machine_name: Optional[str] = ..., + virtual_machine_profile: Optional[BulkactionVMProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverrideBase(_Model): + extensions: Optional[list[BulkactionVMExtension]] + identity: Optional[VirtualMachineIdentity] + plan: Optional[Plan] + tags: Optional[dict[str, str]] + virtual_machine_profile: Optional[BulkactionVMProperties] + + @overload + def __init__( + self, + *, + extensions: Optional[list[BulkactionVMExtension]] = ..., + identity: Optional[VirtualMachineIdentity] = ..., + plan: Optional[Plan] = ..., + tags: Optional[dict[str, str]] = ..., + virtual_machine_profile: Optional[BulkactionVMProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverridesProfile(_Model): + overrides: Optional[list[BulkCreateCustomOverride]] + virtual_machine_name_prefix: Optional[str] + + @overload + def __init__( + self, + *, + overrides: Optional[list[BulkCreateCustomOverride]] = ..., + virtual_machine_name_prefix: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomPriorityProfile(_Model): + allocation_strategy: Optional[Union[str, BulkCreateCustomAllocationStrategy]] + eviction_policy: Optional[Union[str, EvictionPolicy]] + max_price_per_vm: Optional[float] + type: Optional[Union[str, PriorityType]] + + @overload + def __init__( + self, + *, + allocation_strategy: Optional[Union[str, BulkCreateCustomAllocationStrategy]] = ..., + eviction_policy: Optional[Union[str, EvictionPolicy]] = ..., + max_price_per_vm: Optional[float] = ..., + type: Optional[Union[str, PriorityType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomProperties(_Model): + capacity: int + capacity_type: Optional[Union[str, CapacityType]] + compute_profile: ComputeProfile + created_time: Optional[datetime] + execution_parameters: Optional[ExecutionParameters] + overrides_profile: Optional[BulkCreateCustomOverridesProfile] + priority_profile: BulkCreateCustomPriorityProfile + provisioning_state: Optional[Union[str, ProvisioningState]] + vm_sizes_profile: Optional[list[BulkCreateCustomVmSizeProfile]] + zone_allocation_policy: Optional[BulkCreateCustomZoneAllocationPolicy] + + @overload + def __init__( + self, + *, + capacity: int, + capacity_type: Optional[Union[str, CapacityType]] = ..., + compute_profile: ComputeProfile, + execution_parameters: Optional[ExecutionParameters] = ..., + overrides_profile: Optional[BulkCreateCustomOverridesProfile] = ..., + priority_profile: BulkCreateCustomPriorityProfile, + vm_sizes_profile: Optional[list[BulkCreateCustomVmSizeProfile]] = ..., + zone_allocation_policy: Optional[BulkCreateCustomZoneAllocationPolicy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomVmSizeProfile(_Model): + name: str + override: Optional[BulkCreateCustomOverrideBase] + rank: int + + @overload + def __init__( + self, + *, + name: str, + override: Optional[BulkCreateCustomOverrideBase] = ..., + rank: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkCreateCustomZoneAllocationPolicy(_Model): + distribution_strategy: Optional[Union[str, BulkCreateCustomDistributionStrategy]] + zone_preferences: Optional[list[ZonePreference]] + + @overload + def __init__( + self, + *, + distribution_strategy: Optional[Union[str, BulkCreateCustomDistributionStrategy]] = ..., + zone_preferences: Optional[list[ZonePreference]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkInstancesInnerError(_Model): + error_detail: Optional[str] + exception_type: Optional[str] + + @overload + def __init__( + self, + *, + error_detail: Optional[str] = ..., + exception_type: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkactionVMExtension(_Model): + name: str + properties: BulkActionVmExtensionProperties + + @overload + def __init__( + self, + *, + name: str, + properties: BulkActionVmExtensionProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.BulkactionVMProperties(_Model): + additional_capabilities: Optional[AdditionalCapabilities] + application_profile: Optional[ApplicationProfile] + capacity_reservation: Optional[CapacityReservationProfile] + diagnostics_profile: Optional[DiagnosticsProfile] + extensions_time_budget: Optional[str] + hardware_profile: Optional[HardwareProfile] + license_type: Optional[str] + network_profile: Optional[NetworkProfile] + os_profile: Optional[OSProfile] + scheduled_events_policy: Optional[ScheduledEventsPolicy] + scheduled_events_profile: Optional[ScheduledEventsProfile] + security_profile: Optional[SecurityProfile] + storage_profile: Optional[StorageProfile] + user_data: Optional[str] + vm_extensions: Optional[list[BulkactionVMExtension]] + + @overload + def __init__( + self, + *, + additional_capabilities: Optional[AdditionalCapabilities] = ..., + application_profile: Optional[ApplicationProfile] = ..., + capacity_reservation: Optional[CapacityReservationProfile] = ..., + diagnostics_profile: Optional[DiagnosticsProfile] = ..., + extensions_time_budget: Optional[str] = ..., + hardware_profile: Optional[HardwareProfile] = ..., + license_type: Optional[str] = ..., + network_profile: Optional[NetworkProfile] = ..., + os_profile: Optional[OSProfile] = ..., + scheduled_events_policy: Optional[ScheduledEventsPolicy] = ..., + scheduled_events_profile: Optional[ScheduledEventsProfile] = ..., + security_profile: Optional[SecurityProfile] = ..., + storage_profile: Optional[StorageProfile] = ..., + user_data: Optional[str] = ..., + vm_extensions: Optional[list[BulkactionVMExtension]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + READ_ONLY = "ReadOnly" + READ_WRITE = "ReadWrite" + + + class azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest(_Model): + resource_ids: list[str] + + @overload + def __init__( + self, + *, + resource_ids: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.CancelOperationsContent(_Model): + operation_ids: list[str] + + @overload + def __init__( + self, + *, + operation_ids: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.CancelOperationsResponse(_Model): + results: list[ResourceOperation] + + @overload + def __init__( + self, + *, + results: list[ResourceOperation] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.CapacityReservationProfile(_Model): + capacity_reservation_group: Optional[SubResource] + + @overload + def __init__( + self, + *, + capacity_reservation_group: Optional[SubResource] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.CapacityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + VM = "VM" + V_CPU = "VCpu" + + + class azure.mgmt.compute.bulkaction.models.ComputeProfile(_Model): + compute_api_version: Optional[str] + extensions: Optional[list[BulkactionVMExtension]] + virtual_machine_profile: BulkactionVMProperties + + @overload + def __init__( + self, + *, + compute_api_version: Optional[str] = ..., + extensions: Optional[list[BulkactionVMExtension]] = ..., + virtual_machine_profile: BulkactionVMProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.CpuManufacturer(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AMD = "AMD" + AMPERE = "Ampere" + INTEL = "Intel" + MICROSOFT = "Microsoft" + + + class azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse(_Model): + description: str + location: str + results: Optional[list[ResourceOperation]] + type: str + + @overload + def __init__( + self, + *, + description: str, + location: str, + results: Optional[list[ResourceOperation]] = ..., + type: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + APPLICATION = "Application" + KEY = "Key" + MANAGED_IDENTITY = "ManagedIdentity" + USER = "User" + + + class azure.mgmt.compute.bulkaction.models.DataDisk(_Model): + caching: Optional[Union[str, CachingTypes]] + create_option: Union[str, DiskCreateOptionTypes] + delete_option: Optional[Union[str, DiskDeleteOptionTypes]] + detach_option: Optional[Union[str, DiskDetachOptionTypes]] + disk_size_gb: Optional[int] + image: Optional[VirtualHardDisk] + lun: int + managed_disk: Optional[ManagedDiskParametersContent] + name: Optional[str] + source_resource: Optional[ApiEntityReference] + to_be_detached: Optional[bool] + vhd: Optional[VirtualHardDisk] + write_accelerator_enabled: Optional[bool] + + @overload + def __init__( + self, + *, + caching: Optional[Union[str, CachingTypes]] = ..., + create_option: Union[str, DiskCreateOptionTypes], + delete_option: Optional[Union[str, DiskDeleteOptionTypes]] = ..., + detach_option: Optional[Union[str, DiskDetachOptionTypes]] = ..., + disk_size_gb: Optional[int] = ..., + image: Optional[VirtualHardDisk] = ..., + lun: int, + managed_disk: Optional[ManagedDiskParametersContent] = ..., + name: Optional[str] = ..., + source_resource: Optional[ApiEntityReference] = ..., + to_be_detached: Optional[bool] = ..., + vhd: Optional[VirtualHardDisk] = ..., + write_accelerator_enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DeadlineType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + COMPLETE_BY = "CompleteBy" + INITIATE_AT = "InitiateAt" + UNKNOWN = "Unknown" + + + class azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse(_Model): + description: str + location: str + results: Optional[list[ResourceOperation]] + type: str + + @overload + def __init__( + self, + *, + description: str, + location: str, + results: Optional[list[ResourceOperation]] = ..., + type: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DelayRequest(_Model): + delay: datetime + resource_ids: list[str] + + @overload + def __init__( + self, + *, + delay: datetime, + resource_ids: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DeleteOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETE = "Delete" + DETACH = "Detach" + + + class azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse(_Model): + description: str + location: str + results: Optional[list[ResourceOperation]] + type: str + + @overload + def __init__( + self, + *, + description: str, + location: str, + results: Optional[list[ResourceOperation]] = ..., + type: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DiagnosticsProfile(_Model): + boot_diagnostics: Optional[BootDiagnostics] + + @overload + def __init__( + self, + *, + boot_diagnostics: Optional[BootDiagnostics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DiffDiskOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LOCAL = "Local" + + + class azure.mgmt.compute.bulkaction.models.DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CACHE_DISK = "CacheDisk" + NVME_DISK = "NvmeDisk" + RESOURCE_DISK = "ResourceDisk" + + + class azure.mgmt.compute.bulkaction.models.DiffDiskSettings(_Model): + option: Optional[Union[str, DiffDiskOptions]] + placement: Optional[Union[str, DiffDiskPlacement]] + + @overload + def __init__( + self, + *, + option: Optional[Union[str, DiffDiskOptions]] = ..., + placement: Optional[Union[str, DiffDiskPlacement]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DiskControllerTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NV_ME = "NVMe" + SCSI = "SCSI" + + + class azure.mgmt.compute.bulkaction.models.DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ATTACH = "Attach" + COPY = "Copy" + EMPTY = "Empty" + FROM_IMAGE = "FromImage" + RESTORE = "Restore" + + + class azure.mgmt.compute.bulkaction.models.DiskDeleteOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETE = "Delete" + DETACH = "Detach" + + + class azure.mgmt.compute.bulkaction.models.DiskDetachOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FORCE_DETACH = "ForceDetach" + + + class azure.mgmt.compute.bulkaction.models.DiskEncryptionSetParametersContent(SubResource): + id: str + + @overload + def __init__( + self, + *, + id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DiskEncryptionSettings(_Model): + disk_encryption_key: Optional[KeyVaultSecretReference] + enabled: Optional[bool] + key_encryption_key: Optional[KeyVaultKeyReference] + + @overload + def __init__( + self, + *, + disk_encryption_key: Optional[KeyVaultSecretReference] = ..., + enabled: Optional[bool] = ..., + key_encryption_key: Optional[KeyVaultKeyReference] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.DistributionStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BEST_EFFORT_BALANCED = "BestEffortBalanced" + BEST_EFFORT_SINGLE_ZONE = "BestEffortSingleZone" + PRIORITIZED = "Prioritized" + STRICT_BALANCED = "StrictBalanced" + + + class azure.mgmt.compute.bulkaction.models.DomainNameLabelScopeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NO_REUSE = "NoReuse" + RESOURCE_GROUP_REUSE = "ResourceGroupReuse" + SUBSCRIPTION_REUSE = "SubscriptionReuse" + TENANT_REUSE = "TenantReuse" + + + class azure.mgmt.compute.bulkaction.models.EncryptionIdentity(_Model): + user_assigned_identity_resource_id: Optional[str] + + @overload + def __init__( + self, + *, + user_assigned_identity_resource_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ErrorAdditionalInfo(_Model): + info: Optional[Any] + type: Optional[str] + + + class azure.mgmt.compute.bulkaction.models.ErrorDetail(_Model): + additional_info: Optional[list[ErrorAdditionalInfo]] + code: Optional[str] + details: Optional[list[ErrorDetail]] + message: Optional[str] + target: Optional[str] + + + class azure.mgmt.compute.bulkaction.models.ErrorResponse(_Model): + error: Optional[ErrorDetail] + + @overload + def __init__( + self, + *, + error: Optional[ErrorDetail] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.EventGridAndResourceGraph(_Model): + enable: Optional[bool] + scheduled_events_api_version: Optional[str] + + @overload + def __init__( + self, + *, + enable: Optional[bool] = ..., + scheduled_events_api_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.EvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEALLOCATE = "Deallocate" + DELETE = "Delete" + + + class azure.mgmt.compute.bulkaction.models.ExecuteCreateContent(_Model): + execution_parameters: ExecutionParameters + resource_config_parameters: ResourceProvisionPayload + + @overload + def __init__( + self, + *, + execution_parameters: ExecutionParameters, + resource_config_parameters: ResourceProvisionPayload + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + class azure.mgmt.compute.bulkaction.models.ExecuteDeallocateContent(_Model): execution_parameters: ExecutionParameters - resources: Resources + resources: Optional[Resources] + resources_with_context: Optional[ResourcesWithContext] + + @overload + def __init__( + self, + *, + execution_parameters: ExecutionParameters, + resources: Optional[Resources] = ..., + resources_with_context: Optional[ResourcesWithContext] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent(_Model): + execution_parameters: ExecutionParameters + force_deletion: Optional[bool] + resources: Optional[Resources] + resources_with_context: Optional[ResourcesWithContext] + + @overload + def __init__( + self, + *, + execution_parameters: ExecutionParameters, + force_deletion: Optional[bool] = ..., + resources: Optional[Resources] = ..., + resources_with_context: Optional[ResourcesWithContext] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ExecuteHibernateContent(_Model): + execution_parameters: ExecutionParameters + resources: Optional[Resources] + resources_with_context: Optional[ResourcesWithContext] + + @overload + def __init__( + self, + *, + execution_parameters: ExecutionParameters, + resources: Optional[Resources] = ..., + resources_with_context: Optional[ResourcesWithContext] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ExecuteReimageRequest(_Model): + execution_parameters: ExecutionParameters + reimage_parameters: Optional[ReimagePayload] + resources: Optional[Resources] + resources_with_context: Optional[ResourcesWithContext] + + @overload + def __init__( + self, + *, + execution_parameters: ExecutionParameters, + reimage_parameters: Optional[ReimagePayload] = ..., + resources: Optional[Resources] = ..., + resources_with_context: Optional[ResourcesWithContext] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ExecuteStartContent(_Model): + execution_parameters: ExecutionParameters + resources: Optional[Resources] + resources_with_context: Optional[ResourcesWithContext] + + @overload + def __init__( + self, + *, + execution_parameters: ExecutionParameters, + resources: Optional[Resources] = ..., + resources_with_context: Optional[ResourcesWithContext] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ExecuteVdiCreateRequest(_Model): + execution_parameters: ExecutionParameters + resource_config_parameters: ResourceProvisionVdiPayload + + @overload + def __init__( + self, + *, + execution_parameters: ExecutionParameters, + resource_config_parameters: ResourceProvisionVdiPayload + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ExecutionParameters(_Model): + optimization_preference: Optional[Union[str, OptimizationPreference]] + retry_policy: Optional[RetryPolicy] + verify_vm_agent_health: Optional[bool] + + @overload + def __init__( + self, + *, + optimization_preference: Optional[Union[str, OptimizationPreference]] = ..., + retry_policy: Optional[RetryPolicy] = ..., + verify_vm_agent_health: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ExtensionResource(Resource): + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.compute.bulkaction.models.FallbackOperationInfo(_Model): + error: Optional[ResourceOperationError] + last_op_type: Union[str, ResourceOperationType] + status: str + + @overload + def __init__( + self, + *, + error: Optional[ResourceOperationError] = ..., + last_op_type: Union[str, ResourceOperationType], + status: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.FlexProperties(_Model): + min_capacity: Optional[int] + os_type: Union[str, OsType] + priority_profile: PriorityProfile + vm_size_profiles: list[VmSizeProfile] + zone_allocation_policy: Optional[ZoneAllocationPolicy] + + @overload + def __init__( + self, + *, + min_capacity: Optional[int] = ..., + os_type: Union[str, OsType], + priority_profile: PriorityProfile, + vm_size_profiles: list[VmSizeProfile], + zone_allocation_policy: Optional[ZoneAllocationPolicy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.GetOperationStatusContent(_Model): + operation_ids: list[str] + + @overload + def __init__( + self, + *, + operation_ids: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse(_Model): + results: list[ResourceOperation] + + @overload + def __init__( + self, + *, + results: list[ResourceOperation] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.HardwareProfile(_Model): + vm_size: Optional[str] + vm_size_properties: Optional[VmSizeProperties] + + @overload + def __init__( + self, + *, + vm_size: Optional[str] = ..., + vm_size_properties: Optional[VmSizeProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse(_Model): + description: str + location: str + results: Optional[list[ResourceOperation]] + type: str + + @overload + def __init__( + self, + *, + description: str, + location: str, + results: Optional[list[ResourceOperation]] = ..., + type: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.HostEndpointSettings(_Model): + in_vm_access_control_profile_reference_id: Optional[str] + mode: Optional[Union[str, Modes]] + + @overload + def __init__( + self, + *, + in_vm_access_control_profile_reference_id: Optional[str] = ..., + mode: Optional[Union[str, Modes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.HyperVGeneration(str, Enum, metaclass=CaseInsensitiveEnumMeta): + GEN1 = "Gen1" + GEN2 = "Gen2" + + + class azure.mgmt.compute.bulkaction.models.IPVersions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + I_PV4 = "IPv4" + I_PV6 = "IPv6" + + + class azure.mgmt.compute.bulkaction.models.ImageReference(SubResource): + community_gallery_image_id: Optional[str] + id: str + offer: Optional[str] + publisher: Optional[str] + shared_gallery_image_id: Optional[str] + sku: Optional[str] + version: Optional[str] + + @overload + def __init__( + self, + *, + community_gallery_image_id: Optional[str] = ..., + id: Optional[str] = ..., + offer: Optional[str] = ..., + publisher: Optional[str] = ..., + shared_gallery_image_id: Optional[str] = ..., + sku: Optional[str] = ..., + version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.KeyVaultKeyReference(_Model): + key_url: str + source_vault: SubResource + + @overload + def __init__( + self, + *, + key_url: str, + source_vault: SubResource + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.KeyVaultSecretReference(_Model): + secret_url: str + source_vault: SubResource + + @overload + def __init__( + self, + *, + secret_url: str, + source_vault: SubResource + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.Language(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EN_US = "en-us" + + + class azure.mgmt.compute.bulkaction.models.LaunchBulkInstancesOperationProperties(_Model): + capacity: int + capacity_type: Optional[Union[str, CapacityType]] + compute_profile: ComputeProfile + created_time: Optional[datetime] + priority_profile: PriorityProfile + provisioning_state: Optional[Union[str, ProvisioningState]] + retry_policy: Optional[RetryPolicy] + vm_attributes: Optional[VMAttributes] + vm_sizes_profile: Optional[list[VmSizeProfile]] + zone_allocation_policy: Optional[ZoneAllocationPolicy] + + @overload + def __init__( + self, + *, + capacity: int, + capacity_type: Optional[Union[str, CapacityType]] = ..., + compute_profile: ComputeProfile, + priority_profile: PriorityProfile, + retry_policy: Optional[RetryPolicy] = ..., + vm_attributes: Optional[VMAttributes] = ..., + vm_sizes_profile: Optional[list[VmSizeProfile]] = ..., + zone_allocation_policy: Optional[ZoneAllocationPolicy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.LinuxConfiguration(_Model): + disable_password_authentication: Optional[bool] + enable_vm_agent_platform_updates: Optional[bool] + patch_settings: Optional[LinuxPatchSettings] + provision_vm_agent: Optional[bool] + ssh: Optional[SshConfiguration] + + @overload + def __init__( + self, + *, + disable_password_authentication: Optional[bool] = ..., + enable_vm_agent_platform_updates: Optional[bool] = ..., + patch_settings: Optional[LinuxPatchSettings] = ..., + provision_vm_agent: Optional[bool] = ..., + ssh: Optional[SshConfiguration] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.LinuxPatchAssessmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + IMAGE_DEFAULT = "ImageDefault" + + + class azure.mgmt.compute.bulkaction.models.LinuxPatchSettings(_Model): + assessment_mode: Optional[Union[str, LinuxPatchAssessmentMode]] + automatic_by_platform_settings: Optional[LinuxVMGuestPatchAutomaticByPlatformSettings] + patch_mode: Optional[Union[str, LinuxVMGuestPatchMode]] + + @overload + def __init__( + self, + *, + assessment_mode: Optional[Union[str, LinuxPatchAssessmentMode]] = ..., + automatic_by_platform_settings: Optional[LinuxVMGuestPatchAutomaticByPlatformSettings] = ..., + patch_mode: Optional[Union[str, LinuxVMGuestPatchMode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALWAYS = "Always" + IF_REQUIRED = "IfRequired" + NEVER = "Never" + UNKNOWN = "Unknown" + + + class azure.mgmt.compute.bulkaction.models.LinuxVMGuestPatchAutomaticByPlatformSettings(_Model): + bypass_platform_safety_checks_on_user_schedule: Optional[bool] + reboot_setting: Optional[Union[str, LinuxVMGuestPatchAutomaticByPlatformRebootSetting]] + + @overload + def __init__( + self, + *, + bypass_platform_safety_checks_on_user_schedule: Optional[bool] = ..., + reboot_setting: Optional[Union[str, LinuxVMGuestPatchAutomaticByPlatformRebootSetting]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.LinuxVMGuestPatchMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + IMAGE_DEFAULT = "ImageDefault" + + + class azure.mgmt.compute.bulkaction.models.LocalStorageDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + HDD = "HDD" + SSD = "SSD" + + + class azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom(ProxyResource): + id: str + identity: Optional[ManagedServiceIdentity] + name: str + plan: Optional[Plan] + properties: Optional[BulkCreateCustomProperties] + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + zones: Optional[list[str]] + + @overload + def __init__( + self, + *, + identity: Optional[ManagedServiceIdentity] = ..., + plan: Optional[Plan] = ..., + properties: Optional[BulkCreateCustomProperties] = ..., + tags: Optional[dict[str, str]] = ..., + zones: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation(ProxyResource): + id: str + identity: Optional[ManagedServiceIdentity] + name: str + plan: Optional[Plan] + properties: Optional[LaunchBulkInstancesOperationProperties] + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + zones: Optional[list[str]] + + @overload + def __init__( + self, + *, + identity: Optional[ManagedServiceIdentity] = ..., + plan: Optional[Plan] = ..., + properties: Optional[LaunchBulkInstancesOperationProperties] = ..., + tags: Optional[dict[str, str]] = ..., + zones: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ManagedDiskParametersContent(SubResource): + disk_encryption_set: Optional[DiskEncryptionSetParametersContent] + id: str + security_profile: Optional[VMDiskSecurityProfile] + storage_account_type: Optional[Union[str, StorageAccountTypes]] + + @overload + def __init__( + self, + *, + disk_encryption_set: Optional[DiskEncryptionSetParametersContent] = ..., + id: Optional[str] = ..., + security_profile: Optional[VMDiskSecurityProfile] = ..., + storage_account_type: Optional[Union[str, StorageAccountTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ManagedServiceIdentity(_Model): + principal_id: Optional[str] + tenant_id: Optional[str] + type: Union[str, ManagedServiceIdentityType] + user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] + + @overload + def __init__( + self, + *, + type: Union[str, ManagedServiceIdentityType], + user_assigned_identities: Optional[dict[str, UserAssignedIdentity]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + USER_ASSIGNED = "UserAssigned" + + + class azure.mgmt.compute.bulkaction.models.Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUDIT = "Audit" + ENFORCE = "Enforce" + + + class azure.mgmt.compute.bulkaction.models.Modes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUDIT = "Audit" + DISABLED = "Disabled" + ENFORCE = "Enforce" + + + class azure.mgmt.compute.bulkaction.models.Month(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "All" + APRIL = "April" + AUGUST = "August" + DECEMBER = "December" + FEBRUARY = "February" + JANUARY = "January" + JULY = "July" + JUNE = "June" + MARCH = "March" + MAY = "May" + NOVEMBER = "November" + OCTOBER = "October" + SEPTEMBER = "September" + + + class azure.mgmt.compute.bulkaction.models.NetworkApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENUM2020_11_01 = "2020-11-01" + ENUM2022_11_01 = "2022-11-01" + + + class azure.mgmt.compute.bulkaction.models.NetworkInterfaceAuxiliaryMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACCELERATED_CONNECTIONS = "AcceleratedConnections" + FLOATING = "Floating" + NONE = "None" + + + class azure.mgmt.compute.bulkaction.models.NetworkInterfaceAuxiliarySku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + A1 = "A1" + A2 = "A2" + A4 = "A4" + A8 = "A8" + NONE = "None" + + + class azure.mgmt.compute.bulkaction.models.NetworkInterfaceReference(SubResource): + id: str + properties: Optional[NetworkInterfaceReferenceProperties] + + @overload + def __init__( + self, + *, + id: Optional[str] = ..., + properties: Optional[NetworkInterfaceReferenceProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.NetworkInterfaceReferenceProperties(_Model): + delete_option: Optional[Union[str, DeleteOptions]] + primary: Optional[bool] + + @overload + def __init__( + self, + *, + delete_option: Optional[Union[str, DeleteOptions]] = ..., + primary: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.NetworkProfile(_Model): + network_api_version: Optional[Union[str, NetworkApiVersion]] + network_interface_configurations: Optional[list[VirtualMachineNetworkInterfaceConfiguration]] + network_interfaces: Optional[list[NetworkInterfaceReference]] + + @overload + def __init__( + self, + *, + network_api_version: Optional[Union[str, NetworkApiVersion]] = ..., + network_interface_configurations: Optional[list[VirtualMachineNetworkInterfaceConfiguration]] = ..., + network_interfaces: Optional[list[NetworkInterfaceReference]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.NotificationProperties(_Model): + destination: str + disabled: Optional[bool] + language: Union[str, Language] + type: Union[str, NotificationType] + + @overload + def __init__( + self, + *, + destination: str, + disabled: Optional[bool] = ..., + language: Union[str, Language], + type: Union[str, NotificationType] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.NotificationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EMAIL = "Email" + + + class azure.mgmt.compute.bulkaction.models.OSDisk(_Model): + caching: Optional[Union[str, CachingTypes]] + create_option: Union[str, DiskCreateOptionTypes] + delete_option: Optional[Union[str, DiskDeleteOptionTypes]] + diff_disk_settings: Optional[DiffDiskSettings] + disk_size_gb: Optional[int] + encryption_settings: Optional[DiskEncryptionSettings] + image: Optional[VirtualHardDisk] + managed_disk: Optional[ManagedDiskParametersContent] + name: Optional[str] + os_type: Optional[Union[str, OperatingSystemTypes]] + vhd: Optional[VirtualHardDisk] + write_accelerator_enabled: Optional[bool] + + @overload + def __init__( + self, + *, + caching: Optional[Union[str, CachingTypes]] = ..., + create_option: Union[str, DiskCreateOptionTypes], + delete_option: Optional[Union[str, DiskDeleteOptionTypes]] = ..., + diff_disk_settings: Optional[DiffDiskSettings] = ..., + disk_size_gb: Optional[int] = ..., + encryption_settings: Optional[DiskEncryptionSettings] = ..., + image: Optional[VirtualHardDisk] = ..., + managed_disk: Optional[ManagedDiskParametersContent] = ..., + name: Optional[str] = ..., + os_type: Optional[Union[str, OperatingSystemTypes]] = ..., + vhd: Optional[VirtualHardDisk] = ..., + write_accelerator_enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OSImageNotificationProfile(_Model): + enable: Optional[bool] + not_before_timeout: Optional[str] + + @overload + def __init__( + self, + *, + enable: Optional[bool] = ..., + not_before_timeout: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OSProfile(_Model): + admin_password: Optional[str] + admin_username: Optional[str] + allow_extension_operations: Optional[bool] + computer_name: Optional[str] + custom_data: Optional[str] + linux_configuration: Optional[LinuxConfiguration] + require_guest_provision_signal: Optional[bool] + secrets: Optional[list[VaultSecretGroup]] + windows_configuration: Optional[WindowsConfiguration] + + @overload + def __init__( + self, + *, + admin_password: Optional[str] = ..., + admin_username: Optional[str] = ..., + allow_extension_operations: Optional[bool] = ..., + computer_name: Optional[str] = ..., + custom_data: Optional[str] = ..., + linux_configuration: Optional[LinuxConfiguration] = ..., + require_guest_provision_signal: Optional[bool] = ..., + secrets: Optional[list[VaultSecretGroup]] = ..., + windows_configuration: Optional[WindowsConfiguration] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OSProfileProvisioningData(_Model): + admin_password: Optional[str] + custom_data: Optional[str] + + @overload + def __init__( + self, + *, + admin_password: Optional[str] = ..., + custom_data: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.Occurrence(ProxyResource): + id: str + name: str + properties: Optional[OccurrenceProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[OccurrenceProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OccurrenceExtensionProperties(_Model): + error_details: Optional[ODataV4Format] + notification_settings: Optional[list[NotificationProperties]] + provisioning_state: Optional[Union[str, ResourceProvisioningState]] + resource_id: str + scheduled_action_id: str + scheduled_time: datetime + + @overload + def __init__( + self, + *, + notification_settings: Optional[list[NotificationProperties]] = ..., + resource_id: str, + scheduled_action_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OccurrenceExtensionResource(ExtensionResource): + id: str + name: str + properties: Optional[OccurrenceExtensionProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[OccurrenceExtensionProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OccurrenceProperties(_Model): + provisioning_state: Optional[Union[str, OccurrenceState]] + result_summary: OccurrenceResultSummary + scheduled_time: datetime + + + class azure.mgmt.compute.bulkaction.models.OccurrenceResource(_Model): + error_details: Optional[ODataV4Format] + id: str + name: str + notification_settings: Optional[list[NotificationProperties]] + provisioning_state: Optional[Union[str, ResourceProvisioningState]] + resource_id: str + scheduled_time: datetime + type: Optional[str] + + @overload + def __init__( + self, + *, + notification_settings: Optional[list[NotificationProperties]] = ..., + resource_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OccurrenceResultSummary(_Model): + statuses: list[ResourceResultSummary] + total: int + + @overload + def __init__( + self, + *, + statuses: list[ResourceResultSummary], + total: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OccurrenceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CANCELLING = "Cancelling" + CREATED = "Created" + FAILED = "Failed" + RESCHEDULING = "Rescheduling" + SCHEDULED = "Scheduled" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.compute.bulkaction.models.OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LINUX = "Linux" + WINDOWS = "Windows" + + + class azure.mgmt.compute.bulkaction.models.Operation(_Model): + action_type: Optional[Union[str, ActionType]] + display: Optional[OperationDisplay] + is_data_action: Optional[bool] + name: Optional[str] + origin: Optional[Union[str, Origin]] + + @overload + def __init__( + self, + *, + display: Optional[OperationDisplay] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OperationDisplay(_Model): + description: Optional[str] + operation: Optional[str] + provider: Optional[str] + resource: Optional[str] + + + class azure.mgmt.compute.bulkaction.models.OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BLOCKED = "Blocked" + CANCELLED = "Cancelled" + EXECUTING = "Executing" + FAILED = "Failed" + PENDING_EXECUTION = "PendingExecution" + PENDING_SCHEDULING = "PendingScheduling" + SCHEDULED = "Scheduled" + SUCCEEDED = "Succeeded" + UNKNOWN = "Unknown" + + + class azure.mgmt.compute.bulkaction.models.OperationStatusResult(_Model): + end_time: Optional[datetime] + error: Optional[ErrorDetail] + id: Optional[str] + name: Optional[str] + operations: Optional[list[OperationStatusResult]] + percent_complete: Optional[float] + resource_id: Optional[str] + start_time: Optional[datetime] + status: str + + @overload + def __init__( + self, + *, + end_time: Optional[datetime] = ..., + error: Optional[ErrorDetail] = ..., + id: Optional[str] = ..., + name: Optional[str] = ..., + operations: Optional[list[OperationStatusResult]] = ..., + percent_complete: Optional[float] = ..., + start_time: Optional[datetime] = ..., + status: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.OptimizationPreference(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AVAILABILITY = "Availability" + COST = "Cost" + COST_AVAILABILITY_BALANCED = "CostAvailabilityBalanced" + + + class azure.mgmt.compute.bulkaction.models.Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): + SYSTEM = "system" + USER = "user" + USER_SYSTEM = "user,system" + + + class azure.mgmt.compute.bulkaction.models.OsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LINUX = "Linux" + WINDOWS = "Windows" + + + class azure.mgmt.compute.bulkaction.models.PatchSettings(_Model): + assessment_mode: Optional[Union[str, WindowsPatchAssessmentMode]] + automatic_by_platform_settings: Optional[WindowsVMGuestPatchAutomaticByPlatformSettings] + enable_hotpatching: Optional[bool] + patch_mode: Optional[Union[str, WindowsVMGuestPatchMode]] + + @overload + def __init__( + self, + *, + assessment_mode: Optional[Union[str, WindowsPatchAssessmentMode]] = ..., + automatic_by_platform_settings: Optional[WindowsVMGuestPatchAutomaticByPlatformSettings] = ..., + enable_hotpatching: Optional[bool] = ..., + patch_mode: Optional[Union[str, WindowsVMGuestPatchMode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.Plan(_Model): + name: str + product: str + promotion_code: Optional[str] + publisher: str + version: Optional[str] + + @overload + def __init__( + self, + *, + name: str, + product: str, + promotion_code: Optional[str] = ..., + publisher: str, + version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.PriorityProfile(_Model): + allocation_strategy: Optional[Union[str, AllocationStrategy]] + eviction_policy: Optional[Union[str, EvictionPolicy]] + max_price_per_vm: Optional[float] + type: Optional[Union[str, PriorityType]] + + @overload + def __init__( + self, + *, + allocation_strategy: Optional[Union[str, AllocationStrategy]] = ..., + eviction_policy: Optional[Union[str, EvictionPolicy]] = ..., + max_price_per_vm: Optional[float] = ..., + type: Optional[Union[str, PriorityType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.PriorityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + REGULAR = "Regular" + SPOT = "Spot" + + + class azure.mgmt.compute.bulkaction.models.ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + HTTP = "Http" + HTTPS = "Https" + + + class azure.mgmt.compute.bulkaction.models.ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.compute.bulkaction.models.ProxyAgentSettings(_Model): + add_proxy_agent_extension: Optional[bool] + enabled: Optional[bool] + imds: Optional[HostEndpointSettings] + key_incarnation_id: Optional[int] + mode: Optional[Union[str, Mode]] + wire_server: Optional[HostEndpointSettings] + + @overload + def __init__( + self, + *, + add_proxy_agent_extension: Optional[bool] = ..., + enabled: Optional[bool] = ..., + imds: Optional[HostEndpointSettings] = ..., + key_incarnation_id: Optional[int] = ..., + mode: Optional[Union[str, Mode]] = ..., + wire_server: Optional[HostEndpointSettings] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ProxyResource(Resource): + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.compute.bulkaction.models.PublicIPAddressSku(_Model): + name: Optional[Union[str, PublicIPAddressSkuName]] + tier: Optional[Union[str, PublicIPAddressSkuTier]] + + @overload + def __init__( + self, + *, + name: Optional[Union[str, PublicIPAddressSkuName]] = ..., + tier: Optional[Union[str, PublicIPAddressSkuTier]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.PublicIPAddressSkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BASIC = "Basic" + STANDARD = "Standard" + + + class azure.mgmt.compute.bulkaction.models.PublicIPAddressSkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + GLOBAL = "Global" + REGIONAL = "Regional" + + + class azure.mgmt.compute.bulkaction.models.PublicIPAllocationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DYNAMIC = "Dynamic" + STATIC = "Static" + + + class azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsDeadlineType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + COMPLETE_BY = "CompleteBy" + INITIATE_AT = "InitiateAt" + UNKNOWN = "Unknown" + + + class azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsExecutionParameters(_Model): + optimization_preference: Optional[Union[str, OptimizationPreference]] + retry_policy: Optional[RecurringScheduledActionsRetryPolicy] + + @overload + def __init__( + self, + *, + optimization_preference: Optional[Union[str, OptimizationPreference]] = ..., + retry_policy: Optional[RecurringScheduledActionsRetryPolicy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsResourceOperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CREATE = "Create" + DEALLOCATE = "Deallocate" + DELETE = "Delete" + HIBERNATE = "Hibernate" + START = "Start" + UNKNOWN = "Unknown" + + + class azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsRetryPolicy(_Model): + on_failure_action: Optional[Union[str, RecurringScheduledActionsResourceOperationType]] + retry_count: Optional[int] + retry_window_in_minutes: Optional[int] + + @overload + def __init__( + self, + *, + on_failure_action: Optional[Union[str, RecurringScheduledActionsResourceOperationType]] = ..., + retry_count: Optional[int] = ..., + retry_window_in_minutes: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ReimagePayload(_Model): + base_profile: Optional[VirtualMachineReimageParameters] + resource_overrides: Optional[list[ReimageResourceOverride]] + + @overload + def __init__( + self, + *, + base_profile: Optional[VirtualMachineReimageParameters] = ..., + resource_overrides: Optional[list[ReimageResourceOverride]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse(_Model): + description: str + location: str + results: Optional[list[ResourceOperation]] + type: str + + @overload + def __init__( + self, + *, + description: str, + location: str, + results: Optional[list[ResourceOperation]] = ..., + type: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ReimageResourceOverride(_Model): + profile: VirtualMachineReimageParameters + resource_id: str + + @overload + def __init__( + self, + *, + profile: VirtualMachineReimageParameters, + resource_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.Resource(_Model): + id: Optional[str] + name: Optional[str] + system_data: Optional[SystemData] + type: Optional[str] + + + class azure.mgmt.compute.bulkaction.models.ResourceAttachRequest(_Model): + resources: list[ScheduledActionResourceInput] + + @overload + def __init__( + self, + *, + resources: list[ScheduledActionResourceInput] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceDetachRequest(_Model): + resources: list[str] + + @overload + def __init__( + self, + *, + resources: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + USER_ASSIGNED = "UserAssigned" + + + class azure.mgmt.compute.bulkaction.models.ResourceNotificationDetails(_Model): + resource_context: Optional[str] + + @overload + def __init__( + self, + *, + resource_context: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceOperation(_Model): + error_code: Optional[str] + error_details: Optional[str] + operation: Optional[ResourceOperationDetails] + resource_id: Optional[str] + virtual_machine_info: Optional[VirtualMachineInfo] + + @overload + def __init__( + self, + *, + error_code: Optional[str] = ..., + error_details: Optional[str] = ..., + operation: Optional[ResourceOperationDetails] = ..., + resource_id: Optional[str] = ..., + virtual_machine_info: Optional[VirtualMachineInfo] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceOperationDetails(_Model): + completed_at: Optional[datetime] + deadline: Optional[datetime] + deadline_type: Optional[Union[str, DeadlineType]] + fallback_operation_info: Optional[FallbackOperationInfo] + op_type: Optional[Union[str, ResourceOperationType]] + operation_id: str + resource_id: Optional[str] + resource_notification_details: Optional[ResourceNotificationDetails] + resource_operation_error: Optional[ResourceOperationError] + retry_policy: Optional[RetryPolicy] + state: Optional[Union[str, OperationState]] + subscription_id: Optional[str] + timezone: Optional[str] + + @overload + def __init__( + self, + *, + completed_at: Optional[datetime] = ..., + deadline: Optional[datetime] = ..., + deadline_type: Optional[Union[str, DeadlineType]] = ..., + fallback_operation_info: Optional[FallbackOperationInfo] = ..., + op_type: Optional[Union[str, ResourceOperationType]] = ..., + operation_id: str, + resource_id: Optional[str] = ..., + resource_notification_details: Optional[ResourceNotificationDetails] = ..., + resource_operation_error: Optional[ResourceOperationError] = ..., + retry_policy: Optional[RetryPolicy] = ..., + state: Optional[Union[str, OperationState]] = ..., + subscription_id: Optional[str] = ..., + timezone: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceOperationError(_Model): + error_code: str + error_details: str + + @overload + def __init__( + self, + *, + error_code: str, + error_details: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceOperationResponse(_Model): + resources_statuses: list[ResourceStatus] + total_resources: int + + @overload + def __init__( + self, + *, + resources_statuses: list[ResourceStatus], + total_resources: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.compute.bulkaction.models.ResourceOperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CREATE = "Create" + DEALLOCATE = "Deallocate" + DELETE = "Delete" + GET_INSTANCE_VIEW = "GetInstanceView" + HIBERNATE = "Hibernate" + START = "Start" + UNKNOWN = "Unknown" + + + class azure.mgmt.compute.bulkaction.models.ResourcePatchRequest(_Model): + resources: list[ScheduledActionResourceInput] + + @overload + def __init__( + self, + *, + resources: list[ScheduledActionResourceInput] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceProvisionPayload(_Model): + base_profile: Optional[dict[str, Any]] + resource_count: int + resource_overrides: Optional[list[dict[str, Any]]] + resource_prefix: Optional[str] + + @overload + def __init__( + self, + *, + base_profile: Optional[dict[str, Any]] = ..., + resource_count: int, + resource_overrides: Optional[list[dict[str, Any]]] = ..., + resource_prefix: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceProvisionVdiPayload(_Model): + base_profile: Optional[dict[str, Any]] + flex_properties: FlexProperties + resource_count: int + resource_overrides: Optional[list[dict[str, Any]]] + resource_prefix: Optional[str] + + @overload + def __init__( + self, + *, + base_profile: Optional[dict[str, Any]] = ..., + flex_properties: FlexProperties, + resource_count: int, + resource_overrides: Optional[list[dict[str, Any]]] = ..., + resource_prefix: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.compute.bulkaction.models.ResourceResultSummary(_Model): + code: str + count: int + error_details: Optional[ODataV4Format] + + @overload + def __init__( + self, + *, + code: str, + count: int, + error_details: Optional[ODataV4Format] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceStatus(_Model): + error: Optional[ODataV4Format] + resource_id: str + status: Union[str, ResourceOperationStatus] + + @overload + def __init__( + self, + *, + error: Optional[ODataV4Format] = ..., + resource_id: str, + status: Union[str, ResourceOperationStatus] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + VIRTUAL_MACHINE = "VirtualMachine" + VIRTUAL_MACHINE_SCALE_SET = "VirtualMachineScaleSet" + + + class azure.mgmt.compute.bulkaction.models.ResourceWithContext(_Model): + resource_context: str + resource_id: str + + @overload + def __init__( + self, + *, + resource_context: str, + resource_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.Resources(_Model): + ids: list[str] + + @overload + def __init__( + self, + *, + ids: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ResourcesWithContext(_Model): + resources: list[ResourceWithContext] + + @overload + def __init__( + self, + *, + resources: list[ResourceWithContext] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.RetryPolicy(_Model): + on_failure_action: Optional[Union[str, ResourceOperationType]] + retry_count: Optional[int] + retry_window_in_minutes: Optional[int] + + @overload + def __init__( + self, + *, + on_failure_action: Optional[Union[str, ResourceOperationType]] = ..., + retry_count: Optional[int] = ..., + retry_window_in_minutes: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledAction(TrackedResource): + id: str + location: str + name: str + properties: Optional[ScheduledActionProperties] + system_data: SystemData + tags: dict[str, str] + type: str + + @overload + def __init__( + self, + *, + location: str, + properties: Optional[ScheduledActionProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionProperties(_Model): + action_type: Union[str, ScheduledActionType] + disabled: Optional[bool] + end_time: Optional[datetime] + notification_settings: list[NotificationProperties] + provisioning_state: Optional[Union[str, RecurringScheduledActionsProvisioningState]] + resource_type: Union[str, ResourceType] + schedule: ScheduledActionsSchedule + start_time: datetime + + @overload + def __init__( + self, + *, + action_type: Union[str, ScheduledActionType], + disabled: Optional[bool] = ..., + end_time: Optional[datetime] = ..., + notification_settings: list[NotificationProperties], + resource_type: Union[str, ResourceType], + schedule: ScheduledActionsSchedule, + start_time: datetime + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionResource(_Model): + id: str + name: str + notification_settings: Optional[list[NotificationProperties]] + resource_id: str + type: Optional[str] + + @overload + def __init__( + self, + *, + notification_settings: Optional[list[NotificationProperties]] = ..., + resource_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionResourceInput(_Model): + notification_settings: Optional[list[NotificationProperties]] + resource_id: str + + @overload + def __init__( + self, + *, + notification_settings: Optional[list[NotificationProperties]] = ..., + resource_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionResources(ExtensionResource): + id: str + name: str + properties: Optional[ScheduledActionsExtensionProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[ScheduledActionsExtensionProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEALLOCATE = "Deallocate" + HIBERNATE = "Hibernate" + START = "Start" + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionUpdate(_Model): + properties: Optional[ScheduledActionUpdateProperties] + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + properties: Optional[ScheduledActionUpdateProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionUpdateProperties(_Model): + action_type: Optional[Union[str, ScheduledActionType]] + disabled: Optional[bool] + end_time: Optional[datetime] + notification_settings: Optional[list[NotificationProperties]] + resource_type: Optional[Union[str, ResourceType]] + schedule: Optional[ScheduledActionsScheduleUpdate] + start_time: Optional[datetime] + + @overload + def __init__( + self, + *, + action_type: Optional[Union[str, ScheduledActionType]] = ..., + disabled: Optional[bool] = ..., + end_time: Optional[datetime] = ..., + notification_settings: Optional[list[NotificationProperties]] = ..., + resource_type: Optional[Union[str, ResourceType]] = ..., + schedule: Optional[ScheduledActionsScheduleUpdate] = ..., + start_time: Optional[datetime] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionsExtensionProperties(_Model): + action_type: Union[str, ScheduledActionType] + disabled: Optional[bool] + end_time: Optional[datetime] + notification_settings: list[NotificationProperties] + provisioning_state: Optional[Union[str, RecurringScheduledActionsProvisioningState]] + resource_notification_settings: Optional[list[NotificationProperties]] + resource_type: Union[str, ResourceType] + schedule: ScheduledActionsSchedule + start_time: datetime + + @overload + def __init__( + self, + *, + action_type: Union[str, ScheduledActionType], + disabled: Optional[bool] = ..., + end_time: Optional[datetime] = ..., + notification_settings: list[NotificationProperties], + resource_type: Union[str, ResourceType], + schedule: ScheduledActionsSchedule, + start_time: datetime + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionsSchedule(_Model): + deadline_type: Optional[Union[str, RecurringScheduledActionsDeadlineType]] + execution_parameters: Optional[RecurringScheduledActionsExecutionParameters] + requested_days_of_the_month: Optional[list[int]] + requested_months: Optional[list[Union[str, Month]]] + requested_week_days: Optional[list[Union[str, WeekDay]]] + scheduled_time: time + time_zone: str + + @overload + def __init__( + self, + *, + deadline_type: Optional[Union[str, RecurringScheduledActionsDeadlineType]] = ..., + execution_parameters: Optional[RecurringScheduledActionsExecutionParameters] = ..., + requested_days_of_the_month: Optional[list[int]] = ..., + requested_months: Optional[list[Union[str, Month]]] = ..., + requested_week_days: Optional[list[Union[str, WeekDay]]] = ..., + scheduled_time: time, + time_zone: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledActionsScheduleUpdate(_Model): + deadline_type: Optional[Union[str, RecurringScheduledActionsDeadlineType]] + execution_parameters: Optional[RecurringScheduledActionsExecutionParameters] + requested_days_of_the_month: Optional[list[int]] + requested_months: Optional[list[Union[str, Month]]] + requested_week_days: Optional[list[Union[str, WeekDay]]] + scheduled_time: Optional[time] + time_zone: Optional[str] + + @overload + def __init__( + self, + *, + deadline_type: Optional[Union[str, RecurringScheduledActionsDeadlineType]] = ..., + execution_parameters: Optional[RecurringScheduledActionsExecutionParameters] = ..., + requested_days_of_the_month: Optional[list[int]] = ..., + requested_months: Optional[list[Union[str, Month]]] = ..., + requested_week_days: Optional[list[Union[str, WeekDay]]] = ..., + scheduled_time: Optional[time] = ..., + time_zone: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledEventsAdditionalPublishingTargets(_Model): + event_grid_and_resource_graph: Optional[EventGridAndResourceGraph] + + @overload + def __init__( + self, + *, + event_grid_and_resource_graph: Optional[EventGridAndResourceGraph] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledEventsPolicy(_Model): + all_instances_down: Optional[AllInstancesDown] + scheduled_events_additional_publishing_targets: Optional[ScheduledEventsAdditionalPublishingTargets] + user_initiated_reboot: Optional[UserInitiatedReboot] + user_initiated_redeploy: Optional[UserInitiatedRedeploy] + + @overload + def __init__( + self, + *, + all_instances_down: Optional[AllInstancesDown] = ..., + scheduled_events_additional_publishing_targets: Optional[ScheduledEventsAdditionalPublishingTargets] = ..., + user_initiated_reboot: Optional[UserInitiatedReboot] = ..., + user_initiated_redeploy: Optional[UserInitiatedRedeploy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ScheduledEventsProfile(_Model): + os_image_notification_profile: Optional[OSImageNotificationProfile] + terminate_notification_profile: Optional[TerminateNotificationProfile] + + @overload + def __init__( + self, + *, + os_image_notification_profile: Optional[OSImageNotificationProfile] = ..., + terminate_notification_profile: Optional[TerminateNotificationProfile] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.SecurityEncryptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISK_WITH_VM_GUEST_STATE = "DiskWithVMGuestState" + NON_PERSISTED_TPM = "NonPersistedTPM" + VM_GUEST_STATE_ONLY = "VMGuestStateOnly" + + + class azure.mgmt.compute.bulkaction.models.SecurityProfile(_Model): + encryption_at_host: Optional[bool] + encryption_identity: Optional[EncryptionIdentity] + proxy_agent_settings: Optional[ProxyAgentSettings] + security_type: Optional[Union[str, SecurityTypes]] + uefi_settings: Optional[UefiSettings] + + @overload + def __init__( + self, + *, + encryption_at_host: Optional[bool] = ..., + encryption_identity: Optional[EncryptionIdentity] = ..., + proxy_agent_settings: Optional[ProxyAgentSettings] = ..., + security_type: Optional[Union[str, SecurityTypes]] = ..., + uefi_settings: Optional[UefiSettings] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.SecurityTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CONFIDENTIAL_VM = "ConfidentialVM" + TRUSTED_LAUNCH = "TrustedLaunch" + + + class azure.mgmt.compute.bulkaction.models.SettingNames(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTO_LOGON = "AutoLogon" + FIRST_LOGON_COMMANDS = "FirstLogonCommands" + + + class azure.mgmt.compute.bulkaction.models.SshConfiguration(_Model): + public_keys: Optional[list[SshPublicKey]] + + @overload + def __init__( + self, + *, + public_keys: Optional[list[SshPublicKey]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.SshPublicKey(_Model): + key_data: Optional[str] + path: Optional[str] + + @overload + def __init__( + self, + *, + key_data: Optional[str] = ..., + path: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse(_Model): + description: str + location: str + results: Optional[list[ResourceOperation]] + type: str + + @overload + def __init__( + self, + *, + description: str, + location: str, + results: Optional[list[ResourceOperation]] = ..., + type: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.StorageAccountTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PREMIUM_LRS = "Premium_LRS" + PREMIUM_V2_LRS = "PremiumV2_LRS" + PREMIUM_ZRS = "Premium_ZRS" + STANDARD_LRS = "Standard_LRS" + STANDARD_SSD_LRS = "StandardSSD_LRS" + STANDARD_SSD_ZRS = "StandardSSD_ZRS" + ULTRA_SSD_LRS = "UltraSSD_LRS" + + + class azure.mgmt.compute.bulkaction.models.StorageProfile(_Model): + data_disks: Optional[list[DataDisk]] + disk_controller_type: Optional[Union[str, DiskControllerTypes]] + image_reference: Optional[ImageReference] + os_disk: Optional[OSDisk] + + @overload + def __init__( + self, + *, + data_disks: Optional[list[DataDisk]] = ..., + disk_controller_type: Optional[Union[str, DiskControllerTypes]] = ..., + image_reference: Optional[ImageReference] = ..., + os_disk: Optional[OSDisk] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.SubResource(_Model): + id: Optional[str] + + @overload + def __init__( + self, + *, + id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.SystemData(_Model): + created_at: Optional[datetime] + created_by: Optional[str] + created_by_type: Optional[Union[str, CreatedByType]] + last_modified_at: Optional[datetime] + last_modified_by: Optional[str] + last_modified_by_type: Optional[Union[str, CreatedByType]] + + @overload + def __init__( + self, + *, + created_at: Optional[datetime] = ..., + created_by: Optional[str] = ..., + created_by_type: Optional[Union[str, CreatedByType]] = ..., + last_modified_at: Optional[datetime] = ..., + last_modified_by: Optional[str] = ..., + last_modified_by_type: Optional[Union[str, CreatedByType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.TerminateNotificationProfile(_Model): + enable: Optional[bool] + not_before_timeout: Optional[str] + + @overload + def __init__( + self, + *, + enable: Optional[bool] = ..., + not_before_timeout: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.TrackedResource(Resource): + id: str + location: str + name: str + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.UefiSettings(_Model): + secure_boot_enabled: Optional[bool] + v_tpm_enabled: Optional[bool] + + @overload + def __init__( + self, + *, + secure_boot_enabled: Optional[bool] = ..., + v_tpm_enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.UserAssignedIdentitiesValue(_Model): + client_id: Optional[str] + principal_id: Optional[str] + + + class azure.mgmt.compute.bulkaction.models.UserAssignedIdentity(_Model): + client_id: Optional[str] + principal_id: Optional[str] + + + class azure.mgmt.compute.bulkaction.models.UserInitiatedReboot(_Model): + user_initiated_reboot_automatically_approve: Optional[bool] + + @overload + def __init__( + self, + *, + user_initiated_reboot_automatically_approve: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.UserInitiatedRedeploy(_Model): + user_initiated_redeploy_automatically_approve: Optional[bool] + + @overload + def __init__( + self, + *, + user_initiated_redeploy_automatically_approve: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxDouble(_Model): + max: Optional[float] + min: Optional[float] + + @overload + def __init__( + self, + *, + max: Optional[float] = ..., + min: Optional[float] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxInteger(_Model): + max: Optional[int] + min: Optional[int] + + @overload + def __init__( + self, + *, + max: Optional[int] = ..., + min: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VMAttributeSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EXCLUDED = "Excluded" + INCLUDED = "Included" + REQUIRED = "Required" + + + class azure.mgmt.compute.bulkaction.models.VMAttributes(_Model): + accelerator_count: Optional[VMAttributeMinMaxInteger] + accelerator_manufacturers: Optional[list[Union[str, AcceleratorManufacturer]]] + accelerator_support: Optional[Union[str, VMAttributeSupport]] + accelerator_types: Optional[list[Union[str, AcceleratorType]]] + allowed_vm_sizes: Optional[list[str]] + architecture_types: list[Union[str, ArchitectureType]] + burstable_support: Optional[Union[str, VMAttributeSupport]] + cpu_manufacturers: Optional[list[Union[str, CpuManufacturer]]] + data_disk_count: Optional[VMAttributeMinMaxInteger] + excluded_vm_sizes: Optional[list[str]] + hyper_v_generations: Optional[list[Union[str, HyperVGeneration]]] + local_storage_disk_types: Optional[list[Union[str, LocalStorageDiskType]]] + local_storage_in_gi_b: Optional[VMAttributeMinMaxDouble] + local_storage_support: Optional[Union[str, VMAttributeSupport]] + memory_in_gi_b: VMAttributeMinMaxDouble + memory_in_gi_b_per_v_cpu: Optional[VMAttributeMinMaxDouble] + network_bandwidth_in_mbps: Optional[VMAttributeMinMaxDouble] + network_interface_count: Optional[VMAttributeMinMaxInteger] + rdma_network_interface_count: Optional[VMAttributeMinMaxInteger] + rdma_support: Optional[Union[str, VMAttributeSupport]] + v_cpu_count: VMAttributeMinMaxInteger + vm_categories: Optional[list[Union[str, VMCategory]]] + + @overload + def __init__( + self, + *, + accelerator_count: Optional[VMAttributeMinMaxInteger] = ..., + accelerator_manufacturers: Optional[list[Union[str, AcceleratorManufacturer]]] = ..., + accelerator_support: Optional[Union[str, VMAttributeSupport]] = ..., + accelerator_types: Optional[list[Union[str, AcceleratorType]]] = ..., + allowed_vm_sizes: Optional[list[str]] = ..., + architecture_types: list[Union[str, ArchitectureType]], + burstable_support: Optional[Union[str, VMAttributeSupport]] = ..., + cpu_manufacturers: Optional[list[Union[str, CpuManufacturer]]] = ..., + data_disk_count: Optional[VMAttributeMinMaxInteger] = ..., + excluded_vm_sizes: Optional[list[str]] = ..., + hyper_v_generations: Optional[list[Union[str, HyperVGeneration]]] = ..., + local_storage_disk_types: Optional[list[Union[str, LocalStorageDiskType]]] = ..., + local_storage_in_gi_b: Optional[VMAttributeMinMaxDouble] = ..., + local_storage_support: Optional[Union[str, VMAttributeSupport]] = ..., + memory_in_gi_b: VMAttributeMinMaxDouble, + memory_in_gi_b_per_v_cpu: Optional[VMAttributeMinMaxDouble] = ..., + network_bandwidth_in_mbps: Optional[VMAttributeMinMaxDouble] = ..., + network_interface_count: Optional[VMAttributeMinMaxInteger] = ..., + rdma_network_interface_count: Optional[VMAttributeMinMaxInteger] = ..., + rdma_support: Optional[Union[str, VMAttributeSupport]] = ..., + v_cpu_count: VMAttributeMinMaxInteger, + vm_categories: Optional[list[Union[str, VMCategory]]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VMCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + COMPUTE_OPTIMIZED = "ComputeOptimized" + FPGA_ACCELERATED = "FpgaAccelerated" + GENERAL_PURPOSE = "GeneralPurpose" + GPU_ACCELERATED = "GpuAccelerated" + HIGH_PERFORMANCE_COMPUTE = "HighPerformanceCompute" + MEMORY_OPTIMIZED = "MemoryOptimized" + STORAGE_OPTIMIZED = "StorageOptimized" + + + class azure.mgmt.compute.bulkaction.models.VMDiskSecurityProfile(_Model): + disk_encryption_set: Optional[DiskEncryptionSetParametersContent] + security_encryption_type: Optional[Union[str, SecurityEncryptionTypes]] + + @overload + def __init__( + self, + *, + disk_encryption_set: Optional[DiskEncryptionSetParametersContent] = ..., + security_encryption_type: Optional[Union[str, SecurityEncryptionTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VMGalleryApplication(_Model): + configuration_reference: Optional[str] + enable_automatic_upgrade: Optional[bool] + order: Optional[int] + package_reference_id: str + tags: Optional[str] + treat_failure_as_deployment_failure: Optional[bool] + + @overload + def __init__( + self, + *, + configuration_reference: Optional[str] = ..., + enable_automatic_upgrade: Optional[bool] = ..., + order: Optional[int] = ..., + package_reference_id: str, + tags: Optional[str] = ..., + treat_failure_as_deployment_failure: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VMOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CANCELLING = "Cancelling" + CANCEL_FAILED_STATUS_UNKNOWN = "CancelFailedStatusUnknown" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.compute.bulkaction.models.VaultCertificate(_Model): + certificate_store: Optional[str] + certificate_url: Optional[str] + + @overload + def __init__( + self, + *, + certificate_store: Optional[str] = ..., + certificate_url: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VaultSecretGroup(_Model): + source_vault: Optional[SubResource] + vault_certificates: Optional[list[VaultCertificate]] + + @overload + def __init__( + self, + *, + source_vault: Optional[SubResource] = ..., + vault_certificates: Optional[list[VaultCertificate]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualHardDisk(_Model): + uri: Optional[str] + + @overload + def __init__( + self, + *, + uri: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachine(_Model): + error: Optional[ApiError] + id: str + name: str + operation_status: Union[str, VMOperationStatus] + type: Optional[str] + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineIdentity(_Model): + principal_id: Optional[str] + tenant_id: Optional[str] + type: Optional[Union[str, ResourceIdentityType]] + user_assigned_identities: Optional[dict[str, UserAssignedIdentitiesValue]] + + @overload + def __init__( + self, + *, + type: Optional[Union[str, ResourceIdentityType]] = ..., + user_assigned_identities: Optional[dict[str, UserAssignedIdentitiesValue]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineInfo(_Model): + vm_size: Optional[str] + zone: Optional[str] + + @overload + def __init__( + self, + *, + vm_size: Optional[str] = ..., + zone: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineIpTag(_Model): + ip_tag_type: Optional[str] + tag: Optional[str] + + @overload + def __init__( + self, + *, + ip_tag_type: Optional[str] = ..., + tag: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceConfiguration(_Model): + name: str + properties: Optional[VirtualMachineNetworkInterfaceConfigurationProperties] + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + name: str, + properties: Optional[VirtualMachineNetworkInterfaceConfigurationProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceConfigurationProperties(_Model): + auxiliary_mode: Optional[Union[str, NetworkInterfaceAuxiliaryMode]] + auxiliary_sku: Optional[Union[str, NetworkInterfaceAuxiliarySku]] + delete_option: Optional[Union[str, DeleteOptions]] + disable_tcp_state_tracking: Optional[bool] + dns_settings: Optional[VirtualMachineNetworkInterfaceDnsSettingsConfiguration] + dscp_configuration: Optional[SubResource] + enable_accelerated_networking: Optional[bool] + enable_fpga: Optional[bool] + enable_ip_forwarding: Optional[bool] + ip_configurations: list[VirtualMachineNetworkInterfaceIPConfiguration] + network_security_group: Optional[SubResource] + primary: Optional[bool] + + @overload + def __init__( + self, + *, + auxiliary_mode: Optional[Union[str, NetworkInterfaceAuxiliaryMode]] = ..., + auxiliary_sku: Optional[Union[str, NetworkInterfaceAuxiliarySku]] = ..., + delete_option: Optional[Union[str, DeleteOptions]] = ..., + disable_tcp_state_tracking: Optional[bool] = ..., + dns_settings: Optional[VirtualMachineNetworkInterfaceDnsSettingsConfiguration] = ..., + dscp_configuration: Optional[SubResource] = ..., + enable_accelerated_networking: Optional[bool] = ..., + enable_fpga: Optional[bool] = ..., + enable_ip_forwarding: Optional[bool] = ..., + ip_configurations: list[VirtualMachineNetworkInterfaceIPConfiguration], + network_security_group: Optional[SubResource] = ..., + primary: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration(_Model): + dns_servers: Optional[list[str]] + + @overload + def __init__( + self, + *, + dns_servers: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceIPConfiguration(_Model): + name: str + properties: Optional[VirtualMachineNetworkInterfaceIPConfigurationProperties] + + @overload + def __init__( + self, + *, + name: str, + properties: Optional[VirtualMachineNetworkInterfaceIPConfigurationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceIPConfigurationProperties(_Model): + application_gateway_backend_address_pools: Optional[list[SubResource]] + application_security_groups: Optional[list[SubResource]] + load_balancer_backend_address_pools: Optional[list[SubResource]] + primary: Optional[bool] + private_ip_address_version: Optional[Union[str, IPVersions]] + public_ip_address_configuration: Optional[VirtualMachinePublicIPAddressConfiguration] + subnet: Optional[SubResource] + + @overload + def __init__( + self, + *, + application_gateway_backend_address_pools: Optional[list[SubResource]] = ..., + application_security_groups: Optional[list[SubResource]] = ..., + load_balancer_backend_address_pools: Optional[list[SubResource]] = ..., + primary: Optional[bool] = ..., + private_ip_address_version: Optional[Union[str, IPVersions]] = ..., + public_ip_address_configuration: Optional[VirtualMachinePublicIPAddressConfiguration] = ..., + subnet: Optional[SubResource] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressConfiguration(_Model): + name: str + properties: Optional[VirtualMachinePublicIPAddressConfigurationProperties] + sku: Optional[PublicIPAddressSku] + tags: Optional[dict[str, str]] + + @overload + def __init__( + self, + *, + name: str, + properties: Optional[VirtualMachinePublicIPAddressConfigurationProperties] = ..., + sku: Optional[PublicIPAddressSku] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressConfigurationProperties(_Model): + delete_option: Optional[Union[str, DeleteOptions]] + dns_settings: Optional[VirtualMachinePublicIPAddressDnsSettingsConfiguration] + idle_timeout_in_minutes: Optional[int] + ip_tags: Optional[list[VirtualMachineIpTag]] + public_ip_address_version: Optional[Union[str, IPVersions]] + public_ip_allocation_method: Optional[Union[str, PublicIPAllocationMethod]] + public_ip_prefix: Optional[SubResource] + + @overload + def __init__( + self, + *, + delete_option: Optional[Union[str, DeleteOptions]] = ..., + dns_settings: Optional[VirtualMachinePublicIPAddressDnsSettingsConfiguration] = ..., + idle_timeout_in_minutes: Optional[int] = ..., + ip_tags: Optional[list[VirtualMachineIpTag]] = ..., + public_ip_address_version: Optional[Union[str, IPVersions]] = ..., + public_ip_allocation_method: Optional[Union[str, PublicIPAllocationMethod]] = ..., + public_ip_prefix: Optional[SubResource] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration(_Model): + domain_name_label: str + domain_name_label_scope: Optional[Union[str, DomainNameLabelScopeTypes]] + + @overload + def __init__( + self, + *, + domain_name_label: str, + domain_name_label_scope: Optional[Union[str, DomainNameLabelScopeTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VirtualMachineReimageParameters(_Model): + exact_version: Optional[str] + os_profile: Optional[OSProfileProvisioningData] + temp_disk: Optional[bool] + + @overload + def __init__( + self, + *, + exact_version: Optional[str] = ..., + os_profile: Optional[OSProfileProvisioningData] = ..., + temp_disk: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VmSizeProfile(_Model): + name: str + rank: int + + @overload + def __init__( + self, + *, + name: str, + rank: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.VmSizeProperties(_Model): + v_cpus_available: Optional[int] + v_cpus_per_core: Optional[int] + + @overload + def __init__( + self, + *, + v_cpus_available: Optional[int] = ..., + v_cpus_per_core: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "All" + FRIDAY = "Friday" + MONDAY = "Monday" + SATURDAY = "Saturday" + SUNDAY = "Sunday" + THURSDAY = "Thursday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + + + class azure.mgmt.compute.bulkaction.models.WinRMConfiguration(_Model): + listeners: Optional[list[WinRMListener]] + + @overload + def __init__( + self, + *, + listeners: Optional[list[WinRMListener]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.WinRMListener(_Model): + certificate_url: Optional[str] + protocol: Optional[Union[str, ProtocolTypes]] + + @overload + def __init__( + self, + *, + certificate_url: Optional[str] = ..., + protocol: Optional[Union[str, ProtocolTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.WindowsConfiguration(_Model): + additional_unattend_content: Optional[list[AdditionalUnattendContent]] + enable_automatic_updates: Optional[bool] + patch_settings: Optional[PatchSettings] + provision_vm_agent: Optional[bool] + time_zone: Optional[str] + win_rm: Optional[WinRMConfiguration] @overload def __init__( self, *, - execution_parameters: ExecutionParameters, - resources: Resources + additional_unattend_content: Optional[list[AdditionalUnattendContent]] = ..., + enable_automatic_updates: Optional[bool] = ..., + patch_settings: Optional[PatchSettings] = ..., + provision_vm_agent: Optional[bool] = ..., + time_zone: Optional[str] = ..., + win_rm: Optional[WinRMConfiguration] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent(_Model): - execution_parameters: ExecutionParameters - force_deletion: Optional[bool] - resources: Resources + class azure.mgmt.compute.bulkaction.models.WindowsPatchAssessmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + IMAGE_DEFAULT = "ImageDefault" + + + class azure.mgmt.compute.bulkaction.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALWAYS = "Always" + IF_REQUIRED = "IfRequired" + NEVER = "Never" + UNKNOWN = "Unknown" + + + class azure.mgmt.compute.bulkaction.models.WindowsVMGuestPatchAutomaticByPlatformSettings(_Model): + bypass_platform_safety_checks_on_user_schedule: Optional[bool] + reboot_setting: Optional[Union[str, WindowsVMGuestPatchAutomaticByPlatformRebootSetting]] @overload def __init__( self, *, - execution_parameters: ExecutionParameters, - force_deletion: Optional[bool] = ..., - resources: Resources + bypass_platform_safety_checks_on_user_schedule: Optional[bool] = ..., + reboot_setting: Optional[Union[str, WindowsVMGuestPatchAutomaticByPlatformRebootSetting]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.compute.bulkaction.models.ExecuteHibernateContent(_Model): - execution_parameters: ExecutionParameters - resources: Resources + class azure.mgmt.compute.bulkaction.models.WindowsVMGuestPatchMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTOMATIC_BY_OS = "AutomaticByOS" + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + MANUAL = "Manual" + + + class azure.mgmt.compute.bulkaction.models.ZoneAllocationPolicy(_Model): + distribution_strategy: Optional[Union[str, DistributionStrategy]] + zone_preferences: Optional[list[ZonePreference]] @overload def __init__( self, *, - execution_parameters: ExecutionParameters, - resources: Resources + distribution_strategy: Optional[Union[str, DistributionStrategy]] = ..., + zone_preferences: Optional[list[ZonePreference]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.compute.bulkaction.models.ZonePreference(_Model): + rank: int + zone: str + + @overload + def __init__( + self, + *, + rank: int, + zone: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.compute.bulkaction.models.ExecuteStartContent(_Model): - execution_parameters: ExecutionParameters - resources: Resources +namespace azure.mgmt.compute.bulkaction.operations + + class azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name']}, api_versions_list=['2026-07-06-preview']) + def begin_cancel( + self, + resource_group_name: str, + location: str, + name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: LocationBasedBulkCreateCustom, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[LocationBasedBulkCreateCustom]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: LocationBasedBulkCreateCustom, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[LocationBasedBulkCreateCustom]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[LocationBasedBulkCreateCustom]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'delete_instances']}, api_versions_list=['2026-07-06-preview']) + def begin_delete( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = ..., + **kwargs: Any + ) -> LROPoller[None]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def get( + self, + resource_group_name: str, + location: str, + name: str, + **kwargs: Any + ) -> LocationBasedBulkCreateCustom: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'async_operation_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def get_async_operation_status( + self, + location: str, + async_operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_resource_group( + self, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> ItemPaged[LocationBasedBulkCreateCustom]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_subscription( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[LocationBasedBulkCreateCustom]: ... + + + class azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name']}, api_versions_list=['2026-07-06-preview']) + def begin_cancel( + self, + resource_group_name: str, + location: str, + name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: LocationBasedLaunchBulkInstancesOperation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[LocationBasedLaunchBulkInstancesOperation]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: LocationBasedLaunchBulkInstancesOperation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[LocationBasedLaunchBulkInstancesOperation]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[LocationBasedLaunchBulkInstancesOperation]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'delete_instances']}, api_versions_list=['2026-07-06-preview']) + def begin_delete( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = ..., + **kwargs: Any + ) -> LROPoller[None]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def get( + self, + resource_group_name: str, + location: str, + name: str, + **kwargs: Any + ) -> LocationBasedLaunchBulkInstancesOperation: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'async_operation_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def get_operation_status( + self, + location: str, + async_operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_resource_group( + self, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> ItemPaged[LocationBasedLaunchBulkInstancesOperation]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_subscription( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[LocationBasedLaunchBulkInstancesOperation]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'name', 'filter', 'skiptoken', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_virtual_machines( + self, + resource_group_name: str, + location: str, + name: str, + *, + filter: Optional[str] = ..., + skiptoken: Optional[str] = ..., + **kwargs: Any + ) -> ItemPaged[VirtualMachine]: ... + + + class azure.mgmt.compute.bulkaction.operations.OccurrenceExtensionOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'resource_uri', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_occurrence_by_vms( + self, + resource_uri: str, + **kwargs: Any + ) -> ItemPaged[OccurrenceExtensionResource]: ... + + + class azure.mgmt.compute.bulkaction.operations.OccurrencesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_cancel( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... + + @overload + def begin_cancel( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... + + @overload + def begin_cancel( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... + + @overload + def begin_delay( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: DelayRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... + + @overload + def begin_delay( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: DelayRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... + + @overload + def begin_delay( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'occurrence_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def get( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + **kwargs: Any + ) -> Occurrence: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_scheduled_action( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> ItemPaged[Occurrence]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'occurrence_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + **kwargs: Any + ) -> ItemPaged[OccurrenceResource]: ... + + + class azure.mgmt.compute.bulkaction.operations.Operations: - @overload def __init__( self, - *, - execution_parameters: ExecutionParameters, - resources: Resources + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged[Operation]: ... - class azure.mgmt.compute.bulkaction.models.ExecutionParameters(_Model): - retry_policy: Optional[RetryPolicy] + class azure.mgmt.compute.bulkaction.operations.ScheduledActionExtensionOperations: - @overload def __init__( self, - *, - retry_policy: Optional[RetryPolicy] = ... + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'resource_uri', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_vms( + self, + resource_uri: str, + **kwargs: Any + ) -> ItemPaged[ScheduledActionResources]: ... - class azure.mgmt.compute.bulkaction.models.FallbackOperationInfo(_Model): - error: Optional[ResourceOperationError] - last_op_type: Union[str, ResourceOperationType] - status: str + class azure.mgmt.compute.bulkaction.operations.ScheduledActionOperationStatusOperations: - @overload def __init__( self, - *, - error: Optional[ResourceOperationError] = ..., - last_op_type: Union[str, ResourceOperationType], - status: str + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'location', 'operation_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def get( + self, + location: str, + operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... - class azure.mgmt.compute.bulkaction.models.GetOperationStatusContent(_Model): - operation_ids: list[str] + class azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations: - @overload def __init__( self, - *, - operation_ids: list[str] + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse(_Model): - results: list[ResourceOperation] + def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceAttachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__( + def begin_attach_resources( self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceAttachRequest, *, - results: list[ResourceOperation] - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse(_Model): - description: str - location: str - results: Optional[list[ResourceOperation]] - type: str + def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__( + def begin_cancel_next_occurrence( self, + resource_group_name: str, + scheduled_action_name: str, + body: CancelOccurrenceRequest, *, - description: str, - location: str, - results: Optional[list[ResourceOperation]] = ..., - type: str - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.Operation(_Model): - action_type: Optional[Union[str, ActionType]] - display: Optional[OperationDisplay] - is_data_action: Optional[bool] - name: Optional[str] - origin: Optional[Union[str, Origin]] + def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__( + def begin_cancel_next_occurrence( self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], *, - display: Optional[OperationDisplay] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.OperationDisplay(_Model): - description: Optional[str] - operation: Optional[str] - provider: Optional[str] - resource: Optional[str] - - - class azure.mgmt.compute.bulkaction.models.OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BLOCKED = "Blocked" - CANCELLED = "Cancelled" - EXECUTING = "Executing" - FAILED = "Failed" - PENDING_EXECUTION = "PendingExecution" - PENDING_SCHEDULING = "PendingScheduling" - SCHEDULED = "Scheduled" - SUCCEEDED = "Succeeded" - UNKNOWN = "Unknown" - - - class azure.mgmt.compute.bulkaction.models.Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): - SYSTEM = "system" - USER = "user" - USER_SYSTEM = "user,system" - - - class azure.mgmt.compute.bulkaction.models.ResourceOperation(_Model): - error_code: Optional[str] - error_details: Optional[str] - operation: Optional[ResourceOperationDetails] - resource_id: Optional[str] + def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: ScheduledAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ScheduledAction]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + scheduled_action_name: str, + resource: ScheduledAction, *, - error_code: Optional[str] = ..., - error_details: Optional[str] = ..., - operation: Optional[ResourceOperationDetails] = ..., - resource_id: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ScheduledAction]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ScheduledAction]: ... - class azure.mgmt.compute.bulkaction.models.ResourceOperationDetails(_Model): - completed_at: Optional[datetime] - deadline: Optional[datetime] - deadline_type: Optional[Union[str, DeadlineType]] - fallback_operation_info: Optional[FallbackOperationInfo] - op_type: Optional[Union[str, ResourceOperationType]] - operation_id: str - resource_id: Optional[str] - resource_operation_error: Optional[ResourceOperationError] - retry_policy: Optional[RetryPolicy] - state: Optional[Union[str, OperationState]] - subscription_id: Optional[str] - timezone: Optional[str] + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name']}, api_versions_list=['2026-07-06-preview']) + def begin_delete( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_detach_resources( self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceDetachRequest, *, - completed_at: Optional[datetime] = ..., - deadline: Optional[datetime] = ..., - deadline_type: Optional[Union[str, DeadlineType]] = ..., - fallback_operation_info: Optional[FallbackOperationInfo] = ..., - op_type: Optional[Union[str, ResourceOperationType]] = ..., - operation_id: str, - resource_id: Optional[str] = ..., - resource_operation_error: Optional[ResourceOperationError] = ..., - retry_policy: Optional[RetryPolicy] = ..., - state: Optional[Union[str, OperationState]] = ..., - subscription_id: Optional[str] = ..., - timezone: Optional[str] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.ResourceOperationError(_Model): - error_code: str - error_details: str + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__( + def begin_detach_resources( self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourceDetachRequest, *, - error_code: str, - error_details: str - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceOperationResponse]: ... - class azure.mgmt.compute.bulkaction.models.ResourceOperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CREATE = "Create" - DEALLOCATE = "Deallocate" - DELETE = "Delete" - HIBERNATE = "Hibernate" - START = "Start" - UNKNOWN = "Unknown" + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name']}, api_versions_list=['2026-07-06-preview']) + def begin_disable( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name']}, api_versions_list=['2026-07-06-preview']) + def begin_enable( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.compute.bulkaction.models.Resources(_Model): - ids: list[str] + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def begin_trigger_manual_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> LROPoller[Occurrence]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + scheduled_action_name: str, + properties: ScheduledActionUpdate, *, - ids: list[str] - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.compute.bulkaction.models.RetryPolicy(_Model): - on_failure_action: Optional[Union[str, ResourceOperationType]] - retry_count: Optional[int] - retry_window_in_minutes: Optional[int] + def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: ScheduledActionUpdate, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_update( self, + resource_group_name: str, + scheduled_action_name: str, + properties: IO[bytes], *, - on_failure_action: Optional[Union[str, ResourceOperationType]] = ..., - retry_count: Optional[int] = ..., - retry_window_in_minutes: Optional[int] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def get( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> ScheduledAction: ... + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> ItemPaged[ScheduledAction]: ... - class azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse(_Model): - description: str - location: str - results: Optional[list[ResourceOperation]] - type: str + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_by_subscription(self, **kwargs: Any) -> ItemPaged[ScheduledAction]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'scheduled_action_name', 'accept']}, api_versions_list=['2026-07-06-preview']) + def list_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + **kwargs: Any + ) -> ItemPaged[ScheduledActionResource]: ... @overload - def __init__( + def patch_resources( self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourcePatchRequest, *, - description: str, - location: str, - results: Optional[list[ResourceOperation]] = ..., - type: str - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceOperationResponse: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: ResourcePatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceOperationResponse: ... + @overload + def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceOperationResponse: ... -namespace azure.mgmt.compute.bulkaction.operations - class azure.mgmt.compute.bulkaction.operations.Operations: + class azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations: def __init__( self, @@ -715,17 +5298,38 @@ namespace azure.mgmt.compute.bulkaction.operations **kwargs ) -> None: ... - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged[Operation]: ... - + @overload + def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AcknowledgeBulkOperationErrorsResponse: ... - class azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations: + @overload + def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AcknowledgeBulkOperationErrorsResponse: ... - def __init__( + @overload + def bulk_acknowledge_operation_errors( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + location: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AcknowledgeBulkOperationErrorsResponse: ... @overload def bulk_cancel_operations( @@ -760,6 +5364,39 @@ namespace azure.mgmt.compute.bulkaction.operations **kwargs: Any ) -> CancelOperationsResponse: ... + @overload + def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteCreateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteCreateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + @overload def bulk_deallocate_operation( self, @@ -892,6 +5529,50 @@ namespace azure.mgmt.compute.bulkaction.operations **kwargs: Any ) -> HibernateResourceOperationResponse: ... + @distributed_trace + @api_version_validation(method_added_on='2026-07-06-preview', params_added_on={'2026-07-06-preview': ['api_version', 'subscription_id', 'resource_group_name', 'location', 'lookback_in_minutes', 'accept']}, api_versions_list=['2026-07-06-preview']) + def bulk_list_operation_errors( + self, + resource_group_name: str, + location: str, + *, + lookback_in_minutes: Optional[int] = ..., + **kwargs: Any + ) -> ItemPaged[ResourceOperation]: ... + + @overload + def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ReimageResourceOperationResponse: ... + + @overload + def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ReimageResourceOperationResponse: ... + + @overload + def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ReimageResourceOperationResponse: ... + @overload def bulk_start_operation( self, @@ -925,47 +5606,411 @@ namespace azure.mgmt.compute.bulkaction.operations **kwargs: Any ) -> StartResourceOperationResponse: ... + @overload + def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteVdiCreateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: ExecuteVdiCreateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + + @overload + def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CreateResourceOperationResponse: ... + namespace azure.mgmt.compute.bulkaction.types + class azure.mgmt.compute.bulkaction.types.AcknowledgeBulkOperationErrorsRequest(TypedDict, total=False): + key "operationIds": Required[list[str]] + operation_ids: list[str] + + + class azure.mgmt.compute.bulkaction.types.AdditionalCapabilities(TypedDict, total=False): + key "hibernationEnabled": bool + key "ultraSSDEnabled": bool + hibernation_enabled: bool + ultra_ssd_enabled: bool + + + class azure.mgmt.compute.bulkaction.types.AdditionalUnattendContent(TypedDict, total=False): + key "componentName": Literal["Microsoft-Windows-Shell-Setup"] + key "content": str + key "passName": Literal["OobeSystem"] + key "settingName": Union[str, SettingNames] + component_name: Literal[Microsoft-Windows-Shell-Setup] + content: str + pass_name: Literal[OobeSystem] + setting_name: Union[str, SettingNames] + + + class azure.mgmt.compute.bulkaction.types.AllInstancesDown(TypedDict, total=False): + key "automaticallyApprove": bool + all_instances_down_automatically_approve: bool + + + class azure.mgmt.compute.bulkaction.types.ApiEntityReference(TypedDict, total=False): + key "id": str + id: str + + + class azure.mgmt.compute.bulkaction.types.ApplicationProfile(TypedDict, total=False): + galleryApplications: list[VMGalleryApplication] + gallery_applications: list[VMGalleryApplication] + + + class azure.mgmt.compute.bulkaction.types.BootDiagnostics(TypedDict, total=False): + key "enabled": bool + key "storageUri": str + enabled: bool + storage_uri: str + + + class azure.mgmt.compute.bulkaction.types.BulkActionVmExtensionProperties(TypedDict, total=False): + key "autoUpgradeMinorVersion": bool + key "enableAutomaticUpgrade": bool + key "forceUpdateTag": str + key "protectedSettingsFromKeyVault": ForwardRef('KeyVaultSecretReference', module='types') + key "publisher": str + key "suppressFailures": bool + key "type": str + key "typeHandlerVersion": str + auto_upgrade_minor_version: bool + enable_automatic_upgrade: bool + force_update_tag: str + protectedSettings: dict[str, Any] + protected_settings: dict[str, Any] + protected_settings_from_key_vault: KeyVaultSecretReference + provisionAfterExtensions: list[str] + provision_after_extensions: list[str] + publisher: str + settings: dict[str, Any] + suppress_failures: bool + type: str + type_handler_version: str + + + class azure.mgmt.compute.bulkaction.types.BulkCreateCustomOverride(TypedDict, total=False): + key "identity": ForwardRef('VirtualMachineIdentity', module='types') + key "plan": ForwardRef('Plan', module='types') + key "virtualMachineName": str + key "virtualMachineProfile": ForwardRef('BulkactionVMProperties', module='types') + extensions: list[BulkactionVMExtension] + identity: VirtualMachineIdentity + plan: Plan + tags: dict[str, str] + virtual_machine_name: str + virtual_machine_profile: BulkactionVMProperties + + + class azure.mgmt.compute.bulkaction.types.BulkCreateCustomOverrideBase(TypedDict, total=False): + key "identity": ForwardRef('VirtualMachineIdentity', module='types') + key "plan": ForwardRef('Plan', module='types') + key "virtualMachineProfile": ForwardRef('BulkactionVMProperties', module='types') + extensions: list[BulkactionVMExtension] + identity: VirtualMachineIdentity + plan: Plan + tags: dict[str, str] + virtual_machine_profile: BulkactionVMProperties + + + class azure.mgmt.compute.bulkaction.types.BulkCreateCustomOverridesProfile(TypedDict, total=False): + key "virtualMachineNamePrefix": str + overrides: list[BulkCreateCustomOverride] + virtual_machine_name_prefix: str + + + class azure.mgmt.compute.bulkaction.types.BulkCreateCustomPriorityProfile(TypedDict, total=False): + key "allocationStrategy": Union[str, BulkCreateCustomAllocationStrategy] + key "evictionPolicy": Union[str, EvictionPolicy] + key "maxPricePerVM": float + key "type": Union[str, PriorityType] + allocation_strategy: Union[str, BulkCreateCustomAllocationStrategy] + eviction_policy: Union[str, EvictionPolicy] + max_price_per_vm: float + type: Union[str, PriorityType] + + + class azure.mgmt.compute.bulkaction.types.BulkCreateCustomProperties(TypedDict, total=False): + key "capacity": Required[int] + key "capacityType": Union[str, CapacityType] + key "computeProfile": Required[ComputeProfile] + key "createdTime": str + key "executionParameters": ForwardRef('ExecutionParameters', module='types') + key "overridesProfile": ForwardRef('BulkCreateCustomOverridesProfile', module='types') + key "priorityProfile": Required[BulkCreateCustomPriorityProfile] + key "provisioningState": Union[str, ProvisioningState] + key "zoneAllocationPolicy": ForwardRef('BulkCreateCustomZoneAllocationPolicy', module='types') + capacity: int + capacity_type: Union[str, CapacityType] + compute_profile: ComputeProfile + created_time: str + execution_parameters: ExecutionParameters + overrides_profile: BulkCreateCustomOverridesProfile + priority_profile: BulkCreateCustomPriorityProfile + provisioning_state: Union[str, ProvisioningState] + vmSizesProfile: list[BulkCreateCustomVmSizeProfile] + vm_sizes_profile: list[BulkCreateCustomVmSizeProfile] + zone_allocation_policy: BulkCreateCustomZoneAllocationPolicy + + + class azure.mgmt.compute.bulkaction.types.BulkCreateCustomVmSizeProfile(TypedDict, total=False): + key "name": Required[str] + key "override": ForwardRef('BulkCreateCustomOverrideBase', module='types') + key "rank": Required[int] + name: str + override: BulkCreateCustomOverrideBase + rank: int + + + class azure.mgmt.compute.bulkaction.types.BulkCreateCustomZoneAllocationPolicy(TypedDict, total=False): + key "distributionStrategy": Union[str, BulkCreateCustomDistributionStrategy] + distribution_strategy: Union[str, BulkCreateCustomDistributionStrategy] + zonePreferences: list[ZonePreference] + zone_preferences: list[ZonePreference] + + + class azure.mgmt.compute.bulkaction.types.BulkactionVMExtension(TypedDict, total=False): + key "name": Required[str] + key "properties": Required[BulkActionVmExtensionProperties] + name: str + properties: BulkActionVmExtensionProperties + + + class azure.mgmt.compute.bulkaction.types.BulkactionVMProperties(TypedDict, total=False): + key "additionalCapabilities": ForwardRef('AdditionalCapabilities', module='types') + key "applicationProfile": ForwardRef('ApplicationProfile', module='types') + key "capacityReservation": ForwardRef('CapacityReservationProfile', module='types') + key "diagnosticsProfile": ForwardRef('DiagnosticsProfile', module='types') + key "extensionsTimeBudget": str + key "hardwareProfile": ForwardRef('HardwareProfile', module='types') + key "licenseType": str + key "networkProfile": ForwardRef('NetworkProfile', module='types') + key "osProfile": ForwardRef('OSProfile', module='types') + key "scheduledEventsPolicy": ForwardRef('ScheduledEventsPolicy', module='types') + key "scheduledEventsProfile": ForwardRef('ScheduledEventsProfile', module='types') + key "securityProfile": ForwardRef('SecurityProfile', module='types') + key "storageProfile": ForwardRef('StorageProfile', module='types') + key "userData": str + additional_capabilities: AdditionalCapabilities + application_profile: ApplicationProfile + capacity_reservation: CapacityReservationProfile + diagnostics_profile: DiagnosticsProfile + extensions_time_budget: str + hardware_profile: HardwareProfile + license_type: str + network_profile: NetworkProfile + os_profile: OSProfile + scheduled_events_policy: ScheduledEventsPolicy + scheduled_events_profile: ScheduledEventsProfile + security_profile: SecurityProfile + storage_profile: StorageProfile + user_data: str + vmExtensions: list[BulkactionVMExtension] + vm_extensions: list[BulkactionVMExtension] + + + class azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest(TypedDict, total=False): + key "resourceIds": Required[list[str]] + resource_ids: list[str] + + class azure.mgmt.compute.bulkaction.types.CancelOperationsContent(TypedDict, total=False): key "operationIds": Required[list[str]] operation_ids: list[str] + class azure.mgmt.compute.bulkaction.types.CapacityReservationProfile(TypedDict, total=False): + key "capacityReservationGroup": ForwardRef('SubResource', module='types') + capacity_reservation_group: SubResource + + + class azure.mgmt.compute.bulkaction.types.ComputeProfile(TypedDict, total=False): + key "computeApiVersion": str + key "virtualMachineProfile": Required[BulkactionVMProperties] + compute_api_version: str + extensions: list[BulkactionVMExtension] + virtual_machine_profile: BulkactionVMProperties + + + class azure.mgmt.compute.bulkaction.types.DataDisk(TypedDict, total=False): + key "caching": Union[str, CachingTypes] + key "createOption": Required[Union[str, DiskCreateOptionTypes]] + key "deleteOption": Union[str, DiskDeleteOptionTypes] + key "detachOption": Union[str, DiskDetachOptionTypes] + key "diskSizeGB": int + key "image": ForwardRef('VirtualHardDisk', module='types') + key "lun": Required[int] + key "managedDisk": ForwardRef('ManagedDiskParametersContent', module='types') + key "name": str + key "sourceResource": ForwardRef('ApiEntityReference', module='types') + key "toBeDetached": bool + key "vhd": ForwardRef('VirtualHardDisk', module='types') + key "writeAcceleratorEnabled": bool + caching: Union[str, CachingTypes] + create_option: Union[str, DiskCreateOptionTypes] + delete_option: Union[str, DiskDeleteOptionTypes] + detach_option: Union[str, DiskDetachOptionTypes] + disk_size_gb: int + image: VirtualHardDisk + lun: int + managed_disk: ManagedDiskParametersContent + name: str + source_resource: ApiEntityReference + to_be_detached: bool + vhd: VirtualHardDisk + write_accelerator_enabled: bool + + + class azure.mgmt.compute.bulkaction.types.DelayRequest(TypedDict, total=False): + key "delay": Required[str] + key "resourceIds": Required[list[str]] + delay: str + resource_ids: list[str] + + + class azure.mgmt.compute.bulkaction.types.DiagnosticsProfile(TypedDict, total=False): + key "bootDiagnostics": ForwardRef('BootDiagnostics', module='types') + boot_diagnostics: BootDiagnostics + + + class azure.mgmt.compute.bulkaction.types.DiffDiskSettings(TypedDict, total=False): + key "option": Union[str, DiffDiskOptions] + key "placement": Union[str, DiffDiskPlacement] + option: Union[str, DiffDiskOptions] + placement: Union[str, DiffDiskPlacement] + + + class azure.mgmt.compute.bulkaction.types.DiskEncryptionSetParametersContent(SubResource): + key "id": str + id: str + + + class azure.mgmt.compute.bulkaction.types.DiskEncryptionSettings(TypedDict, total=False): + key "diskEncryptionKey": ForwardRef('KeyVaultSecretReference', module='types') + key "enabled": bool + key "keyEncryptionKey": ForwardRef('KeyVaultKeyReference', module='types') + disk_encryption_key: KeyVaultSecretReference + enabled: bool + key_encryption_key: KeyVaultKeyReference + + + class azure.mgmt.compute.bulkaction.types.EncryptionIdentity(TypedDict, total=False): + key "userAssignedIdentityResourceId": str + user_assigned_identity_resource_id: str + + + class azure.mgmt.compute.bulkaction.types.EventGridAndResourceGraph(TypedDict, total=False): + key "enable": bool + key "scheduledEventsApiVersion": str + enable: bool + scheduled_events_api_version: str + + + class azure.mgmt.compute.bulkaction.types.ExecuteCreateContent(TypedDict, total=False): + key "executionParameters": Required[ExecutionParameters] + key "resourceConfigParameters": Required[ResourceProvisionPayload] + execution_parameters: ExecutionParameters + resource_config_parameters: ResourceProvisionPayload + + class azure.mgmt.compute.bulkaction.types.ExecuteDeallocateContent(TypedDict, total=False): key "executionParameters": Required[ExecutionParameters] - key "resources": Required[Resources] + key "resources": ForwardRef('Resources', module='types') + key "resourcesWithContext": ForwardRef('ResourcesWithContext', module='types') execution_parameters: ExecutionParameters resources: Resources + resources_with_context: ResourcesWithContext class azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent(TypedDict, total=False): key "executionParameters": Required[ExecutionParameters] key "forceDeletion": bool - key "resources": Required[Resources] + key "resources": ForwardRef('Resources', module='types') + key "resourcesWithContext": ForwardRef('ResourcesWithContext', module='types') execution_parameters: ExecutionParameters force_deletion: bool resources: Resources + resources_with_context: ResourcesWithContext class azure.mgmt.compute.bulkaction.types.ExecuteHibernateContent(TypedDict, total=False): key "executionParameters": Required[ExecutionParameters] - key "resources": Required[Resources] + key "resources": ForwardRef('Resources', module='types') + key "resourcesWithContext": ForwardRef('ResourcesWithContext', module='types') + execution_parameters: ExecutionParameters + resources: Resources + resources_with_context: ResourcesWithContext + + + class azure.mgmt.compute.bulkaction.types.ExecuteReimageRequest(TypedDict, total=False): + key "executionParameters": Required[ExecutionParameters] + key "reimageParameters": ForwardRef('ReimagePayload', module='types') + key "resources": ForwardRef('Resources', module='types') + key "resourcesWithContext": ForwardRef('ResourcesWithContext', module='types') execution_parameters: ExecutionParameters + reimage_parameters: ReimagePayload resources: Resources + resources_with_context: ResourcesWithContext class azure.mgmt.compute.bulkaction.types.ExecuteStartContent(TypedDict, total=False): key "executionParameters": Required[ExecutionParameters] - key "resources": Required[Resources] + key "resources": ForwardRef('Resources', module='types') + key "resourcesWithContext": ForwardRef('ResourcesWithContext', module='types') execution_parameters: ExecutionParameters resources: Resources + resources_with_context: ResourcesWithContext + + + class azure.mgmt.compute.bulkaction.types.ExecuteVdiCreateRequest(TypedDict, total=False): + key "executionParameters": Required[ExecutionParameters] + key "resourceConfigParameters": Required[ResourceProvisionVdiPayload] + execution_parameters: ExecutionParameters + resource_config_parameters: ResourceProvisionVdiPayload class azure.mgmt.compute.bulkaction.types.ExecutionParameters(TypedDict, total=False): + key "optimizationPreference": Union[str, OptimizationPreference] key "retryPolicy": ForwardRef('RetryPolicy', module='types') + key "verifyVmAgentHealth": bool + optimization_preference: Union[str, OptimizationPreference] retry_policy: RetryPolicy + verify_vm_agent_health: bool + + + class azure.mgmt.compute.bulkaction.types.FlexProperties(TypedDict, total=False): + key "minCapacity": int + key "osType": Required[Union[str, OsType]] + key "priorityProfile": Required[PriorityProfile] + key "vmSizeProfiles": Required[list[VmSizeProfile]] + key "zoneAllocationPolicy": ForwardRef('ZoneAllocationPolicy', module='types') + min_capacity: int + os_type: Union[str, OsType] + priority_profile: PriorityProfile + vm_size_profiles: list[VmSizeProfile] + zone_allocation_policy: ZoneAllocationPolicy class azure.mgmt.compute.bulkaction.types.GetOperationStatusContent(TypedDict, total=False): @@ -973,11 +6018,423 @@ namespace azure.mgmt.compute.bulkaction.types operation_ids: list[str] + class azure.mgmt.compute.bulkaction.types.HardwareProfile(TypedDict, total=False): + key "vmSize": str + key "vmSizeProperties": ForwardRef('VmSizeProperties', module='types') + vm_size: str + vm_size_properties: VmSizeProperties + + + class azure.mgmt.compute.bulkaction.types.HostEndpointSettings(TypedDict, total=False): + key "inVMAccessControlProfileReferenceId": str + key "mode": Union[str, Modes] + in_vm_access_control_profile_reference_id: str + mode: Union[str, Modes] + + + class azure.mgmt.compute.bulkaction.types.ImageReference(SubResource): + key "communityGalleryImageId": str + key "id": str + key "offer": str + key "publisher": str + key "sharedGalleryImageId": str + key "sku": str + key "version": str + community_gallery_image_id: str + id: str + offer: str + publisher: str + shared_gallery_image_id: str + sku: str + version: str + + + class azure.mgmt.compute.bulkaction.types.KeyVaultKeyReference(TypedDict, total=False): + key "keyUrl": Required[str] + key "sourceVault": Required[SubResource] + key_url: str + source_vault: SubResource + + + class azure.mgmt.compute.bulkaction.types.KeyVaultSecretReference(TypedDict, total=False): + key "secretUrl": Required[str] + key "sourceVault": Required[SubResource] + secret_url: str + source_vault: SubResource + + + class azure.mgmt.compute.bulkaction.types.LaunchBulkInstancesOperationProperties(TypedDict, total=False): + key "capacity": Required[int] + key "capacityType": Union[str, CapacityType] + key "computeProfile": Required[ComputeProfile] + key "createdTime": str + key "priorityProfile": Required[PriorityProfile] + key "provisioningState": Union[str, ProvisioningState] + key "retryPolicy": ForwardRef('RetryPolicy', module='types') + key "vmAttributes": ForwardRef('VMAttributes', module='types') + key "zoneAllocationPolicy": ForwardRef('ZoneAllocationPolicy', module='types') + capacity: int + capacity_type: Union[str, CapacityType] + compute_profile: ComputeProfile + created_time: str + priority_profile: PriorityProfile + provisioning_state: Union[str, ProvisioningState] + retry_policy: RetryPolicy + vmSizesProfile: list[VmSizeProfile] + vm_attributes: VMAttributes + vm_sizes_profile: list[VmSizeProfile] + zone_allocation_policy: ZoneAllocationPolicy + + + class azure.mgmt.compute.bulkaction.types.LinuxConfiguration(TypedDict, total=False): + key "disablePasswordAuthentication": bool + key "enableVMAgentPlatformUpdates": bool + key "patchSettings": ForwardRef('LinuxPatchSettings', module='types') + key "provisionVMAgent": bool + key "ssh": ForwardRef('SshConfiguration', module='types') + disable_password_authentication: bool + enable_vm_agent_platform_updates: bool + patch_settings: LinuxPatchSettings + provision_vm_agent: bool + ssh: SshConfiguration + + + class azure.mgmt.compute.bulkaction.types.LinuxPatchSettings(TypedDict, total=False): + key "assessmentMode": Union[str, LinuxPatchAssessmentMode] + key "automaticByPlatformSettings": ForwardRef('LinuxVMGuestPatchAutomaticByPlatformSettings', module='types') + key "patchMode": Union[str, LinuxVMGuestPatchMode] + assessment_mode: Union[str, LinuxPatchAssessmentMode] + automatic_by_platform_settings: LinuxVMGuestPatchAutomaticByPlatformSettings + patch_mode: Union[str, LinuxVMGuestPatchMode] + + + class azure.mgmt.compute.bulkaction.types.LinuxVMGuestPatchAutomaticByPlatformSettings(TypedDict, total=False): + key "bypassPlatformSafetyChecksOnUserSchedule": bool + key "rebootSetting": Union[str, LinuxVMGuestPatchAutomaticByPlatformRebootSetting] + bypass_platform_safety_checks_on_user_schedule: bool + reboot_setting: Union[str, LinuxVMGuestPatchAutomaticByPlatformRebootSetting] + + + class azure.mgmt.compute.bulkaction.types.LocationBasedBulkCreateCustom(ProxyResource): + key "id": str + key "identity": ForwardRef('ManagedServiceIdentity', module='types') + key "name": str + key "plan": ForwardRef('Plan', module='types') + key "properties": ForwardRef('BulkCreateCustomProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + identity: ManagedServiceIdentity + name: str + plan: Plan + properties: BulkCreateCustomProperties + system_data: SystemData + tags: dict[str, str] + type: str + zones: list[str] + + + class azure.mgmt.compute.bulkaction.types.LocationBasedLaunchBulkInstancesOperation(ProxyResource): + key "id": str + key "identity": ForwardRef('ManagedServiceIdentity', module='types') + key "name": str + key "plan": ForwardRef('Plan', module='types') + key "properties": ForwardRef('LaunchBulkInstancesOperationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + identity: ManagedServiceIdentity + name: str + plan: Plan + properties: LaunchBulkInstancesOperationProperties + system_data: SystemData + tags: dict[str, str] + type: str + zones: list[str] + + + class azure.mgmt.compute.bulkaction.types.ManagedDiskParametersContent(SubResource): + key "diskEncryptionSet": ForwardRef('DiskEncryptionSetParametersContent', module='types') + key "id": str + key "securityProfile": ForwardRef('VMDiskSecurityProfile', module='types') + key "storageAccountType": Union[str, StorageAccountTypes] + disk_encryption_set: DiskEncryptionSetParametersContent + id: str + security_profile: VMDiskSecurityProfile + storage_account_type: Union[str, StorageAccountTypes] + + + class azure.mgmt.compute.bulkaction.types.ManagedServiceIdentity(TypedDict, total=False): + key "principalId": str + key "tenantId": str + key "type": Required[Union[str, ManagedServiceIdentityType]] + principal_id: str + tenant_id: str + type: Union[str, ManagedServiceIdentityType] + userAssignedIdentities: dict[str, UserAssignedIdentity] + user_assigned_identities: dict[str, UserAssignedIdentity] + + + class azure.mgmt.compute.bulkaction.types.NetworkInterfaceReference(SubResource): + key "id": str + key "properties": ForwardRef('NetworkInterfaceReferenceProperties', module='types') + id: str + properties: NetworkInterfaceReferenceProperties + + + class azure.mgmt.compute.bulkaction.types.NetworkInterfaceReferenceProperties(TypedDict, total=False): + key "deleteOption": Union[str, DeleteOptions] + key "primary": bool + delete_option: Union[str, DeleteOptions] + primary: bool + + + class azure.mgmt.compute.bulkaction.types.NetworkProfile(TypedDict, total=False): + key "networkApiVersion": Union[str, NetworkApiVersion] + networkInterfaceConfigurations: list[VirtualMachineNetworkInterfaceConfiguration] + networkInterfaces: list[NetworkInterfaceReference] + network_api_version: Union[str, NetworkApiVersion] + network_interface_configurations: list[VirtualMachineNetworkInterfaceConfiguration] + network_interfaces: list[NetworkInterfaceReference] + + + class azure.mgmt.compute.bulkaction.types.NotificationProperties(TypedDict, total=False): + key "destination": Required[str] + key "disabled": bool + key "language": Required[Union[str, Language]] + key "type": Required[Union[str, NotificationType]] + destination: str + disabled: bool + language: Union[str, Language] + type: Union[str, NotificationType] + + + class azure.mgmt.compute.bulkaction.types.OSDisk(TypedDict, total=False): + key "caching": Union[str, CachingTypes] + key "createOption": Required[Union[str, DiskCreateOptionTypes]] + key "deleteOption": Union[str, DiskDeleteOptionTypes] + key "diffDiskSettings": ForwardRef('DiffDiskSettings', module='types') + key "diskSizeGB": int + key "encryptionSettings": ForwardRef('DiskEncryptionSettings', module='types') + key "image": ForwardRef('VirtualHardDisk', module='types') + key "managedDisk": ForwardRef('ManagedDiskParametersContent', module='types') + key "name": str + key "osType": Union[str, OperatingSystemTypes] + key "vhd": ForwardRef('VirtualHardDisk', module='types') + key "writeAcceleratorEnabled": bool + caching: Union[str, CachingTypes] + create_option: Union[str, DiskCreateOptionTypes] + delete_option: Union[str, DiskDeleteOptionTypes] + diff_disk_settings: DiffDiskSettings + disk_size_gb: int + encryption_settings: DiskEncryptionSettings + image: VirtualHardDisk + managed_disk: ManagedDiskParametersContent + name: str + os_type: Union[str, OperatingSystemTypes] + vhd: VirtualHardDisk + write_accelerator_enabled: bool + + + class azure.mgmt.compute.bulkaction.types.OSImageNotificationProfile(TypedDict, total=False): + key "enable": bool + key "notBeforeTimeout": str + enable: bool + not_before_timeout: str + + + class azure.mgmt.compute.bulkaction.types.OSProfile(TypedDict, total=False): + key "adminPassword": str + key "adminUsername": str + key "allowExtensionOperations": bool + key "computerName": str + key "customData": str + key "linuxConfiguration": ForwardRef('LinuxConfiguration', module='types') + key "requireGuestProvisionSignal": bool + key "windowsConfiguration": ForwardRef('WindowsConfiguration', module='types') + admin_password: str + admin_username: str + allow_extension_operations: bool + computer_name: str + custom_data: str + linux_configuration: LinuxConfiguration + require_guest_provision_signal: bool + secrets: list[VaultSecretGroup] + windows_configuration: WindowsConfiguration + + + class azure.mgmt.compute.bulkaction.types.OSProfileProvisioningData(TypedDict, total=False): + key "adminPassword": str + key "customData": str + admin_password: str + custom_data: str + + + class azure.mgmt.compute.bulkaction.types.PatchSettings(TypedDict, total=False): + key "assessmentMode": Union[str, WindowsPatchAssessmentMode] + key "automaticByPlatformSettings": ForwardRef('WindowsVMGuestPatchAutomaticByPlatformSettings', module='types') + key "enableHotpatching": bool + key "patchMode": Union[str, WindowsVMGuestPatchMode] + assessment_mode: Union[str, WindowsPatchAssessmentMode] + automatic_by_platform_settings: WindowsVMGuestPatchAutomaticByPlatformSettings + enable_hotpatching: bool + patch_mode: Union[str, WindowsVMGuestPatchMode] + + + class azure.mgmt.compute.bulkaction.types.Plan(TypedDict, total=False): + key "name": Required[str] + key "product": Required[str] + key "promotionCode": str + key "publisher": Required[str] + key "version": str + name: str + product: str + promotion_code: str + publisher: str + version: str + + + class azure.mgmt.compute.bulkaction.types.PriorityProfile(TypedDict, total=False): + key "allocationStrategy": Union[str, AllocationStrategy] + key "evictionPolicy": Union[str, EvictionPolicy] + key "maxPricePerVM": float + key "type": Union[str, PriorityType] + allocation_strategy: Union[str, AllocationStrategy] + eviction_policy: Union[str, EvictionPolicy] + max_price_per_vm: float + type: Union[str, PriorityType] + + + class azure.mgmt.compute.bulkaction.types.ProxyAgentSettings(TypedDict, total=False): + key "addProxyAgentExtension": bool + key "enabled": bool + key "imds": ForwardRef('HostEndpointSettings', module='types') + key "keyIncarnationId": int + key "mode": Union[str, Mode] + key "wireServer": ForwardRef('HostEndpointSettings', module='types') + add_proxy_agent_extension: bool + enabled: bool + imds: HostEndpointSettings + key_incarnation_id: int + mode: Union[str, Mode] + wire_server: HostEndpointSettings + + + class azure.mgmt.compute.bulkaction.types.ProxyResource(Resource): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.compute.bulkaction.types.PublicIPAddressSku(TypedDict, total=False): + key "name": Union[str, PublicIPAddressSkuName] + key "tier": Union[str, PublicIPAddressSkuTier] + name: Union[str, PublicIPAddressSkuName] + tier: Union[str, PublicIPAddressSkuTier] + + + class azure.mgmt.compute.bulkaction.types.RecurringScheduledActionsExecutionParameters(TypedDict, total=False): + key "optimizationPreference": Union[str, OptimizationPreference] + key "retryPolicy": ForwardRef('RecurringScheduledActionsRetryPolicy', module='types') + optimization_preference: Union[str, OptimizationPreference] + retry_policy: RecurringScheduledActionsRetryPolicy + + + class azure.mgmt.compute.bulkaction.types.RecurringScheduledActionsRetryPolicy(TypedDict, total=False): + key "onFailureAction": Union[str, RecurringScheduledActionsResourceOperationType] + key "retryCount": int + key "retryWindowInMinutes": int + on_failure_action: Union[str, RecurringScheduledActionsResourceOperationType] + retry_count: int + retry_window_in_minutes: int + + + class azure.mgmt.compute.bulkaction.types.ReimagePayload(TypedDict, total=False): + key "baseProfile": ForwardRef('VirtualMachineReimageParameters', module='types') + base_profile: VirtualMachineReimageParameters + resourceOverrides: list[ReimageResourceOverride] + resource_overrides: list[ReimageResourceOverride] + + + class azure.mgmt.compute.bulkaction.types.ReimageResourceOverride(TypedDict, total=False): + key "profile": Required[VirtualMachineReimageParameters] + key "resourceId": Required[str] + profile: VirtualMachineReimageParameters + resource_id: str + + + class azure.mgmt.compute.bulkaction.types.Resource(TypedDict, total=False): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.compute.bulkaction.types.ResourceAttachRequest(TypedDict, total=False): + key "resources": Required[list[ScheduledActionResourceInput]] + resources: list[ScheduledActionResourceInput] + + + class azure.mgmt.compute.bulkaction.types.ResourceDetachRequest(TypedDict, total=False): + key "resources": Required[list[str]] + resources: list[str] + + + class azure.mgmt.compute.bulkaction.types.ResourcePatchRequest(TypedDict, total=False): + key "resources": Required[list[ScheduledActionResourceInput]] + resources: list[ScheduledActionResourceInput] + + + class azure.mgmt.compute.bulkaction.types.ResourceProvisionPayload(TypedDict, total=False): + key "resourceCount": Required[int] + key "resourcePrefix": str + baseProfile: dict[str, Any] + base_profile: dict[str, Any] + resourceOverrides: list[dict[str, Any]] + resource_count: int + resource_overrides: list[dict[str, Any]] + resource_prefix: str + + + class azure.mgmt.compute.bulkaction.types.ResourceProvisionVdiPayload(TypedDict, total=False): + key "flexProperties": Required[FlexProperties] + key "resourceCount": Required[int] + key "resourcePrefix": str + baseProfile: dict[str, Any] + base_profile: dict[str, Any] + flex_properties: FlexProperties + resourceOverrides: list[dict[str, Any]] + resource_count: int + resource_overrides: list[dict[str, Any]] + resource_prefix: str + + + class azure.mgmt.compute.bulkaction.types.ResourceWithContext(TypedDict, total=False): + key "resourceContext": Required[str] + key "resourceId": Required[str] + resource_context: str + resource_id: str + + class azure.mgmt.compute.bulkaction.types.Resources(TypedDict, total=False): key "ids": Required[list[str]] ids: list[str] + class azure.mgmt.compute.bulkaction.types.ResourcesWithContext(TypedDict, total=False): + key "resources": Required[list[ResourceWithContext]] + resources: list[ResourceWithContext] + + class azure.mgmt.compute.bulkaction.types.RetryPolicy(TypedDict, total=False): key "onFailureAction": Union[str, ResourceOperationType] key "retryCount": int @@ -987,4 +6444,522 @@ namespace azure.mgmt.compute.bulkaction.types retry_window_in_minutes: int + class azure.mgmt.compute.bulkaction.types.ScheduledAction(TrackedResource): + key "id": str + key "location": Required[str] + key "name": str + key "properties": ForwardRef('ScheduledActionProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: ScheduledActionProperties + system_data: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.compute.bulkaction.types.ScheduledActionProperties(TypedDict, total=False): + key "actionType": Required[Union[str, ScheduledActionType]] + key "disabled": bool + key "endTime": str + key "notificationSettings": Required[list[NotificationProperties]] + key "provisioningState": Union[str, RecurringScheduledActionsProvisioningState] + key "resourceType": Required[Union[str, ResourceType]] + key "schedule": Required[ScheduledActionsSchedule] + key "startTime": Required[str] + action_type: Union[str, ScheduledActionType] + disabled: bool + end_time: str + notification_settings: list[NotificationProperties] + provisioning_state: Union[str, RecurringScheduledActionsProvisioningState] + resource_type: Union[str, ResourceType] + schedule: ScheduledActionsSchedule + start_time: str + + + class azure.mgmt.compute.bulkaction.types.ScheduledActionResourceInput(TypedDict, total=False): + key "resourceId": Required[str] + notificationSettings: list[NotificationProperties] + notification_settings: list[NotificationProperties] + resource_id: str + + + class azure.mgmt.compute.bulkaction.types.ScheduledActionUpdate(TypedDict, total=False): + key "properties": ForwardRef('ScheduledActionUpdateProperties', module='types') + properties: ScheduledActionUpdateProperties + tags: dict[str, str] + + + class azure.mgmt.compute.bulkaction.types.ScheduledActionUpdateProperties(TypedDict, total=False): + key "actionType": Union[str, ScheduledActionType] + key "disabled": bool + key "endTime": str + key "resourceType": Union[str, ResourceType] + key "schedule": ForwardRef('ScheduledActionsScheduleUpdate', module='types') + key "startTime": str + action_type: Union[str, ScheduledActionType] + disabled: bool + end_time: str + notificationSettings: list[NotificationProperties] + notification_settings: list[NotificationProperties] + resource_type: Union[str, ResourceType] + schedule: ScheduledActionsScheduleUpdate + start_time: str + + + class azure.mgmt.compute.bulkaction.types.ScheduledActionsSchedule(TypedDict, total=False): + key "deadlineType": Union[str, RecurringScheduledActionsDeadlineType] + key "executionParameters": ForwardRef('RecurringScheduledActionsExecutionParameters', module='types') + key "scheduledTime": Required[str] + key "timeZone": Required[str] + deadline_type: Union[str, RecurringScheduledActionsDeadlineType] + execution_parameters: RecurringScheduledActionsExecutionParameters + requestedDaysOfTheMonth: list[int] + requestedMonths: list[Union[str, Month]] + requestedWeekDays: list[Union[str, WeekDay]] + requested_days_of_the_month: list[int] + requested_months: list[Union[str, Month]] + requested_week_days: list[Union[str, WeekDay]] + scheduled_time: str + time_zone: str + + + class azure.mgmt.compute.bulkaction.types.ScheduledActionsScheduleUpdate(TypedDict, total=False): + key "deadlineType": Union[str, RecurringScheduledActionsDeadlineType] + key "executionParameters": ForwardRef('RecurringScheduledActionsExecutionParameters', module='types') + key "scheduledTime": str + key "timeZone": str + deadline_type: Union[str, RecurringScheduledActionsDeadlineType] + execution_parameters: RecurringScheduledActionsExecutionParameters + requestedDaysOfTheMonth: list[int] + requestedMonths: list[Union[str, Month]] + requestedWeekDays: list[Union[str, WeekDay]] + requested_days_of_the_month: list[int] + requested_months: list[Union[str, Month]] + requested_week_days: list[Union[str, WeekDay]] + scheduled_time: str + time_zone: str + + + class azure.mgmt.compute.bulkaction.types.ScheduledEventsAdditionalPublishingTargets(TypedDict, total=False): + key "eventGridAndResourceGraph": ForwardRef('EventGridAndResourceGraph', module='types') + event_grid_and_resource_graph: EventGridAndResourceGraph + + + class azure.mgmt.compute.bulkaction.types.ScheduledEventsPolicy(TypedDict, total=False): + key "allInstancesDown": ForwardRef('AllInstancesDown', module='types') + key "scheduledEventsAdditionalPublishingTargets": ForwardRef('ScheduledEventsAdditionalPublishingTargets', module='types') + key "userInitiatedReboot": ForwardRef('UserInitiatedReboot', module='types') + key "userInitiatedRedeploy": ForwardRef('UserInitiatedRedeploy', module='types') + all_instances_down: AllInstancesDown + scheduled_events_additional_publishing_targets: ScheduledEventsAdditionalPublishingTargets + user_initiated_reboot: UserInitiatedReboot + user_initiated_redeploy: UserInitiatedRedeploy + + + class azure.mgmt.compute.bulkaction.types.ScheduledEventsProfile(TypedDict, total=False): + key "osImageNotificationProfile": ForwardRef('OSImageNotificationProfile', module='types') + key "terminateNotificationProfile": ForwardRef('TerminateNotificationProfile', module='types') + os_image_notification_profile: OSImageNotificationProfile + terminate_notification_profile: TerminateNotificationProfile + + + class azure.mgmt.compute.bulkaction.types.SecurityProfile(TypedDict, total=False): + key "encryptionAtHost": bool + key "encryptionIdentity": ForwardRef('EncryptionIdentity', module='types') + key "proxyAgentSettings": ForwardRef('ProxyAgentSettings', module='types') + key "securityType": Union[str, SecurityTypes] + key "uefiSettings": ForwardRef('UefiSettings', module='types') + encryption_at_host: bool + encryption_identity: EncryptionIdentity + proxy_agent_settings: ProxyAgentSettings + security_type: Union[str, SecurityTypes] + uefi_settings: UefiSettings + + + class azure.mgmt.compute.bulkaction.types.SshConfiguration(TypedDict, total=False): + publicKeys: list[SshPublicKey] + public_keys: list[SshPublicKey] + + + class azure.mgmt.compute.bulkaction.types.SshPublicKey(TypedDict, total=False): + key "keyData": str + key "path": str + key_data: str + path: str + + + class azure.mgmt.compute.bulkaction.types.StorageProfile(TypedDict, total=False): + key "diskControllerType": Union[str, DiskControllerTypes] + key "imageReference": ForwardRef('ImageReference', module='types') + key "osDisk": ForwardRef('OSDisk', module='types') + dataDisks: list[DataDisk] + data_disks: list[DataDisk] + disk_controller_type: Union[str, DiskControllerTypes] + image_reference: ImageReference + os_disk: OSDisk + + + class azure.mgmt.compute.bulkaction.types.SubResource(TypedDict, total=False): + key "id": str + id: str + + + class azure.mgmt.compute.bulkaction.types.SystemData(TypedDict, total=False): + key "createdAt": str + key "createdBy": str + key "createdByType": Union[str, CreatedByType] + key "lastModifiedAt": str + key "lastModifiedBy": str + key "lastModifiedByType": Union[str, CreatedByType] + created_at: str + created_by: str + created_by_type: Union[str, CreatedByType] + last_modified_at: str + last_modified_by: str + last_modified_by_type: Union[str, CreatedByType] + + + class azure.mgmt.compute.bulkaction.types.TerminateNotificationProfile(TypedDict, total=False): + key "enable": bool + key "notBeforeTimeout": str + enable: bool + not_before_timeout: str + + + class azure.mgmt.compute.bulkaction.types.TrackedResource(Resource): + key "id": str + key "location": Required[str] + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + system_data: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.compute.bulkaction.types.UefiSettings(TypedDict, total=False): + key "secureBootEnabled": bool + key "vTpmEnabled": bool + secure_boot_enabled: bool + v_tpm_enabled: bool + + + class azure.mgmt.compute.bulkaction.types.UserAssignedIdentitiesValue(TypedDict, total=False): + key "clientId": str + key "principalId": str + client_id: str + principal_id: str + + + class azure.mgmt.compute.bulkaction.types.UserAssignedIdentity(TypedDict, total=False): + key "clientId": str + key "principalId": str + client_id: str + principal_id: str + + + class azure.mgmt.compute.bulkaction.types.UserInitiatedReboot(TypedDict, total=False): + key "automaticallyApprove": bool + user_initiated_reboot_automatically_approve: bool + + + class azure.mgmt.compute.bulkaction.types.UserInitiatedRedeploy(TypedDict, total=False): + key "automaticallyApprove": bool + user_initiated_redeploy_automatically_approve: bool + + + class azure.mgmt.compute.bulkaction.types.VMAttributeMinMaxDouble(TypedDict, total=False): + key "max": float + key "min": float + max: float + min: float + + + class azure.mgmt.compute.bulkaction.types.VMAttributeMinMaxInteger(TypedDict, total=False): + key "max": int + key "min": int + max: int + min: int + + + class azure.mgmt.compute.bulkaction.types.VMAttributes(TypedDict, total=False): + key "acceleratorCount": ForwardRef('VMAttributeMinMaxInteger', module='types') + key "acceleratorSupport": Union[str, VMAttributeSupport] + key "architectureTypes": Required[list[Union[str, ArchitectureType]]] + key "burstableSupport": Union[str, VMAttributeSupport] + key "dataDiskCount": ForwardRef('VMAttributeMinMaxInteger', module='types') + key "localStorageInGiB": ForwardRef('VMAttributeMinMaxDouble', module='types') + key "localStorageSupport": Union[str, VMAttributeSupport] + key "memoryInGiB": Required[VMAttributeMinMaxDouble] + key "memoryInGiBPerVCpu": ForwardRef('VMAttributeMinMaxDouble', module='types') + key "networkBandwidthInMbps": ForwardRef('VMAttributeMinMaxDouble', module='types') + key "networkInterfaceCount": ForwardRef('VMAttributeMinMaxInteger', module='types') + key "rdmaNetworkInterfaceCount": ForwardRef('VMAttributeMinMaxInteger', module='types') + key "rdmaSupport": Union[str, VMAttributeSupport] + key "vCpuCount": Required[VMAttributeMinMaxInteger] + acceleratorManufacturers: list[Union[str, AcceleratorManufacturer]] + acceleratorTypes: list[Union[str, AcceleratorType]] + accelerator_count: VMAttributeMinMaxInteger + accelerator_manufacturers: list[Union[str, AcceleratorManufacturer]] + accelerator_support: Union[str, VMAttributeSupport] + accelerator_types: list[Union[str, AcceleratorType]] + allowedVMSizes: list[str] + allowed_vm_sizes: list[str] + architecture_types: list[Union[str, ArchitectureType]] + burstable_support: Union[str, VMAttributeSupport] + cpuManufacturers: list[Union[str, CpuManufacturer]] + cpu_manufacturers: list[Union[str, CpuManufacturer]] + data_disk_count: VMAttributeMinMaxInteger + excludedVMSizes: list[str] + excluded_vm_sizes: list[str] + hyperVGenerations: list[Union[str, HyperVGeneration]] + hyper_v_generations: list[Union[str, HyperVGeneration]] + localStorageDiskTypes: list[Union[str, LocalStorageDiskType]] + local_storage_disk_types: list[Union[str, LocalStorageDiskType]] + local_storage_in_gi_b: VMAttributeMinMaxDouble + local_storage_support: Union[str, VMAttributeSupport] + memory_in_gi_b: VMAttributeMinMaxDouble + memory_in_gi_b_per_v_cpu: VMAttributeMinMaxDouble + network_bandwidth_in_mbps: VMAttributeMinMaxDouble + network_interface_count: VMAttributeMinMaxInteger + rdma_network_interface_count: VMAttributeMinMaxInteger + rdma_support: Union[str, VMAttributeSupport] + v_cpu_count: VMAttributeMinMaxInteger + vmCategories: list[Union[str, VMCategory]] + vm_categories: list[Union[str, VMCategory]] + + + class azure.mgmt.compute.bulkaction.types.VMDiskSecurityProfile(TypedDict, total=False): + key "diskEncryptionSet": ForwardRef('DiskEncryptionSetParametersContent', module='types') + key "securityEncryptionType": Union[str, SecurityEncryptionTypes] + disk_encryption_set: DiskEncryptionSetParametersContent + security_encryption_type: Union[str, SecurityEncryptionTypes] + + + class azure.mgmt.compute.bulkaction.types.VMGalleryApplication(TypedDict, total=False): + key "configurationReference": str + key "enableAutomaticUpgrade": bool + key "order": int + key "packageReferenceId": Required[str] + key "tags": str + key "treatFailureAsDeploymentFailure": bool + configuration_reference: str + enable_automatic_upgrade: bool + order: int + package_reference_id: str + tags: str + treat_failure_as_deployment_failure: bool + + + class azure.mgmt.compute.bulkaction.types.VaultCertificate(TypedDict, total=False): + key "certificateStore": str + key "certificateUrl": str + certificate_store: str + certificate_url: str + + + class azure.mgmt.compute.bulkaction.types.VaultSecretGroup(TypedDict, total=False): + key "sourceVault": ForwardRef('SubResource', module='types') + source_vault: SubResource + vaultCertificates: list[VaultCertificate] + vault_certificates: list[VaultCertificate] + + + class azure.mgmt.compute.bulkaction.types.VirtualHardDisk(TypedDict, total=False): + key "uri": str + uri: str + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineIdentity(TypedDict, total=False): + key "principalId": str + key "tenantId": str + key "type": Union[str, ResourceIdentityType] + principal_id: str + tenant_id: str + type: Union[str, ResourceIdentityType] + userAssignedIdentities: dict[str, UserAssignedIdentitiesValue] + user_assigned_identities: dict[str, UserAssignedIdentitiesValue] + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineIpTag(TypedDict, total=False): + key "ipTagType": str + key "tag": str + ip_tag_type: str + tag: str + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineNetworkInterfaceConfiguration(TypedDict, total=False): + key "name": Required[str] + key "properties": ForwardRef('VirtualMachineNetworkInterfaceConfigurationProperties', module='types') + name: str + properties: VirtualMachineNetworkInterfaceConfigurationProperties + tags: dict[str, str] + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineNetworkInterfaceConfigurationProperties(TypedDict, total=False): + key "auxiliaryMode": Union[str, NetworkInterfaceAuxiliaryMode] + key "auxiliarySku": Union[str, NetworkInterfaceAuxiliarySku] + key "deleteOption": Union[str, DeleteOptions] + key "disableTcpStateTracking": bool + key "dnsSettings": ForwardRef('VirtualMachineNetworkInterfaceDnsSettingsConfiguration', module='types') + key "dscpConfiguration": ForwardRef('SubResource', module='types') + key "enableAcceleratedNetworking": bool + key "enableFpga": bool + key "enableIPForwarding": bool + key "ipConfigurations": Required[list[VirtualMachineNetworkInterfaceIPConfiguration]] + key "networkSecurityGroup": ForwardRef('SubResource', module='types') + key "primary": bool + auxiliary_mode: Union[str, NetworkInterfaceAuxiliaryMode] + auxiliary_sku: Union[str, NetworkInterfaceAuxiliarySku] + delete_option: Union[str, DeleteOptions] + disable_tcp_state_tracking: bool + dns_settings: VirtualMachineNetworkInterfaceDnsSettingsConfiguration + dscp_configuration: SubResource + enable_accelerated_networking: bool + enable_fpga: bool + enable_ip_forwarding: bool + ip_configurations: list[VirtualMachineNetworkInterfaceIPConfiguration] + network_security_group: SubResource + primary: bool + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineNetworkInterfaceDnsSettingsConfiguration(TypedDict, total=False): + dnsServers: list[str] + dns_servers: list[str] + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineNetworkInterfaceIPConfiguration(TypedDict, total=False): + key "name": Required[str] + key "properties": ForwardRef('VirtualMachineNetworkInterfaceIPConfigurationProperties', module='types') + name: str + properties: VirtualMachineNetworkInterfaceIPConfigurationProperties + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineNetworkInterfaceIPConfigurationProperties(TypedDict, total=False): + key "primary": bool + key "privateIPAddressVersion": Union[str, IPVersions] + key "publicIPAddressConfiguration": ForwardRef('VirtualMachinePublicIPAddressConfiguration', module='types') + key "subnet": ForwardRef('SubResource', module='types') + applicationGatewayBackendAddressPools: list[SubResource] + applicationSecurityGroups: list[SubResource] + application_gateway_backend_address_pools: list[SubResource] + application_security_groups: list[SubResource] + loadBalancerBackendAddressPools: list[SubResource] + load_balancer_backend_address_pools: list[SubResource] + primary: bool + private_ip_address_version: Union[str, IPVersions] + public_ip_address_configuration: VirtualMachinePublicIPAddressConfiguration + subnet: SubResource + + + class azure.mgmt.compute.bulkaction.types.VirtualMachinePublicIPAddressConfiguration(TypedDict, total=False): + key "name": Required[str] + key "properties": ForwardRef('VirtualMachinePublicIPAddressConfigurationProperties', module='types') + key "sku": ForwardRef('PublicIPAddressSku', module='types') + name: str + properties: VirtualMachinePublicIPAddressConfigurationProperties + sku: PublicIPAddressSku + tags: dict[str, str] + + + class azure.mgmt.compute.bulkaction.types.VirtualMachinePublicIPAddressConfigurationProperties(TypedDict, total=False): + key "deleteOption": Union[str, DeleteOptions] + key "dnsSettings": ForwardRef('VirtualMachinePublicIPAddressDnsSettingsConfiguration', module='types') + key "idleTimeoutInMinutes": int + key "publicIPAddressVersion": Union[str, IPVersions] + key "publicIPAllocationMethod": Union[str, PublicIPAllocationMethod] + key "publicIPPrefix": ForwardRef('SubResource', module='types') + delete_option: Union[str, DeleteOptions] + dns_settings: VirtualMachinePublicIPAddressDnsSettingsConfiguration + idle_timeout_in_minutes: int + ipTags: list[VirtualMachineIpTag] + ip_tags: list[VirtualMachineIpTag] + public_ip_address_version: Union[str, IPVersions] + public_ip_allocation_method: Union[str, PublicIPAllocationMethod] + public_ip_prefix: SubResource + + + class azure.mgmt.compute.bulkaction.types.VirtualMachinePublicIPAddressDnsSettingsConfiguration(TypedDict, total=False): + key "domainNameLabel": Required[str] + key "domainNameLabelScope": Union[str, DomainNameLabelScopeTypes] + domain_name_label: str + domain_name_label_scope: Union[str, DomainNameLabelScopeTypes] + + + class azure.mgmt.compute.bulkaction.types.VirtualMachineReimageParameters(TypedDict, total=False): + key "exactVersion": str + key "osProfile": ForwardRef('OSProfileProvisioningData', module='types') + key "tempDisk": bool + exact_version: str + os_profile: OSProfileProvisioningData + temp_disk: bool + + + class azure.mgmt.compute.bulkaction.types.VmSizeProfile(TypedDict, total=False): + key "name": Required[str] + key "rank": Required[int] + name: str + rank: int + + + class azure.mgmt.compute.bulkaction.types.VmSizeProperties(TypedDict, total=False): + key "vCpusAvailable": int + key "vCpusPerCore": int + v_cpus_available: int + v_cpus_per_core: int + + + class azure.mgmt.compute.bulkaction.types.WinRMConfiguration(TypedDict, total=False): + listeners: list[WinRMListener] + + + class azure.mgmt.compute.bulkaction.types.WinRMListener(TypedDict, total=False): + key "certificateUrl": str + key "protocol": Union[str, ProtocolTypes] + certificate_url: str + protocol: Union[str, ProtocolTypes] + + + class azure.mgmt.compute.bulkaction.types.WindowsConfiguration(TypedDict, total=False): + key "enableAutomaticUpdates": bool + key "patchSettings": ForwardRef('PatchSettings', module='types') + key "provisionVMAgent": bool + key "timeZone": str + key "winRM": ForwardRef('WinRMConfiguration', module='types') + additionalUnattendContent: list[AdditionalUnattendContent] + additional_unattend_content: list[AdditionalUnattendContent] + enable_automatic_updates: bool + patch_settings: PatchSettings + provision_vm_agent: bool + time_zone: str + win_rm: WinRMConfiguration + + + class azure.mgmt.compute.bulkaction.types.WindowsVMGuestPatchAutomaticByPlatformSettings(TypedDict, total=False): + key "bypassPlatformSafetyChecksOnUserSchedule": bool + key "rebootSetting": Union[str, WindowsVMGuestPatchAutomaticByPlatformRebootSetting] + bypass_platform_safety_checks_on_user_schedule: bool + reboot_setting: Union[str, WindowsVMGuestPatchAutomaticByPlatformRebootSetting] + + + class azure.mgmt.compute.bulkaction.types.ZoneAllocationPolicy(TypedDict, total=False): + key "distributionStrategy": Union[str, DistributionStrategy] + distribution_strategy: Union[str, DistributionStrategy] + zonePreferences: list[ZonePreference] + zone_preferences: list[ZonePreference] + + + class azure.mgmt.compute.bulkaction.types.ZonePreference(TypedDict, total=False): + key "rank": Required[int] + key "zone": Required[str] + rank: int + zone: str + + ``` \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/api.metadata.yml b/sdk/compute/azure-mgmt-compute-bulkaction/api.metadata.yml index 9295f9666150..1fc24161471f 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/api.metadata.yml +++ b/sdk/compute/azure-mgmt-compute-bulkaction/api.metadata.yml @@ -1,3 +1,3 @@ -apiMdSha256: b0c2760dbb7a67070eed2abaddefbe9fd2aa4edbb9c71a6ad71d0eafc9d1bf74 -parserVersion: 0.3.28 +apiMdSha256: a441d273b218be0de2ef3610ab10874435138f37941fee3739b188b864fb282f +parserVersion: 0.3.30 pythonVersion: 3.13.14 diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/apiview-properties.json b/sdk/compute/azure-mgmt-compute-bulkaction/apiview-properties.json index 26c510d9cadc..7843e02faa43 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/apiview-properties.json +++ b/sdk/compute/azure-mgmt-compute-bulkaction/apiview-properties.json @@ -1,35 +1,243 @@ { "CrossLanguagePackageId": "Microsoft.Compute", "CrossLanguageDefinitionId": { + "azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsRequest": "Microsoft.Compute.AcknowledgeBulkOperationErrorsRequest", + "azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse": "Microsoft.Compute.AcknowledgeBulkOperationErrorsResponse", + "azure.mgmt.compute.bulkaction.models.AdditionalCapabilities": "Microsoft.Compute.AdditionalCapabilities", + "azure.mgmt.compute.bulkaction.models.AdditionalUnattendContent": "Microsoft.Compute.AdditionalUnattendContent", + "azure.mgmt.compute.bulkaction.models.AllInstancesDown": "Microsoft.Compute.AllInstancesDown", + "azure.mgmt.compute.bulkaction.models.ApiEntityReference": "Microsoft.Compute.ApiEntityReference", + "azure.mgmt.compute.bulkaction.models.ApiError": "Microsoft.Compute.ApiError", + "azure.mgmt.compute.bulkaction.models.ApiErrorBase": "Microsoft.Compute.ApiErrorBase", + "azure.mgmt.compute.bulkaction.models.ApplicationProfile": "Microsoft.Compute.ApplicationProfile", + "azure.mgmt.compute.bulkaction.models.BootDiagnostics": "Microsoft.Compute.BootDiagnostics", + "azure.mgmt.compute.bulkaction.models.BulkactionVMExtension": "Microsoft.Compute.BulkactionVMExtension", + "azure.mgmt.compute.bulkaction.models.BulkActionVmExtensionProperties": "Microsoft.Compute.BulkActionVmExtensionProperties", + "azure.mgmt.compute.bulkaction.models.BulkactionVMProperties": "Microsoft.Compute.BulkactionVMProperties", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverride": "Microsoft.Compute.BulkCreateCustomOverride", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverrideBase": "Microsoft.Compute.BulkCreateCustomOverrideBase", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverridesProfile": "Microsoft.Compute.BulkCreateCustomOverridesProfile", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomPriorityProfile": "Microsoft.Compute.BulkCreateCustomPriorityProfile", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomProperties": "Microsoft.Compute.BulkCreateCustomProperties", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomVmSizeProfile": "Microsoft.Compute.BulkCreateCustomVmSizeProfile", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomZoneAllocationPolicy": "Microsoft.Compute.BulkCreateCustomZoneAllocationPolicy", + "azure.mgmt.compute.bulkaction.models.BulkInstancesInnerError": "Microsoft.Compute.InnerError", + "azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest": "Microsoft.Compute.CancelOccurrenceRequest", "azure.mgmt.compute.bulkaction.models.CancelOperationsContent": "Microsoft.Compute.CancelOperationsRequest", "azure.mgmt.compute.bulkaction.models.CancelOperationsResponse": "Microsoft.Compute.CancelOperationsResponse", + "azure.mgmt.compute.bulkaction.models.CapacityReservationProfile": "Microsoft.Compute.CapacityReservationProfile", + "azure.mgmt.compute.bulkaction.models.ComputeProfile": "Microsoft.Compute.ComputeProfile", + "azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse": "Microsoft.Compute.CreateResourceOperationResponse", + "azure.mgmt.compute.bulkaction.models.DataDisk": "Microsoft.Compute.DataDisk", "azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse": "Microsoft.Compute.DeallocateResourceOperationResponse", + "azure.mgmt.compute.bulkaction.models.DelayRequest": "Microsoft.Compute.DelayRequest", "azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse": "Microsoft.Compute.DeleteResourceOperationResponse", + "azure.mgmt.compute.bulkaction.models.DiagnosticsProfile": "Microsoft.Compute.DiagnosticsProfile", + "azure.mgmt.compute.bulkaction.models.DiffDiskSettings": "Microsoft.Compute.DiffDiskSettings", + "azure.mgmt.compute.bulkaction.models.SubResource": "Microsoft.Compute.SubResource", + "azure.mgmt.compute.bulkaction.models.DiskEncryptionSetParametersContent": "Microsoft.Compute.DiskEncryptionSetParameters", + "azure.mgmt.compute.bulkaction.models.DiskEncryptionSettings": "Microsoft.Compute.DiskEncryptionSettings", + "azure.mgmt.compute.bulkaction.models.EncryptionIdentity": "Microsoft.Compute.EncryptionIdentity", "azure.mgmt.compute.bulkaction.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", "azure.mgmt.compute.bulkaction.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", "azure.mgmt.compute.bulkaction.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.compute.bulkaction.models.EventGridAndResourceGraph": "Microsoft.Compute.EventGridAndResourceGraph", + "azure.mgmt.compute.bulkaction.models.ExecuteCreateContent": "Microsoft.Compute.ExecuteCreateRequest", "azure.mgmt.compute.bulkaction.models.ExecuteDeallocateContent": "Microsoft.Compute.ExecuteDeallocateRequest", "azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent": "Microsoft.Compute.ExecuteDeleteRequest", "azure.mgmt.compute.bulkaction.models.ExecuteHibernateContent": "Microsoft.Compute.ExecuteHibernateRequest", + "azure.mgmt.compute.bulkaction.models.ExecuteReimageRequest": "Microsoft.Compute.ExecuteReimageRequest", "azure.mgmt.compute.bulkaction.models.ExecuteStartContent": "Microsoft.Compute.ExecuteStartRequest", + "azure.mgmt.compute.bulkaction.models.ExecuteVdiCreateRequest": "Microsoft.Compute.ExecuteVdiCreateRequest", "azure.mgmt.compute.bulkaction.models.ExecutionParameters": "Microsoft.Compute.ExecutionParameters", + "azure.mgmt.compute.bulkaction.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.compute.bulkaction.models.ExtensionResource": "Azure.ResourceManager.CommonTypes.ExtensionResource", "azure.mgmt.compute.bulkaction.models.FallbackOperationInfo": "Microsoft.Compute.FallbackOperationInfo", + "azure.mgmt.compute.bulkaction.models.FlexProperties": "Microsoft.Compute.FlexProperties", "azure.mgmt.compute.bulkaction.models.GetOperationStatusContent": "Microsoft.Compute.GetOperationStatusRequest", "azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse": "Microsoft.Compute.GetOperationStatusResponse", + "azure.mgmt.compute.bulkaction.models.HardwareProfile": "Microsoft.Compute.HardwareProfile", "azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse": "Microsoft.Compute.HibernateResourceOperationResponse", + "azure.mgmt.compute.bulkaction.models.HostEndpointSettings": "Microsoft.Compute.HostEndpointSettings", + "azure.mgmt.compute.bulkaction.models.ImageReference": "Microsoft.Compute.ImageReference", + "azure.mgmt.compute.bulkaction.models.KeyVaultKeyReference": "Microsoft.Compute.KeyVaultKeyReference", + "azure.mgmt.compute.bulkaction.models.KeyVaultSecretReference": "Microsoft.Compute.KeyVaultSecretReference", + "azure.mgmt.compute.bulkaction.models.LaunchBulkInstancesOperationProperties": "Microsoft.Compute.LaunchBulkInstancesOperationProperties", + "azure.mgmt.compute.bulkaction.models.LinuxConfiguration": "Microsoft.Compute.LinuxConfiguration", + "azure.mgmt.compute.bulkaction.models.LinuxPatchSettings": "Microsoft.Compute.LinuxPatchSettings", + "azure.mgmt.compute.bulkaction.models.LinuxVMGuestPatchAutomaticByPlatformSettings": "Microsoft.Compute.LinuxVMGuestPatchAutomaticByPlatformSettings", + "azure.mgmt.compute.bulkaction.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom": "Microsoft.Compute.LocationBasedBulkCreateCustom", + "azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation": "Microsoft.Compute.LocationBasedLaunchBulkInstancesOperation", + "azure.mgmt.compute.bulkaction.models.ManagedDiskParametersContent": "Microsoft.Compute.ManagedDiskParameters", + "azure.mgmt.compute.bulkaction.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "azure.mgmt.compute.bulkaction.models.NetworkInterfaceReference": "Microsoft.Compute.NetworkInterfaceReference", + "azure.mgmt.compute.bulkaction.models.NetworkInterfaceReferenceProperties": "Microsoft.Compute.NetworkInterfaceReferenceProperties", + "azure.mgmt.compute.bulkaction.models.NetworkProfile": "Microsoft.Compute.NetworkProfile", + "azure.mgmt.compute.bulkaction.models.NotificationProperties": "Microsoft.Compute.NotificationProperties", + "azure.mgmt.compute.bulkaction.models.Occurrence": "Microsoft.Compute.Occurrence", + "azure.mgmt.compute.bulkaction.models.OccurrenceExtensionProperties": "Microsoft.Compute.OccurrenceExtensionProperties", + "azure.mgmt.compute.bulkaction.models.OccurrenceExtensionResource": "Microsoft.Compute.OccurrenceExtensionResource", + "azure.mgmt.compute.bulkaction.models.OccurrenceProperties": "Microsoft.Compute.OccurrenceProperties", + "azure.mgmt.compute.bulkaction.models.OccurrenceResource": "Microsoft.Compute.OccurrenceResource", + "azure.mgmt.compute.bulkaction.models.OccurrenceResultSummary": "Microsoft.Compute.OccurrenceResultSummary", "azure.mgmt.compute.bulkaction.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", "azure.mgmt.compute.bulkaction.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.compute.bulkaction.models.OperationStatusResult": "Azure.ResourceManager.CommonTypes.OperationStatusResult", + "azure.mgmt.compute.bulkaction.models.OSDisk": "Microsoft.Compute.OSDisk", + "azure.mgmt.compute.bulkaction.models.OSImageNotificationProfile": "Microsoft.Compute.OSImageNotificationProfile", + "azure.mgmt.compute.bulkaction.models.OSProfile": "Microsoft.Compute.OSProfile", + "azure.mgmt.compute.bulkaction.models.OSProfileProvisioningData": "Microsoft.Compute.OSProfileProvisioningData", + "azure.mgmt.compute.bulkaction.models.PatchSettings": "Microsoft.Compute.PatchSettings", + "azure.mgmt.compute.bulkaction.models.Plan": "Azure.ResourceManager.CommonTypes.Plan", + "azure.mgmt.compute.bulkaction.models.PriorityProfile": "Microsoft.Compute.PriorityProfile", + "azure.mgmt.compute.bulkaction.models.ProxyAgentSettings": "Microsoft.Compute.ProxyAgentSettings", + "azure.mgmt.compute.bulkaction.models.PublicIPAddressSku": "Microsoft.Compute.PublicIPAddressSku", + "azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsExecutionParameters": "Microsoft.Compute.RecurringScheduledActionsExecutionParameters", + "azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsRetryPolicy": "Microsoft.Compute.RecurringScheduledActionsRetryPolicy", + "azure.mgmt.compute.bulkaction.models.ReimagePayload": "Microsoft.Compute.ReimagePayload", + "azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse": "Microsoft.Compute.ReimageResourceOperationResponse", + "azure.mgmt.compute.bulkaction.models.ReimageResourceOverride": "Microsoft.Compute.ReimageResourceOverride", + "azure.mgmt.compute.bulkaction.models.ResourceAttachRequest": "Microsoft.Compute.ResourceAttachRequest", + "azure.mgmt.compute.bulkaction.models.ResourceDetachRequest": "Microsoft.Compute.ResourceDetachRequest", + "azure.mgmt.compute.bulkaction.models.ResourceNotificationDetails": "Microsoft.Compute.ResourceNotificationDetails", "azure.mgmt.compute.bulkaction.models.ResourceOperation": "Microsoft.Compute.ResourceOperation", "azure.mgmt.compute.bulkaction.models.ResourceOperationDetails": "Microsoft.Compute.ResourceOperationDetails", "azure.mgmt.compute.bulkaction.models.ResourceOperationError": "Microsoft.Compute.ResourceOperationError", + "azure.mgmt.compute.bulkaction.models.ResourceOperationResponse": "Microsoft.Compute.ResourceOperationResponse", + "azure.mgmt.compute.bulkaction.models.ResourcePatchRequest": "Microsoft.Compute.ResourcePatchRequest", + "azure.mgmt.compute.bulkaction.models.ResourceProvisionPayload": "Microsoft.Compute.ResourceProvisionPayload", + "azure.mgmt.compute.bulkaction.models.ResourceProvisionVdiPayload": "Microsoft.Compute.ResourceProvisionVdiPayload", + "azure.mgmt.compute.bulkaction.models.ResourceResultSummary": "Microsoft.Compute.ResourceResultSummary", "azure.mgmt.compute.bulkaction.models.Resources": "Microsoft.Compute.Resources", + "azure.mgmt.compute.bulkaction.models.ResourceStatus": "Microsoft.Compute.ResourceStatus", + "azure.mgmt.compute.bulkaction.models.ResourcesWithContext": "Microsoft.Compute.ResourcesWithContext", + "azure.mgmt.compute.bulkaction.models.ResourceWithContext": "Microsoft.Compute.ResourceWithContext", "azure.mgmt.compute.bulkaction.models.RetryPolicy": "Microsoft.Compute.RetryPolicy", + "azure.mgmt.compute.bulkaction.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.compute.bulkaction.models.ScheduledAction": "Microsoft.Compute.ScheduledAction", + "azure.mgmt.compute.bulkaction.models.ScheduledActionProperties": "Microsoft.Compute.ScheduledActionProperties", + "azure.mgmt.compute.bulkaction.models.ScheduledActionResource": "Microsoft.Compute.ScheduledActionResource", + "azure.mgmt.compute.bulkaction.models.ScheduledActionResourceInput": "Microsoft.Compute.ScheduledActionResourceInput", + "azure.mgmt.compute.bulkaction.models.ScheduledActionResources": "Microsoft.Compute.ScheduledActionResources", + "azure.mgmt.compute.bulkaction.models.ScheduledActionsExtensionProperties": "Microsoft.Compute.ScheduledActionsExtensionProperties", + "azure.mgmt.compute.bulkaction.models.ScheduledActionsSchedule": "Microsoft.Compute.ScheduledActionsSchedule", + "azure.mgmt.compute.bulkaction.models.ScheduledActionsScheduleUpdate": "Microsoft.Compute.ScheduledActionsScheduleUpdate", + "azure.mgmt.compute.bulkaction.models.ScheduledActionUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "azure.mgmt.compute.bulkaction.models.ScheduledActionUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "azure.mgmt.compute.bulkaction.models.ScheduledEventsAdditionalPublishingTargets": "Microsoft.Compute.ScheduledEventsAdditionalPublishingTargets", + "azure.mgmt.compute.bulkaction.models.ScheduledEventsPolicy": "Microsoft.Compute.ScheduledEventsPolicy", + "azure.mgmt.compute.bulkaction.models.ScheduledEventsProfile": "Microsoft.Compute.ScheduledEventsProfile", + "azure.mgmt.compute.bulkaction.models.SecurityProfile": "Microsoft.Compute.SecurityProfile", + "azure.mgmt.compute.bulkaction.models.SshConfiguration": "Microsoft.Compute.SshConfiguration", + "azure.mgmt.compute.bulkaction.models.SshPublicKey": "Microsoft.Compute.SshPublicKey", "azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse": "Microsoft.Compute.StartResourceOperationResponse", + "azure.mgmt.compute.bulkaction.models.StorageProfile": "Microsoft.Compute.StorageProfile", + "azure.mgmt.compute.bulkaction.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.compute.bulkaction.models.TerminateNotificationProfile": "Microsoft.Compute.TerminateNotificationProfile", + "azure.mgmt.compute.bulkaction.models.UefiSettings": "Microsoft.Compute.UefiSettings", + "azure.mgmt.compute.bulkaction.models.UserAssignedIdentitiesValue": "Microsoft.Compute.UserAssignedIdentitiesValue", + "azure.mgmt.compute.bulkaction.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "azure.mgmt.compute.bulkaction.models.UserInitiatedReboot": "Microsoft.Compute.UserInitiatedReboot", + "azure.mgmt.compute.bulkaction.models.UserInitiatedRedeploy": "Microsoft.Compute.UserInitiatedRedeploy", + "azure.mgmt.compute.bulkaction.models.VaultCertificate": "Microsoft.Compute.VaultCertificate", + "azure.mgmt.compute.bulkaction.models.VaultSecretGroup": "Microsoft.Compute.VaultSecretGroup", + "azure.mgmt.compute.bulkaction.models.VirtualHardDisk": "Microsoft.Compute.VirtualHardDisk", + "azure.mgmt.compute.bulkaction.models.VirtualMachine": "Microsoft.Compute.VirtualMachine", + "azure.mgmt.compute.bulkaction.models.VirtualMachineIdentity": "Microsoft.Compute.VirtualMachineIdentity", + "azure.mgmt.compute.bulkaction.models.VirtualMachineInfo": "Microsoft.Compute.VirtualMachineInfo", + "azure.mgmt.compute.bulkaction.models.VirtualMachineIpTag": "Microsoft.Compute.VirtualMachineIpTag", + "azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceConfiguration": "Microsoft.Compute.VirtualMachineNetworkInterfaceConfiguration", + "azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceConfigurationProperties": "Microsoft.Compute.VirtualMachineNetworkInterfaceConfigurationProperties", + "azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration": "Microsoft.Compute.VirtualMachineNetworkInterfaceDnsSettingsConfiguration", + "azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceIPConfiguration": "Microsoft.Compute.VirtualMachineNetworkInterfaceIPConfiguration", + "azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceIPConfigurationProperties": "Microsoft.Compute.VirtualMachineNetworkInterfaceIPConfigurationProperties", + "azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressConfiguration": "Microsoft.Compute.VirtualMachinePublicIPAddressConfiguration", + "azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressConfigurationProperties": "Microsoft.Compute.VirtualMachinePublicIPAddressConfigurationProperties", + "azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration": "Microsoft.Compute.VirtualMachinePublicIPAddressDnsSettingsConfiguration", + "azure.mgmt.compute.bulkaction.models.VirtualMachineReimageParameters": "Microsoft.Compute.VirtualMachineReimageParameters", + "azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxDouble": "Microsoft.Compute.VMAttributeMinMaxDouble", + "azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxInteger": "Microsoft.Compute.VMAttributeMinMaxInteger", + "azure.mgmt.compute.bulkaction.models.VMAttributes": "Microsoft.Compute.VMAttributes", + "azure.mgmt.compute.bulkaction.models.VMDiskSecurityProfile": "Microsoft.Compute.VMDiskSecurityProfile", + "azure.mgmt.compute.bulkaction.models.VMGalleryApplication": "Microsoft.Compute.VMGalleryApplication", + "azure.mgmt.compute.bulkaction.models.VmSizeProfile": "Microsoft.Compute.VmSizeProfile", + "azure.mgmt.compute.bulkaction.models.VmSizeProperties": "Microsoft.Compute.VmSizeProperties", + "azure.mgmt.compute.bulkaction.models.WindowsConfiguration": "Microsoft.Compute.WindowsConfiguration", + "azure.mgmt.compute.bulkaction.models.WindowsVMGuestPatchAutomaticByPlatformSettings": "Microsoft.Compute.WindowsVMGuestPatchAutomaticByPlatformSettings", + "azure.mgmt.compute.bulkaction.models.WinRMConfiguration": "Microsoft.Compute.WinRMConfiguration", + "azure.mgmt.compute.bulkaction.models.WinRMListener": "Microsoft.Compute.WinRMListener", + "azure.mgmt.compute.bulkaction.models.ZoneAllocationPolicy": "Microsoft.Compute.ZoneAllocationPolicy", + "azure.mgmt.compute.bulkaction.models.ZonePreference": "Microsoft.Compute.ZonePreference", "azure.mgmt.compute.bulkaction.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", "azure.mgmt.compute.bulkaction.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", "azure.mgmt.compute.bulkaction.models.ResourceOperationType": "Microsoft.Compute.ResourceOperationType", "azure.mgmt.compute.bulkaction.models.DeadlineType": "Microsoft.Compute.DeadlineType", "azure.mgmt.compute.bulkaction.models.OperationState": "Microsoft.Compute.OperationState", + "azure.mgmt.compute.bulkaction.models.OptimizationPreference": "Microsoft.Compute.OptimizationPreference", + "azure.mgmt.compute.bulkaction.models.OsType": "Microsoft.Compute.OsType", + "azure.mgmt.compute.bulkaction.models.PriorityType": "Microsoft.Compute.PriorityType", + "azure.mgmt.compute.bulkaction.models.EvictionPolicy": "Microsoft.Compute.EvictionPolicy", + "azure.mgmt.compute.bulkaction.models.AllocationStrategy": "Microsoft.Compute.AllocationStrategy", + "azure.mgmt.compute.bulkaction.models.DistributionStrategy": "Microsoft.Compute.DistributionStrategy", + "azure.mgmt.compute.bulkaction.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.compute.bulkaction.models.ProvisioningState": "Microsoft.Compute.ProvisioningState", + "azure.mgmt.compute.bulkaction.models.CapacityType": "Microsoft.Compute.CapacityType", + "azure.mgmt.compute.bulkaction.models.ArchitectureType": "Microsoft.Compute.ArchitectureType", + "azure.mgmt.compute.bulkaction.models.VMAttributeSupport": "Microsoft.Compute.VMAttributeSupport", + "azure.mgmt.compute.bulkaction.models.LocalStorageDiskType": "Microsoft.Compute.LocalStorageDiskType", + "azure.mgmt.compute.bulkaction.models.AcceleratorManufacturer": "Microsoft.Compute.AcceleratorManufacturer", + "azure.mgmt.compute.bulkaction.models.AcceleratorType": "Microsoft.Compute.AcceleratorType", + "azure.mgmt.compute.bulkaction.models.VMCategory": "Microsoft.Compute.VMCategory", + "azure.mgmt.compute.bulkaction.models.CpuManufacturer": "Microsoft.Compute.CpuManufacturer", + "azure.mgmt.compute.bulkaction.models.HyperVGeneration": "Microsoft.Compute.HyperVGeneration", + "azure.mgmt.compute.bulkaction.models.OperatingSystemTypes": "Microsoft.Compute.OperatingSystemTypes", + "azure.mgmt.compute.bulkaction.models.CachingTypes": "Microsoft.Compute.CachingTypes", + "azure.mgmt.compute.bulkaction.models.DiffDiskOptions": "Microsoft.Compute.DiffDiskOptions", + "azure.mgmt.compute.bulkaction.models.DiffDiskPlacement": "Microsoft.Compute.DiffDiskPlacement", + "azure.mgmt.compute.bulkaction.models.DiskCreateOptionTypes": "Microsoft.Compute.DiskCreateOptionTypes", + "azure.mgmt.compute.bulkaction.models.StorageAccountTypes": "Microsoft.Compute.StorageAccountTypes", + "azure.mgmt.compute.bulkaction.models.SecurityEncryptionTypes": "Microsoft.Compute.SecurityEncryptionTypes", + "azure.mgmt.compute.bulkaction.models.DiskDeleteOptionTypes": "Microsoft.Compute.DiskDeleteOptionTypes", + "azure.mgmt.compute.bulkaction.models.DiskDetachOptionTypes": "Microsoft.Compute.DiskDetachOptionTypes", + "azure.mgmt.compute.bulkaction.models.DiskControllerTypes": "Microsoft.Compute.DiskControllerTypes", + "azure.mgmt.compute.bulkaction.models.SettingNames": "Microsoft.Compute.SettingNames", + "azure.mgmt.compute.bulkaction.models.WindowsVMGuestPatchMode": "Microsoft.Compute.WindowsVMGuestPatchMode", + "azure.mgmt.compute.bulkaction.models.WindowsPatchAssessmentMode": "Microsoft.Compute.WindowsPatchAssessmentMode", + "azure.mgmt.compute.bulkaction.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting": "Microsoft.Compute.WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "azure.mgmt.compute.bulkaction.models.ProtocolTypes": "Microsoft.Compute.ProtocolTypes", + "azure.mgmt.compute.bulkaction.models.LinuxVMGuestPatchMode": "Microsoft.Compute.LinuxVMGuestPatchMode", + "azure.mgmt.compute.bulkaction.models.LinuxPatchAssessmentMode": "Microsoft.Compute.LinuxPatchAssessmentMode", + "azure.mgmt.compute.bulkaction.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting": "Microsoft.Compute.LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "azure.mgmt.compute.bulkaction.models.DeleteOptions": "Microsoft.Compute.DeleteOptions", + "azure.mgmt.compute.bulkaction.models.NetworkApiVersion": "Microsoft.Compute.NetworkApiVersion", + "azure.mgmt.compute.bulkaction.models.DomainNameLabelScopeTypes": "Microsoft.Compute.DomainNameLabelScopeTypes", + "azure.mgmt.compute.bulkaction.models.IPVersions": "Microsoft.Compute.IPVersions", + "azure.mgmt.compute.bulkaction.models.PublicIPAllocationMethod": "Microsoft.Compute.PublicIPAllocationMethod", + "azure.mgmt.compute.bulkaction.models.PublicIPAddressSkuName": "Microsoft.Compute.PublicIPAddressSkuName", + "azure.mgmt.compute.bulkaction.models.PublicIPAddressSkuTier": "Microsoft.Compute.PublicIPAddressSkuTier", + "azure.mgmt.compute.bulkaction.models.NetworkInterfaceAuxiliaryMode": "Microsoft.Compute.NetworkInterfaceAuxiliaryMode", + "azure.mgmt.compute.bulkaction.models.NetworkInterfaceAuxiliarySku": "Microsoft.Compute.NetworkInterfaceAuxiliarySku", + "azure.mgmt.compute.bulkaction.models.SecurityTypes": "Microsoft.Compute.SecurityTypes", + "azure.mgmt.compute.bulkaction.models.Mode": "Microsoft.Compute.Mode", + "azure.mgmt.compute.bulkaction.models.Modes": "Microsoft.Compute.Modes", + "azure.mgmt.compute.bulkaction.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "azure.mgmt.compute.bulkaction.models.VMOperationStatus": "Microsoft.Compute.VMOperationStatus", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomAllocationStrategy": "Microsoft.Compute.BulkCreateCustomAllocationStrategy", + "azure.mgmt.compute.bulkaction.models.ResourceIdentityType": "Microsoft.Compute.ResourceIdentityType", + "azure.mgmt.compute.bulkaction.models.BulkCreateCustomDistributionStrategy": "Microsoft.Compute.BulkCreateCustomDistributionStrategy", + "azure.mgmt.compute.bulkaction.models.ResourceType": "Microsoft.Compute.ResourceType", + "azure.mgmt.compute.bulkaction.models.ScheduledActionType": "Microsoft.Compute.ScheduledActionType", + "azure.mgmt.compute.bulkaction.models.WeekDay": "Microsoft.Compute.WeekDay", + "azure.mgmt.compute.bulkaction.models.Month": "Microsoft.Compute.Month", + "azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsResourceOperationType": "Microsoft.Compute.RecurringScheduledActionsResourceOperationType", + "azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsDeadlineType": "Microsoft.Compute.RecurringScheduledActionsDeadlineType", + "azure.mgmt.compute.bulkaction.models.NotificationType": "Microsoft.Compute.NotificationType", + "azure.mgmt.compute.bulkaction.models.Language": "Microsoft.Compute.Language", + "azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsProvisioningState": "Microsoft.Compute.RecurringScheduledActionsProvisioningState", + "azure.mgmt.compute.bulkaction.models.ResourceOperationStatus": "Microsoft.Compute.ResourceOperationStatus", + "azure.mgmt.compute.bulkaction.models.OccurrenceState": "Microsoft.Compute.OccurrenceState", + "azure.mgmt.compute.bulkaction.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", "azure.mgmt.compute.bulkaction.operations.Operations.list": "Azure.ResourceManager.Operations.list", "azure.mgmt.compute.bulkaction.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_deallocate_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkDeallocate", @@ -38,12 +246,96 @@ "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_hibernate_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkHibernate", "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_start_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkStart", "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_start_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkStart", + "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_create_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkCreate", + "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_create_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkCreate", + "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_vdi_flex_create_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkVdiFlexCreate", + "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_vdi_flex_create_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkVdiFlexCreate", "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_delete_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkDelete", "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_delete_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkDelete", "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_get_operations_status": "Microsoft.Compute.VirtualMachineBulkOperations.bulkGetOperationsStatus", "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_get_operations_status": "Microsoft.Compute.VirtualMachineBulkOperations.bulkGetOperationsStatus", "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_cancel_operations": "Microsoft.Compute.VirtualMachineBulkOperations.bulkCancel", - "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_cancel_operations": "Microsoft.Compute.VirtualMachineBulkOperations.bulkCancel" + "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_cancel_operations": "Microsoft.Compute.VirtualMachineBulkOperations.bulkCancel", + "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_reimage_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkReimage", + "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_reimage_operation": "Microsoft.Compute.VirtualMachineBulkOperations.bulkReimage", + "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_list_operation_errors": "Microsoft.Compute.VirtualMachineBulkOperations.bulkListOperationErrors", + "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_list_operation_errors": "Microsoft.Compute.VirtualMachineBulkOperations.bulkListOperationErrors", + "azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations.bulk_acknowledge_operation_errors": "Microsoft.Compute.VirtualMachineBulkOperations.bulkAcknowledgeOperationErrors", + "azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations.bulk_acknowledge_operation_errors": "Microsoft.Compute.VirtualMachineBulkOperations.bulkAcknowledgeOperationErrors", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.get": "Microsoft.Compute.LaunchBulkInstancesOperation.get", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.get": "Microsoft.Compute.LaunchBulkInstancesOperation.get", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.get_operation_status": "Microsoft.Compute.LaunchBulkInstancesOperation.getOperationStatus", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.get_operation_status": "Microsoft.Compute.LaunchBulkInstancesOperation.getOperationStatus", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.begin_create_or_update": "Microsoft.Compute.LaunchBulkInstancesOperation.createOrUpdate", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.begin_create_or_update": "Microsoft.Compute.LaunchBulkInstancesOperation.createOrUpdate", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.begin_delete": "Microsoft.Compute.LaunchBulkInstancesOperation.delete", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.begin_delete": "Microsoft.Compute.LaunchBulkInstancesOperation.delete", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.begin_cancel": "Microsoft.Compute.LaunchBulkInstancesOperation.cancel", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.begin_cancel": "Microsoft.Compute.LaunchBulkInstancesOperation.cancel", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.list_by_resource_group": "Microsoft.Compute.LaunchBulkInstancesOperation.listByResourceGroup", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.list_by_resource_group": "Microsoft.Compute.LaunchBulkInstancesOperation.listByResourceGroup", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.list_by_subscription": "Microsoft.Compute.LaunchBulkInstancesOperation.listBySubscription", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.list_by_subscription": "Microsoft.Compute.LaunchBulkInstancesOperation.listBySubscription", + "azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations.list_virtual_machines": "Microsoft.Compute.LaunchBulkInstancesOperation.listVirtualMachines", + "azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations.list_virtual_machines": "Microsoft.Compute.LaunchBulkInstancesOperation.listVirtualMachines", + "azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations.get": "Microsoft.Compute.BulkCreateCustom.get", + "azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations.get": "Microsoft.Compute.BulkCreateCustom.get", + "azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations.get_async_operation_status": "Microsoft.Compute.BulkCreateCustom.getAsyncOperationStatus", + "azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations.get_async_operation_status": "Microsoft.Compute.BulkCreateCustom.getAsyncOperationStatus", + "azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations.begin_create_or_update": "Microsoft.Compute.BulkCreateCustom.createOrUpdate", + "azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations.begin_create_or_update": "Microsoft.Compute.BulkCreateCustom.createOrUpdate", + "azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations.begin_delete": "Microsoft.Compute.BulkCreateCustom.delete", + "azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations.begin_delete": "Microsoft.Compute.BulkCreateCustom.delete", + "azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations.begin_cancel": "Microsoft.Compute.BulkCreateCustom.cancel", + "azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations.begin_cancel": "Microsoft.Compute.BulkCreateCustom.cancel", + "azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations.list_by_resource_group": "Microsoft.Compute.BulkCreateCustom.listByResourceGroup", + "azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations.list_by_resource_group": "Microsoft.Compute.BulkCreateCustom.listByResourceGroup", + "azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations.list_by_subscription": "Microsoft.Compute.BulkCreateCustom.listBySubscription", + "azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations.list_by_subscription": "Microsoft.Compute.BulkCreateCustom.listBySubscription", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.get": "Microsoft.Compute.ScheduledActions.get", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.get": "Microsoft.Compute.ScheduledActions.get", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_create_or_update": "Microsoft.Compute.ScheduledActions.createOrUpdate", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_create_or_update": "Microsoft.Compute.ScheduledActions.createOrUpdate", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_update": "Microsoft.Compute.ScheduledActions.update", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_update": "Microsoft.Compute.ScheduledActions.update", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_delete": "Microsoft.Compute.ScheduledActions.delete", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_delete": "Microsoft.Compute.ScheduledActions.delete", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.list_by_resource_group": "Microsoft.Compute.ScheduledActions.listByResourceGroup", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.list_by_resource_group": "Microsoft.Compute.ScheduledActions.listByResourceGroup", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.list_by_subscription": "Microsoft.Compute.ScheduledActions.listBySubscription", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.list_by_subscription": "Microsoft.Compute.ScheduledActions.listBySubscription", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.list_resources": "Microsoft.Compute.ScheduledActions.listResources", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.list_resources": "Microsoft.Compute.ScheduledActions.listResources", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_attach_resources": "Microsoft.Compute.ScheduledActions.attachResources", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_attach_resources": "Microsoft.Compute.ScheduledActions.attachResources", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_detach_resources": "Microsoft.Compute.ScheduledActions.detachResources", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_detach_resources": "Microsoft.Compute.ScheduledActions.detachResources", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.patch_resources": "Microsoft.Compute.ScheduledActions.patchResources", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.patch_resources": "Microsoft.Compute.ScheduledActions.patchResources", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_disable": "Microsoft.Compute.ScheduledActions.disable", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_disable": "Microsoft.Compute.ScheduledActions.disable", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_enable": "Microsoft.Compute.ScheduledActions.enable", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_enable": "Microsoft.Compute.ScheduledActions.enable", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_cancel_next_occurrence": "Microsoft.Compute.ScheduledActions.cancelNextOccurrence", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_cancel_next_occurrence": "Microsoft.Compute.ScheduledActions.cancelNextOccurrence", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations.begin_trigger_manual_occurrence": "Microsoft.Compute.ScheduledActions.triggerManualOccurrence", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations.begin_trigger_manual_occurrence": "Microsoft.Compute.ScheduledActions.triggerManualOccurrence", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionExtensionOperations.list_by_vms": "Microsoft.Compute.ScheduledActionExtension.listByVms", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionExtensionOperations.list_by_vms": "Microsoft.Compute.ScheduledActionExtension.listByVms", + "azure.mgmt.compute.bulkaction.operations.ScheduledActionOperationStatusOperations.get": "Microsoft.Compute.ScheduledActionOperationStatus.get", + "azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionOperationStatusOperations.get": "Microsoft.Compute.ScheduledActionOperationStatus.get", + "azure.mgmt.compute.bulkaction.operations.OccurrencesOperations.get": "Microsoft.Compute.Occurrences.get", + "azure.mgmt.compute.bulkaction.aio.operations.OccurrencesOperations.get": "Microsoft.Compute.Occurrences.get", + "azure.mgmt.compute.bulkaction.operations.OccurrencesOperations.list_by_scheduled_action": "Microsoft.Compute.Occurrences.listByScheduledAction", + "azure.mgmt.compute.bulkaction.aio.operations.OccurrencesOperations.list_by_scheduled_action": "Microsoft.Compute.Occurrences.listByScheduledAction", + "azure.mgmt.compute.bulkaction.operations.OccurrencesOperations.list_resources": "Microsoft.Compute.Occurrences.listResources", + "azure.mgmt.compute.bulkaction.aio.operations.OccurrencesOperations.list_resources": "Microsoft.Compute.Occurrences.listResources", + "azure.mgmt.compute.bulkaction.operations.OccurrencesOperations.begin_cancel": "Microsoft.Compute.Occurrences.cancel", + "azure.mgmt.compute.bulkaction.aio.operations.OccurrencesOperations.begin_cancel": "Microsoft.Compute.Occurrences.cancel", + "azure.mgmt.compute.bulkaction.operations.OccurrencesOperations.begin_delay": "Microsoft.Compute.Occurrences.delay", + "azure.mgmt.compute.bulkaction.aio.operations.OccurrencesOperations.begin_delay": "Microsoft.Compute.Occurrences.delay", + "azure.mgmt.compute.bulkaction.operations.OccurrenceExtensionOperations.list_occurrence_by_vms": "Microsoft.Compute.OccurrenceExtension.listOccurrenceByVms", + "azure.mgmt.compute.bulkaction.aio.operations.OccurrenceExtensionOperations.list_occurrence_by_vms": "Microsoft.Compute.OccurrenceExtension.listOccurrenceByVms" }, - "CrossLanguageVersion": "792a97e6ab5d" + "CrossLanguageVersion": "6aa06176429e" } \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_client.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_client.py index 9d7a41bf372f..db2229bad33c 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_client.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_client.py @@ -19,7 +19,17 @@ from ._configuration import ComputeBulkActionsMgmtClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import Operations, VirtualMachineBulkOperationsOperations +from .operations import ( + BulkCreateCustomOperations, + LaunchBulkInstancesOperationOperations, + OccurrenceExtensionOperations, + OccurrencesOperations, + Operations, + ScheduledActionExtensionOperations, + ScheduledActionOperationStatusOperations, + ScheduledActionsOperations, + VirtualMachineBulkOperationsOperations, +) if sys.version_info >= (3, 11): from typing import Self @@ -31,7 +41,7 @@ from azure.core.credentials import TokenCredential -class ComputeBulkActionsMgmtClient: +class ComputeBulkActionsMgmtClient: # pylint: disable=too-many-instance-attributes """ComputeBulkActionsMgmtClient. :ivar operations: Operations operations @@ -39,6 +49,25 @@ class ComputeBulkActionsMgmtClient: :ivar virtual_machine_bulk_operations: VirtualMachineBulkOperationsOperations operations :vartype virtual_machine_bulk_operations: azure.mgmt.compute.bulkaction.operations.VirtualMachineBulkOperationsOperations + :ivar launch_bulk_instances_operation: LaunchBulkInstancesOperationOperations operations + :vartype launch_bulk_instances_operation: + azure.mgmt.compute.bulkaction.operations.LaunchBulkInstancesOperationOperations + :ivar bulk_create_custom: BulkCreateCustomOperations operations + :vartype bulk_create_custom: + azure.mgmt.compute.bulkaction.operations.BulkCreateCustomOperations + :ivar scheduled_actions: ScheduledActionsOperations operations + :vartype scheduled_actions: azure.mgmt.compute.bulkaction.operations.ScheduledActionsOperations + :ivar scheduled_action_extension: ScheduledActionExtensionOperations operations + :vartype scheduled_action_extension: + azure.mgmt.compute.bulkaction.operations.ScheduledActionExtensionOperations + :ivar scheduled_action_operation_status: ScheduledActionOperationStatusOperations operations + :vartype scheduled_action_operation_status: + azure.mgmt.compute.bulkaction.operations.ScheduledActionOperationStatusOperations + :ivar occurrences: OccurrencesOperations operations + :vartype occurrences: azure.mgmt.compute.bulkaction.operations.OccurrencesOperations + :ivar occurrence_extension: OccurrenceExtensionOperations operations + :vartype occurrence_extension: + azure.mgmt.compute.bulkaction.operations.OccurrenceExtensionOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -48,10 +77,13 @@ class ComputeBulkActionsMgmtClient: :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-06-06" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-07-06-preview" and None. Default value is None. If not set, the operation's default API + version will be used. 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__( @@ -105,6 +137,25 @@ def __init__( self.virtual_machine_bulk_operations = VirtualMachineBulkOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.launch_bulk_instances_operation = LaunchBulkInstancesOperationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bulk_create_custom = BulkCreateCustomOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scheduled_actions = ScheduledActionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scheduled_action_extension = ScheduledActionExtensionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scheduled_action_operation_status = ScheduledActionOperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.occurrences = OccurrencesOperations(self._client, self._config, self._serialize, self._deserialize) + self.occurrence_extension = OccurrenceExtensionOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_configuration.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_configuration.py index 167e839b9479..fc4384e65877 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_configuration.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_configuration.py @@ -33,9 +33,10 @@ class ComputeBulkActionsMgmtClientConfiguration: # pylint: disable=too-many-ins :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-06-06" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-07-06-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -47,7 +48,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-06-06") + api_version: str = kwargs.pop("api_version", "2026-07-06-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_validation.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_validation.py new file mode 100644 index 000000000000..f5af3a4eb8a2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_validation.py @@ -0,0 +1,66 @@ +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- +import functools + + +def api_version_validation(**kwargs): + params_added_on = kwargs.pop("params_added_on", {}) + method_added_on = kwargs.pop("method_added_on", "") + api_versions_list = kwargs.pop("api_versions_list", []) + + def _index_with_default(value: str, default: int = -1) -> int: + """Get the index of value in lst, or return default if not found. + + :param value: The value to search for in the api_versions_list. + :type value: str + :param default: The default value to return if the value is not found. + :type default: int + :return: The index of the value in the list, or the default value if not found. + :rtype: int + """ + try: + return api_versions_list.index(value) + except ValueError: + return default + + def decorator(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + try: + # this assumes the client has an _api_version attribute + client = args[0] + client_api_version = client._config.api_version # pylint: disable=protected-access + except AttributeError: + return func(*args, **kwargs) + + if _index_with_default(method_added_on) > _index_with_default(client_api_version): + raise ValueError( + f"'{func.__name__}' is not available in API version " + f"{client_api_version}. Pass service API version {method_added_on} or newer to your client." + ) + + unsupported = { + parameter: api_version + for api_version, parameters in params_added_on.items() + for parameter in parameters + if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version) + } + if unsupported: + raise ValueError( + "".join( + [ + f"'{param}' is not available in API version {client_api_version}. " + f"Use service API version {version} or newer.\n" + for param, version in unsupported.items() + ] + ) + ) + return func(*args, **kwargs) + + return wrapper + + return decorator diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_version.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_version.py index be71c81bd282..bbcd28b4aa67 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_version.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_client.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_client.py index c4da5603ae06..48d7008ea34e 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_client.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_client.py @@ -19,7 +19,17 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ComputeBulkActionsMgmtClientConfiguration -from .operations import Operations, VirtualMachineBulkOperationsOperations +from .operations import ( + BulkCreateCustomOperations, + LaunchBulkInstancesOperationOperations, + OccurrenceExtensionOperations, + OccurrencesOperations, + Operations, + ScheduledActionExtensionOperations, + ScheduledActionOperationStatusOperations, + ScheduledActionsOperations, + VirtualMachineBulkOperationsOperations, +) if sys.version_info >= (3, 11): from typing import Self @@ -31,7 +41,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class ComputeBulkActionsMgmtClient: +class ComputeBulkActionsMgmtClient: # pylint: disable=too-many-instance-attributes """ComputeBulkActionsMgmtClient. :ivar operations: Operations operations @@ -39,6 +49,26 @@ class ComputeBulkActionsMgmtClient: :ivar virtual_machine_bulk_operations: VirtualMachineBulkOperationsOperations operations :vartype virtual_machine_bulk_operations: azure.mgmt.compute.bulkaction.aio.operations.VirtualMachineBulkOperationsOperations + :ivar launch_bulk_instances_operation: LaunchBulkInstancesOperationOperations operations + :vartype launch_bulk_instances_operation: + azure.mgmt.compute.bulkaction.aio.operations.LaunchBulkInstancesOperationOperations + :ivar bulk_create_custom: BulkCreateCustomOperations operations + :vartype bulk_create_custom: + azure.mgmt.compute.bulkaction.aio.operations.BulkCreateCustomOperations + :ivar scheduled_actions: ScheduledActionsOperations operations + :vartype scheduled_actions: + azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionsOperations + :ivar scheduled_action_extension: ScheduledActionExtensionOperations operations + :vartype scheduled_action_extension: + azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionExtensionOperations + :ivar scheduled_action_operation_status: ScheduledActionOperationStatusOperations operations + :vartype scheduled_action_operation_status: + azure.mgmt.compute.bulkaction.aio.operations.ScheduledActionOperationStatusOperations + :ivar occurrences: OccurrencesOperations operations + :vartype occurrences: azure.mgmt.compute.bulkaction.aio.operations.OccurrencesOperations + :ivar occurrence_extension: OccurrenceExtensionOperations operations + :vartype occurrence_extension: + azure.mgmt.compute.bulkaction.aio.operations.OccurrenceExtensionOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -48,10 +78,13 @@ class ComputeBulkActionsMgmtClient: :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-06-06" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-07-06-preview" and None. Default value is None. If not set, the operation's default API + version will be used. 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__( @@ -107,6 +140,25 @@ def __init__( self.virtual_machine_bulk_operations = VirtualMachineBulkOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.launch_bulk_instances_operation = LaunchBulkInstancesOperationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bulk_create_custom = BulkCreateCustomOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scheduled_actions = ScheduledActionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scheduled_action_extension = ScheduledActionExtensionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scheduled_action_operation_status = ScheduledActionOperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.occurrences = OccurrencesOperations(self._client, self._config, self._serialize, self._deserialize) + self.occurrence_extension = OccurrenceExtensionOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_configuration.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_configuration.py index 76425782b9f2..441f24e8a182 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/_configuration.py @@ -33,9 +33,10 @@ class ComputeBulkActionsMgmtClientConfiguration: # pylint: disable=too-many-ins :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-06-06" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-07-06-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -47,7 +48,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-06-06") + api_version: str = kwargs.pop("api_version", "2026-07-06-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/__init__.py index 452ba05d4218..870bc4fc237b 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/__init__.py @@ -14,6 +14,13 @@ from ._operations import Operations # type: ignore from ._operations import VirtualMachineBulkOperationsOperations # type: ignore +from ._operations import LaunchBulkInstancesOperationOperations # type: ignore +from ._operations import BulkCreateCustomOperations # type: ignore +from ._operations import ScheduledActionsOperations # type: ignore +from ._operations import ScheduledActionExtensionOperations # type: ignore +from ._operations import ScheduledActionOperationStatusOperations # type: ignore +from ._operations import OccurrencesOperations # type: ignore +from ._operations import OccurrenceExtensionOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -22,6 +29,13 @@ __all__ = [ "Operations", "VirtualMachineBulkOperationsOperations", + "LaunchBulkInstancesOperationOperations", + "BulkCreateCustomOperations", + "ScheduledActionsOperations", + "ScheduledActionExtensionOperations", + "ScheduledActionOperationStatusOperations", + "OccurrencesOperations", + "OccurrenceExtensionOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/_operations.py index ba0863e1de7c..71c5b6943810 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/aio/operations/_operations.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. @@ -9,7 +9,7 @@ from collections.abc import MutableMapping from io import IOBase import json -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import AsyncPipelineClient @@ -25,23 +25,68 @@ map_error, ) from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models, types as _types from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer +from ..._validation import api_version_validation from ...operations._operations import ( + build_bulk_create_custom_cancel_request, + build_bulk_create_custom_create_or_update_request, + build_bulk_create_custom_delete_request, + build_bulk_create_custom_get_async_operation_status_request, + build_bulk_create_custom_get_request, + build_bulk_create_custom_list_by_resource_group_request, + build_bulk_create_custom_list_by_subscription_request, + build_launch_bulk_instances_operation_cancel_request, + build_launch_bulk_instances_operation_create_or_update_request, + build_launch_bulk_instances_operation_delete_request, + build_launch_bulk_instances_operation_get_operation_status_request, + build_launch_bulk_instances_operation_get_request, + build_launch_bulk_instances_operation_list_by_resource_group_request, + build_launch_bulk_instances_operation_list_by_subscription_request, + build_launch_bulk_instances_operation_list_virtual_machines_request, + build_occurrence_extension_list_occurrence_by_vms_request, + build_occurrences_cancel_request, + build_occurrences_delay_request, + build_occurrences_get_request, + build_occurrences_list_by_scheduled_action_request, + build_occurrences_list_resources_request, build_operations_list_request, + build_scheduled_action_extension_list_by_vms_request, + build_scheduled_action_operation_status_get_request, + build_scheduled_actions_attach_resources_request, + build_scheduled_actions_cancel_next_occurrence_request, + build_scheduled_actions_create_or_update_request, + build_scheduled_actions_delete_request, + build_scheduled_actions_detach_resources_request, + build_scheduled_actions_disable_request, + build_scheduled_actions_enable_request, + build_scheduled_actions_get_request, + build_scheduled_actions_list_by_resource_group_request, + build_scheduled_actions_list_by_subscription_request, + build_scheduled_actions_list_resources_request, + build_scheduled_actions_patch_resources_request, + build_scheduled_actions_trigger_manual_occurrence_request, + build_scheduled_actions_update_request, + build_virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_request, build_virtual_machine_bulk_operations_bulk_cancel_operations_request, + build_virtual_machine_bulk_operations_bulk_create_operation_request, build_virtual_machine_bulk_operations_bulk_deallocate_operation_request, build_virtual_machine_bulk_operations_bulk_delete_operation_request, build_virtual_machine_bulk_operations_bulk_get_operations_status_request, build_virtual_machine_bulk_operations_bulk_hibernate_operation_request, + build_virtual_machine_bulk_operations_bulk_list_operation_errors_request, + build_virtual_machine_bulk_operations_bulk_reimage_operation_request, build_virtual_machine_bulk_operations_bulk_start_operation_request, + build_virtual_machine_bulk_operations_bulk_vdi_flex_create_operation_request, ) from .._configuration import ComputeBulkActionsMgmtClientConfiguration @@ -720,16 +765,16 @@ async def bulk_start_operation( return deserialized # type: ignore @overload - async def bulk_delete_operation( + async def bulk_create_operation( self, resource_group_name: str, location: str, - request_body: _models.ExecuteDeleteContent, + request_body: _models.ExecuteCreateContent, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -738,27 +783,27 @@ async def bulk_delete_operation( :param location: The location name. Required. :type location: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteCreateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def bulk_delete_operation( + async def bulk_create_operation( self, resource_group_name: str, location: str, - request_body: _types.ExecuteDeleteContent, + request_body: _types.ExecuteCreateContent, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -767,18 +812,18 @@ async def bulk_delete_operation( :param location: The location name. Required. :type location: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteCreateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def bulk_delete_operation( + async def bulk_create_operation( self, resource_group_name: str, location: str, @@ -786,8 +831,8 @@ async def bulk_delete_operation( *, content_type: str = "application/json", **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -800,21 +845,35 @@ async def bulk_delete_operation( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def bulk_delete_operation( + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def bulk_create_operation( self, resource_group_name: str, location: str, - request_body: Union[_models.ExecuteDeleteContent, _types.ExecuteDeleteContent, IO[bytes]], + request_body: Union[_models.ExecuteCreateContent, _types.ExecuteCreateContent, IO[bytes]], **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -822,13 +881,13 @@ async def bulk_delete_operation( :type resource_group_name: str :param location: The location name. Required. :type location: str - :param request_body: The request body. Is either a ExecuteDeleteContent type or a IO[bytes] + :param request_body: The request body. Is either a ExecuteCreateContent type or a IO[bytes] type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent or - ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent or IO[bytes] - :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteCreateContent or + ~azure.mgmt.compute.bulkaction.types.ExecuteCreateContent or IO[bytes] + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -843,7 +902,7 @@ async def bulk_delete_operation( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DeleteResourceOperationResponse] = kwargs.pop("cls", None) + cls: ClsType[_models.CreateResourceOperationResponse] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -852,7 +911,7 @@ async def bulk_delete_operation( else: _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machine_bulk_operations_bulk_delete_operation_request( + _request = build_virtual_machine_bulk_operations_bulk_create_operation_request( resource_group_name=resource_group_name, location=location, subscription_id=self._config.subscription_id, @@ -891,7 +950,7 @@ async def bulk_delete_operation( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.DeleteResourceOperationResponse, response.json()) + deserialized = _deserialize(_models.CreateResourceOperationResponse, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -899,17 +958,17 @@ async def bulk_delete_operation( return deserialized # type: ignore @overload - async def bulk_get_operations_status( + async def bulk_vdi_flex_create_operation( self, resource_group_name: str, location: str, - request_body: _models.GetOperationStatusContent, + request_body: _models.ExecuteVdiCreateRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -917,28 +976,28 @@ async def bulk_get_operations_status( :param location: The location name. Required. :type location: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteVdiCreateRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def bulk_get_operations_status( + async def bulk_vdi_flex_create_operation( self, resource_group_name: str, location: str, - request_body: _types.GetOperationStatusContent, + request_body: _types.ExecuteVdiCreateRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -946,18 +1005,18 @@ async def bulk_get_operations_status( :param location: The location name. Required. :type location: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteVdiCreateRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def bulk_get_operations_status( + async def bulk_vdi_flex_create_operation( self, resource_group_name: str, location: str, @@ -965,9 +1024,9 @@ async def bulk_get_operations_status( *, content_type: str = "application/json", **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -979,35 +1038,49 @@ async def bulk_get_operations_status( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def bulk_get_operations_status( + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def bulk_vdi_flex_create_operation( self, resource_group_name: str, location: str, - request_body: Union[_models.GetOperationStatusContent, _types.GetOperationStatusContent, IO[bytes]], + request_body: Union[_models.ExecuteVdiCreateRequest, _types.ExecuteVdiCreateRequest, IO[bytes]], **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param location: The location name. Required. :type location: str - :param request_body: The request body. Is either a GetOperationStatusContent type or a - IO[bytes] type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent or - ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent or IO[bytes] - :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :param request_body: The request body. Is either a ExecuteVdiCreateRequest type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteVdiCreateRequest or + ~azure.mgmt.compute.bulkaction.types.ExecuteVdiCreateRequest or IO[bytes] + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1022,7 +1095,7 @@ async def bulk_get_operations_status( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GetOperationStatusResponse] = kwargs.pop("cls", None) + cls: ClsType[_models.CreateResourceOperationResponse] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -1031,7 +1104,7 @@ async def bulk_get_operations_status( else: _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machine_bulk_operations_bulk_get_operations_status_request( + _request = build_virtual_machine_bulk_operations_bulk_vdi_flex_create_operation_request( resource_group_name=resource_group_name, location=location, subscription_id=self._config.subscription_id, @@ -1070,7 +1143,7 @@ async def bulk_get_operations_status( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.GetOperationStatusResponse, response.json()) + deserialized = _deserialize(_models.CreateResourceOperationResponse, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1078,16 +1151,17 @@ async def bulk_get_operations_status( return deserialized # type: ignore @overload - async def bulk_cancel_operations( + async def bulk_delete_operation( self, resource_group_name: str, location: str, - request_body: _models.CancelOperationsContent, + request_body: _models.ExecuteDeleteContent, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -1095,27 +1169,28 @@ async def bulk_cancel_operations( :param location: The location name. Required. :type location: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def bulk_cancel_operations( + async def bulk_delete_operation( self, resource_group_name: str, location: str, - request_body: _types.CancelOperationsContent, + request_body: _types.ExecuteDeleteContent, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -1123,18 +1198,18 @@ async def bulk_cancel_operations( :param location: The location name. Required. :type location: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def bulk_cancel_operations( + async def bulk_delete_operation( self, resource_group_name: str, location: str, @@ -1142,8 +1217,9 @@ async def bulk_cancel_operations( *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -1155,34 +1231,35 @@ async def bulk_cancel_operations( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def bulk_cancel_operations( + async def bulk_delete_operation( self, resource_group_name: str, location: str, - request_body: Union[_models.CancelOperationsContent, _types.CancelOperationsContent, IO[bytes]], + request_body: Union[_models.ExecuteDeleteContent, _types.ExecuteDeleteContent, IO[bytes]], **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param location: The location name. Required. :type location: str - :param request_body: The request body. Is either a CancelOperationsContent type or a IO[bytes] + :param request_body: The request body. Is either a ExecuteDeleteContent type or a IO[bytes] type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent or - ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent or IO[bytes] - :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent or + ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent or IO[bytes] + :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1197,7 +1274,7 @@ async def bulk_cancel_operations( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CancelOperationsResponse] = kwargs.pop("cls", None) + cls: ClsType[_models.DeleteResourceOperationResponse] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -1206,7 +1283,7 @@ async def bulk_cancel_operations( else: _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machine_bulk_operations_bulk_cancel_operations_request( + _request = build_virtual_machine_bulk_operations_bulk_delete_operation_request( resource_group_name=resource_group_name, location=location, subscription_id=self._config.subscription_id, @@ -1245,9 +1322,6774 @@ async def bulk_cancel_operations( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.CancelOperationsResponse, response.json()) + deserialized = _deserialize(_models.DeleteResourceOperationResponse, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + + @overload + async def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: _models.GetOperationStatusContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: _types.GetOperationStatusContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.GetOperationStatusContent, _types.GetOperationStatusContent, IO[bytes]], + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a GetOperationStatusContent type or a + IO[bytes] type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent or + ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent or IO[bytes] + :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :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.GetOperationStatusResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_get_operations_status_request( + resource_group_name=resource_group_name, + location=location, + 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.GetOperationStatusResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: _models.CancelOperationsContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: _types.CancelOperationsContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.CancelOperationsContent, _types.CancelOperationsContent, IO[bytes]], + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a CancelOperationsContent type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent or + ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent or IO[bytes] + :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :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.CancelOperationsResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_cancel_operations_request( + resource_group_name=resource_group_name, + location=location, + 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.CancelOperationsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteReimageRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteReimageRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteReimageRequest, _types.ExecuteReimageRequest, IO[bytes]], + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteReimageRequest type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteReimageRequest or + ~azure.mgmt.compute.bulkaction.types.ExecuteReimageRequest or IO[bytes] + :return: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :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.ReimageResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_reimage_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.ReimageResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "lookback_in_minutes", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def bulk_list_operation_errors( + self, resource_group_name: str, location: str, *, lookback_in_minutes: Optional[int] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.ResourceOperation"]: + """BulkListOperationErrors: List bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :keyword lookback_in_minutes: The number of minutes to look back for errors. Default value is + None. + :paramtype lookback_in_minutes: int + :return: An iterator like instance of ResourceOperation + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.ResourceOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_virtual_machine_bulk_operations_bulk_list_operation_errors_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + lookback_in_minutes=lookback_in_minutes, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: _models.AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: _types.AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.AcknowledgeBulkOperationErrorsRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. 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: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: Union[ + _models.AcknowledgeBulkOperationErrorsRequest, _types.AcknowledgeBulkOperationErrorsRequest, IO[bytes] + ], + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. Is either a + AcknowledgeBulkOperationErrorsRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsRequest or + ~azure.mgmt.compute.bulkaction.types.AcknowledgeBulkOperationErrorsRequest or IO[bytes] + :return: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :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.AcknowledgeBulkOperationErrorsResponse] = 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_virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_request( + resource_group_name=resource_group_name, + location=location, + 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.AcknowledgeBulkOperationErrorsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class LaunchBulkInstancesOperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient`'s + :attr:`launch_bulk_instances_operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def get( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> _models.LocationBasedLaunchBulkInstancesOperation: + """Gets an instance of LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :return: LocationBasedLaunchBulkInstancesOperation. The + LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LocationBasedLaunchBulkInstancesOperation] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_get_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.LocationBasedLaunchBulkInstancesOperation, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "location", "async_operation_id", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def get_operation_status( + self, location: str, async_operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of a LaunchBulkInstancesOperation. + + :param location: The location name. Required. + :type location: str + :param async_operation_id: The async operation id. Required. + :type async_operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.OperationStatusResult + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_get_operation_status_request( + location=location, + async_operation_id=async_operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _create_or_update_initial( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[ + _models.LocationBasedLaunchBulkInstancesOperation, + _types.LocationBasedLaunchBulkInstancesOperation, + IO[bytes], + ], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource, (IOBase, bytes)): + _content = resource + else: + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_launch_bulk_instances_operation_create_or_update_request( + resource_group_name=resource_group_name, + location=location, + name=name, + 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 = True + 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, 201]: + 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) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _models.LocationBasedLaunchBulkInstancesOperation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns LocationBasedLaunchBulkInstancesOperation. + The LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _types.LocationBasedLaunchBulkInstancesOperation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.types.LocationBasedLaunchBulkInstancesOperation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns LocationBasedLaunchBulkInstancesOperation. + The LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: 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: An instance of AsyncLROPoller that returns LocationBasedLaunchBulkInstancesOperation. + The LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[ + _models.LocationBasedLaunchBulkInstancesOperation, + _types.LocationBasedLaunchBulkInstancesOperation, + IO[bytes], + ], + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Is either a + LocationBasedLaunchBulkInstancesOperation type or a IO[bytes] type. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation + or ~azure.mgmt.compute.bulkaction.types.LocationBasedLaunchBulkInstancesOperation or IO[bytes] + :return: An instance of AsyncLROPoller that returns LocationBasedLaunchBulkInstancesOperation. + The LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.LocationBasedLaunchBulkInstancesOperation] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + resource=resource, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.LocationBasedLaunchBulkInstancesOperation, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.LocationBasedLaunchBulkInstancesOperation].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.LocationBasedLaunchBulkInstancesOperation]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _delete_initial( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_delete_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + delete_instances=delete_instances, + api_version=self._config.api_version, + 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 = True + 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 [202, 204]: + 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) + + response_headers = {} + if response.status_code == 202: + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_delete( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :keyword delete_instances: When true, deletes all virtual machines created by this BulkAction + Operation. Default value is None. + :paramtype delete_instances: bool + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + delete_instances=delete_instances, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _cancel_initial( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_cancel_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_cancel( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Cancels LaunchBulkInstancesOperation instances that have not yet launched. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_resource_group( + self, resource_group_name: str, location: str, **kwargs: Any + ) -> AsyncItemPaged["_models.LocationBasedLaunchBulkInstancesOperation"]: + """List LaunchBulkInstancesOperation resources by resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedLaunchBulkInstancesOperation + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedLaunchBulkInstancesOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_launch_bulk_instances_operation_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedLaunchBulkInstancesOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "location", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_subscription( + self, location: str, **kwargs: Any + ) -> AsyncItemPaged["_models.LocationBasedLaunchBulkInstancesOperation"]: + """List LaunchBulkInstancesOperation resources by subscriptionId. + + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedLaunchBulkInstancesOperation + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedLaunchBulkInstancesOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_launch_bulk_instances_operation_list_by_subscription_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedLaunchBulkInstancesOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "filter", + "skiptoken", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_virtual_machines( + self, + resource_group_name: str, + location: str, + name: str, + *, + filter: Optional[str] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.VirtualMachine"]: + """List VirtualMachine resources of a LaunchBulkInstancesOperation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :keyword filter: Filter expression to filter the virtual machines. Default value is None. + :paramtype filter: str + :keyword skiptoken: Skip token for pagination. Uses the token from a previous response to fetch + the next page of results. Default value is None. + :paramtype skiptoken: str + :return: An iterator like instance of VirtualMachine + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.VirtualMachine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.VirtualMachine]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_launch_bulk_instances_operation_list_virtual_machines_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + filter=filter, + skiptoken=skiptoken, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.VirtualMachine], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class BulkCreateCustomOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient`'s + :attr:`bulk_create_custom` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def get( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> _models.LocationBasedBulkCreateCustom: + """Gets an instance of BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :return: LocationBasedBulkCreateCustom. The LocationBasedBulkCreateCustom is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LocationBasedBulkCreateCustom] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_get_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.LocationBasedBulkCreateCustom, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "location", "async_operation_id", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def get_async_operation_status( + self, location: str, async_operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of an async operation of a BulkCreateCustom. + + :param location: The location name. Required. + :type location: str + :param async_operation_id: The async operation id. Required. + :type async_operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.OperationStatusResult + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_get_async_operation_status_request( + location=location, + async_operation_id=async_operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _create_or_update_initial( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[_models.LocationBasedBulkCreateCustom, _types.LocationBasedBulkCreateCustom, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource, (IOBase, bytes)): + _content = resource + else: + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_bulk_create_custom_create_or_update_request( + resource_group_name=resource_group_name, + location=location, + name=name, + 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 = True + 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, 201]: + 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) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _models.LocationBasedBulkCreateCustom, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _types.LocationBasedBulkCreateCustom, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.types.LocationBasedBulkCreateCustom + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: 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: An instance of AsyncLROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[_models.LocationBasedBulkCreateCustom, _types.LocationBasedBulkCreateCustom, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Is either a LocationBasedBulkCreateCustom type or + a IO[bytes] type. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom or + ~azure.mgmt.compute.bulkaction.types.LocationBasedBulkCreateCustom or IO[bytes] + :return: An instance of AsyncLROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.LocationBasedBulkCreateCustom] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + resource=resource, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.LocationBasedBulkCreateCustom, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.LocationBasedBulkCreateCustom].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.LocationBasedBulkCreateCustom]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _delete_initial( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_delete_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + delete_instances=delete_instances, + api_version=self._config.api_version, + 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 = True + 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 [202, 204]: + 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) + + response_headers = {} + if response.status_code == 202: + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_delete( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :keyword delete_instances: When true, deletes all virtual machines created by this BulkAction + Operation. Default value is None. + :paramtype delete_instances: bool + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + delete_instances=delete_instances, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _cancel_initial( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_cancel_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_cancel( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Cancels BulkCreateCustom instances that have not yet launched. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_resource_group( + self, resource_group_name: str, location: str, **kwargs: Any + ) -> AsyncItemPaged["_models.LocationBasedBulkCreateCustom"]: + """List BulkCreateCustom resources by resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedBulkCreateCustom + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedBulkCreateCustom]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_bulk_create_custom_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedBulkCreateCustom], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "location", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_subscription( + self, location: str, **kwargs: Any + ) -> AsyncItemPaged["_models.LocationBasedBulkCreateCustom"]: + """List BulkCreateCustom resources by subscriptionId. + + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedBulkCreateCustom + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedBulkCreateCustom]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_bulk_create_custom_list_by_subscription_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedBulkCreateCustom], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ScheduledActionsOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient`'s + :attr:`scheduled_actions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def get(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> _models.ScheduledAction: + """Get a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ScheduledAction + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_get_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _create_or_update_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: Union[_models.ScheduledAction, _types.ScheduledAction, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource, (IOBase, bytes)): + _content = resource + else: + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_create_or_update_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 201]: + 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) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: _models.ScheduledAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: _types.ScheduledAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.types.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Required. + :type resource: 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: An instance of AsyncLROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: Union[_models.ScheduledAction, _types.ScheduledAction, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Is either a ScheduledAction type or a IO[bytes] + type. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.ScheduledAction or + ~azure.mgmt.compute.bulkaction.types.ScheduledAction or IO[bytes] + :return: An instance of AsyncLROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ScheduledAction] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + resource=resource, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ScheduledAction, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ScheduledAction].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ScheduledAction]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _update_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: Union[_models.ScheduledActionUpdate, _types.ScheduledActionUpdate, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_update_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: _models.ScheduledActionUpdate, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Required. + :type properties: ~azure.mgmt.compute.bulkaction.models.ScheduledActionUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: _types.ScheduledActionUpdate, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Required. + :type properties: ~azure.mgmt.compute.bulkaction.types.ScheduledActionUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Required. + :type properties: 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: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: Union[_models.ScheduledActionUpdate, _types.ScheduledActionUpdate, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Is either a ScheduledActionUpdate + type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.compute.bulkaction.models.ScheduledActionUpdate or + ~azure.mgmt.compute.bulkaction.types.ScheduledActionUpdate or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + properties=properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _delete_initial( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_delete_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202, 204]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_delete( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ScheduledAction"]: + """List ScheduledAction resources by resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ScheduledAction + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.ScheduledAction"]: + """List ScheduledAction resources by subscription ID. + + :return: An iterator like instance of ScheduledAction + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_resources( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ScheduledActionResource"]: + """List resources attached to Scheduled Actions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An iterator like instance of ScheduledActionResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledActionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledActionResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _attach_resources_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceAttachRequest, _types.ResourceAttachRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = 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_attach_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.ResourceAttachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceAttachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _types.ResourceAttachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.ResourceAttachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceAttachRequest, _types.ResourceAttachRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a ResourceAttachRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceAttachRequest or + ~azure.mgmt.compute.bulkaction.types.ResourceAttachRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._attach_resources_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _detach_resources_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceDetachRequest, _types.ResourceDetachRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = 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_detach_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.ResourceDetachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceDetachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _types.ResourceDetachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.ResourceDetachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceDetachRequest, _types.ResourceDetachRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a ResourceDetachRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceDetachRequest or + ~azure.mgmt.compute.bulkaction.types.ResourceDetachRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._detach_resources_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + async def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.ResourcePatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourcePatchRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _types.ResourcePatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.ResourcePatchRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourcePatchRequest, _types.ResourcePatchRequest, IO[bytes]], + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a ResourcePatchRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourcePatchRequest or + ~azure.mgmt.compute.bulkaction.types.ResourcePatchRequest or IO[bytes] + :return: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :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.ResourceOperationResponse] = 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_patch_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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.ResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _disable_initial( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_disable_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_disable( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Disable the scheduled action so its future occurrences do not run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._disable_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _enable_initial( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_enable_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_enable( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Enable a previously disabled scheduled action so its future occurrences run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._enable_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _cancel_next_occurrence_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = 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_cancel_next_occurrence_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _types.CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a CancelOccurrenceRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest or + ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cancel_next_occurrence_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _trigger_manual_occurrence_initial( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_trigger_manual_occurrence_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_trigger_manual_occurrence( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.Occurrence]: + """Trigger a manual occurrence of the scheduled action immediately, outside its normal schedule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of AsyncLROPoller that returns Occurrence. The Occurrence is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.Occurrence] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Occurrence] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._trigger_manual_occurrence_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Occurrence, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Occurrence].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Occurrence]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ScheduledActionExtensionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient`'s + :attr:`scheduled_action_extension` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "resource_uri", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_vms(self, resource_uri: str, **kwargs: Any) -> AsyncItemPaged["_models.ScheduledActionResources"]: + """List ScheduledActionResources resources by parent. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. + Required. + :type resource_uri: str + :return: An iterator like instance of ScheduledActionResources + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledActionResources] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledActionResources]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_action_extension_list_by_vms_request( + resource_uri=resource_uri, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ScheduledActionOperationStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient`'s + :attr:`scheduled_action_operation_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "location", "operation_id", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: + """Get the status of a ScheduledActions asynchronous operation. Both the ``Azure-AsyncOperation`` + and ``Location`` headers returned by long-running operations point at this endpoint. + + :param location: The location name. Required. + :type location: str + :param operation_id: The operation id. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.OperationStatusResult + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_scheduled_action_operation_status_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OccurrencesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient`'s + :attr:`occurrences` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def get( + self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any + ) -> _models.Occurrence: + """Get a Occurrence. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :return: Occurrence. The Occurrence is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.Occurrence + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Occurrence] = kwargs.pop("cls", None) + + _request = build_occurrences_get_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.Occurrence, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_scheduled_action( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Occurrence"]: + """List Occurrence resources by ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An iterator like instance of Occurrence + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.Occurrence] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Occurrence]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_occurrences_list_by_scheduled_action_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_resources( + self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any + ) -> AsyncItemPaged["_models.OccurrenceResource"]: + """List resources attached to Scheduled Actions for the given occurrence. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :return: An iterator like instance of OccurrenceResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.OccurrenceResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OccurrenceResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_occurrences_list_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _cancel_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = 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_occurrences_cancel_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_cancel( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: _models.CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_cancel( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: _types.CancelOccurrenceRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_cancel( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. 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: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_cancel( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Is either a CancelOccurrenceRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest or + ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def _delay_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.DelayRequest, _types.DelayRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + 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[AsyncIterator[bytes]] = 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_occurrences_delay_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_delay( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: _models.DelayRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.DelayRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_delay( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: _types.DelayRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.DelayRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_delay( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. 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: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + async def begin_delay( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.DelayRequest, _types.DelayRequest, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Is either a DelayRequest type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.DelayRequest or + ~azure.mgmt.compute.bulkaction.types.DelayRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delay_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class OccurrenceExtensionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.aio.ComputeBulkActionsMgmtClient`'s + :attr:`occurrence_extension` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "resource_uri", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_occurrence_by_vms( + self, resource_uri: str, **kwargs: Any + ) -> AsyncItemPaged["_models.OccurrenceExtensionResource"]: + """List OccurrenceExtensionResource resources by parent. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. + Required. + :type resource_uri: str + :return: An iterator like instance of OccurrenceExtensionResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.bulkaction.models.OccurrenceExtensionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OccurrenceExtensionResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_occurrence_extension_list_occurrence_by_vms_request( + resource_uri=resource_uri, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/__init__.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/__init__.py index 0c5b22af9e1e..cf795e1be573 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/__init__.py @@ -14,73 +14,489 @@ from ._models import ( # type: ignore + AcknowledgeBulkOperationErrorsRequest, + AcknowledgeBulkOperationErrorsResponse, + AdditionalCapabilities, + AdditionalUnattendContent, + AllInstancesDown, + ApiEntityReference, + ApiError, + ApiErrorBase, + ApplicationProfile, + BootDiagnostics, + BulkActionVmExtensionProperties, + BulkCreateCustomOverride, + BulkCreateCustomOverrideBase, + BulkCreateCustomOverridesProfile, + BulkCreateCustomPriorityProfile, + BulkCreateCustomProperties, + BulkCreateCustomVmSizeProfile, + BulkCreateCustomZoneAllocationPolicy, + BulkInstancesInnerError, + BulkactionVMExtension, + BulkactionVMProperties, + CancelOccurrenceRequest, CancelOperationsContent, CancelOperationsResponse, + CapacityReservationProfile, + ComputeProfile, + CreateResourceOperationResponse, + DataDisk, DeallocateResourceOperationResponse, + DelayRequest, DeleteResourceOperationResponse, + DiagnosticsProfile, + DiffDiskSettings, + DiskEncryptionSetParametersContent, + DiskEncryptionSettings, + EncryptionIdentity, ErrorAdditionalInfo, ErrorDetail, ErrorResponse, + EventGridAndResourceGraph, + ExecuteCreateContent, ExecuteDeallocateContent, ExecuteDeleteContent, ExecuteHibernateContent, + ExecuteReimageRequest, ExecuteStartContent, + ExecuteVdiCreateRequest, ExecutionParameters, + ExtensionResource, FallbackOperationInfo, + FlexProperties, GetOperationStatusContent, GetOperationStatusResponse, + HardwareProfile, HibernateResourceOperationResponse, + HostEndpointSettings, + ImageReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LaunchBulkInstancesOperationProperties, + LinuxConfiguration, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + LocationBasedBulkCreateCustom, + LocationBasedLaunchBulkInstancesOperation, + ManagedDiskParametersContent, + ManagedServiceIdentity, + NetworkInterfaceReference, + NetworkInterfaceReferenceProperties, + NetworkProfile, + NotificationProperties, + OSDisk, + OSImageNotificationProfile, + OSProfile, + OSProfileProvisioningData, + Occurrence, + OccurrenceExtensionProperties, + OccurrenceExtensionResource, + OccurrenceProperties, + OccurrenceResource, + OccurrenceResultSummary, Operation, OperationDisplay, + OperationStatusResult, + PatchSettings, + Plan, + PriorityProfile, + ProxyAgentSettings, + ProxyResource, + PublicIPAddressSku, + RecurringScheduledActionsExecutionParameters, + RecurringScheduledActionsRetryPolicy, + ReimagePayload, + ReimageResourceOperationResponse, + ReimageResourceOverride, + Resource, + ResourceAttachRequest, + ResourceDetachRequest, + ResourceNotificationDetails, ResourceOperation, ResourceOperationDetails, ResourceOperationError, + ResourceOperationResponse, + ResourcePatchRequest, + ResourceProvisionPayload, + ResourceProvisionVdiPayload, + ResourceResultSummary, + ResourceStatus, + ResourceWithContext, Resources, + ResourcesWithContext, RetryPolicy, + ScheduledAction, + ScheduledActionProperties, + ScheduledActionResource, + ScheduledActionResourceInput, + ScheduledActionResources, + ScheduledActionUpdate, + ScheduledActionUpdateProperties, + ScheduledActionsExtensionProperties, + ScheduledActionsSchedule, + ScheduledActionsScheduleUpdate, + ScheduledEventsAdditionalPublishingTargets, + ScheduledEventsPolicy, + ScheduledEventsProfile, + SecurityProfile, + SshConfiguration, + SshPublicKey, StartResourceOperationResponse, + StorageProfile, + SubResource, + SystemData, + TerminateNotificationProfile, + TrackedResource, + UefiSettings, + UserAssignedIdentitiesValue, + UserAssignedIdentity, + UserInitiatedReboot, + UserInitiatedRedeploy, + VMAttributeMinMaxDouble, + VMAttributeMinMaxInteger, + VMAttributes, + VMDiskSecurityProfile, + VMGalleryApplication, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachine, + VirtualMachineIdentity, + VirtualMachineInfo, + VirtualMachineIpTag, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceConfigurationProperties, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachineNetworkInterfaceIPConfigurationProperties, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressConfigurationProperties, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VirtualMachineReimageParameters, + VmSizeProfile, + VmSizeProperties, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsVMGuestPatchAutomaticByPlatformSettings, + ZoneAllocationPolicy, + ZonePreference, ) from ._enums import ( # type: ignore + AcceleratorManufacturer, + AcceleratorType, ActionType, + AllocationStrategy, + ArchitectureType, + BulkCreateCustomAllocationStrategy, + BulkCreateCustomDistributionStrategy, + CachingTypes, + CapacityType, + CpuManufacturer, + CreatedByType, DeadlineType, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DistributionStrategy, + DomainNameLabelScopeTypes, + EvictionPolicy, + HyperVGeneration, + IPVersions, + Language, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + LocalStorageDiskType, + ManagedServiceIdentityType, + Mode, + Modes, + Month, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + NotificationType, + OccurrenceState, + OperatingSystemTypes, OperationState, + OptimizationPreference, Origin, + OsType, + PriorityType, + ProtocolTypes, + ProvisioningState, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RecurringScheduledActionsDeadlineType, + RecurringScheduledActionsProvisioningState, + RecurringScheduledActionsResourceOperationType, + ResourceIdentityType, + ResourceOperationStatus, ResourceOperationType, + ResourceProvisioningState, + ResourceType, + ScheduledActionType, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StorageAccountTypes, + VMAttributeSupport, + VMCategory, + VMOperationStatus, + WeekDay, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, ) from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "AcknowledgeBulkOperationErrorsRequest", + "AcknowledgeBulkOperationErrorsResponse", + "AdditionalCapabilities", + "AdditionalUnattendContent", + "AllInstancesDown", + "ApiEntityReference", + "ApiError", + "ApiErrorBase", + "ApplicationProfile", + "BootDiagnostics", + "BulkActionVmExtensionProperties", + "BulkCreateCustomOverride", + "BulkCreateCustomOverrideBase", + "BulkCreateCustomOverridesProfile", + "BulkCreateCustomPriorityProfile", + "BulkCreateCustomProperties", + "BulkCreateCustomVmSizeProfile", + "BulkCreateCustomZoneAllocationPolicy", + "BulkInstancesInnerError", + "BulkactionVMExtension", + "BulkactionVMProperties", + "CancelOccurrenceRequest", "CancelOperationsContent", "CancelOperationsResponse", + "CapacityReservationProfile", + "ComputeProfile", + "CreateResourceOperationResponse", + "DataDisk", "DeallocateResourceOperationResponse", + "DelayRequest", "DeleteResourceOperationResponse", + "DiagnosticsProfile", + "DiffDiskSettings", + "DiskEncryptionSetParametersContent", + "DiskEncryptionSettings", + "EncryptionIdentity", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", + "EventGridAndResourceGraph", + "ExecuteCreateContent", "ExecuteDeallocateContent", "ExecuteDeleteContent", "ExecuteHibernateContent", + "ExecuteReimageRequest", "ExecuteStartContent", + "ExecuteVdiCreateRequest", "ExecutionParameters", + "ExtensionResource", "FallbackOperationInfo", + "FlexProperties", "GetOperationStatusContent", "GetOperationStatusResponse", + "HardwareProfile", "HibernateResourceOperationResponse", + "HostEndpointSettings", + "ImageReference", + "KeyVaultKeyReference", + "KeyVaultSecretReference", + "LaunchBulkInstancesOperationProperties", + "LinuxConfiguration", + "LinuxPatchSettings", + "LinuxVMGuestPatchAutomaticByPlatformSettings", + "LocationBasedBulkCreateCustom", + "LocationBasedLaunchBulkInstancesOperation", + "ManagedDiskParametersContent", + "ManagedServiceIdentity", + "NetworkInterfaceReference", + "NetworkInterfaceReferenceProperties", + "NetworkProfile", + "NotificationProperties", + "OSDisk", + "OSImageNotificationProfile", + "OSProfile", + "OSProfileProvisioningData", + "Occurrence", + "OccurrenceExtensionProperties", + "OccurrenceExtensionResource", + "OccurrenceProperties", + "OccurrenceResource", + "OccurrenceResultSummary", "Operation", "OperationDisplay", + "OperationStatusResult", + "PatchSettings", + "Plan", + "PriorityProfile", + "ProxyAgentSettings", + "ProxyResource", + "PublicIPAddressSku", + "RecurringScheduledActionsExecutionParameters", + "RecurringScheduledActionsRetryPolicy", + "ReimagePayload", + "ReimageResourceOperationResponse", + "ReimageResourceOverride", + "Resource", + "ResourceAttachRequest", + "ResourceDetachRequest", + "ResourceNotificationDetails", "ResourceOperation", "ResourceOperationDetails", "ResourceOperationError", + "ResourceOperationResponse", + "ResourcePatchRequest", + "ResourceProvisionPayload", + "ResourceProvisionVdiPayload", + "ResourceResultSummary", + "ResourceStatus", + "ResourceWithContext", "Resources", + "ResourcesWithContext", "RetryPolicy", + "ScheduledAction", + "ScheduledActionProperties", + "ScheduledActionResource", + "ScheduledActionResourceInput", + "ScheduledActionResources", + "ScheduledActionUpdate", + "ScheduledActionUpdateProperties", + "ScheduledActionsExtensionProperties", + "ScheduledActionsSchedule", + "ScheduledActionsScheduleUpdate", + "ScheduledEventsAdditionalPublishingTargets", + "ScheduledEventsPolicy", + "ScheduledEventsProfile", + "SecurityProfile", + "SshConfiguration", + "SshPublicKey", "StartResourceOperationResponse", + "StorageProfile", + "SubResource", + "SystemData", + "TerminateNotificationProfile", + "TrackedResource", + "UefiSettings", + "UserAssignedIdentitiesValue", + "UserAssignedIdentity", + "UserInitiatedReboot", + "UserInitiatedRedeploy", + "VMAttributeMinMaxDouble", + "VMAttributeMinMaxInteger", + "VMAttributes", + "VMDiskSecurityProfile", + "VMGalleryApplication", + "VaultCertificate", + "VaultSecretGroup", + "VirtualHardDisk", + "VirtualMachine", + "VirtualMachineIdentity", + "VirtualMachineInfo", + "VirtualMachineIpTag", + "VirtualMachineNetworkInterfaceConfiguration", + "VirtualMachineNetworkInterfaceConfigurationProperties", + "VirtualMachineNetworkInterfaceDnsSettingsConfiguration", + "VirtualMachineNetworkInterfaceIPConfiguration", + "VirtualMachineNetworkInterfaceIPConfigurationProperties", + "VirtualMachinePublicIPAddressConfiguration", + "VirtualMachinePublicIPAddressConfigurationProperties", + "VirtualMachinePublicIPAddressDnsSettingsConfiguration", + "VirtualMachineReimageParameters", + "VmSizeProfile", + "VmSizeProperties", + "WinRMConfiguration", + "WinRMListener", + "WindowsConfiguration", + "WindowsVMGuestPatchAutomaticByPlatformSettings", + "ZoneAllocationPolicy", + "ZonePreference", + "AcceleratorManufacturer", + "AcceleratorType", "ActionType", + "AllocationStrategy", + "ArchitectureType", + "BulkCreateCustomAllocationStrategy", + "BulkCreateCustomDistributionStrategy", + "CachingTypes", + "CapacityType", + "CpuManufacturer", + "CreatedByType", "DeadlineType", + "DeleteOptions", + "DiffDiskOptions", + "DiffDiskPlacement", + "DiskControllerTypes", + "DiskCreateOptionTypes", + "DiskDeleteOptionTypes", + "DiskDetachOptionTypes", + "DistributionStrategy", + "DomainNameLabelScopeTypes", + "EvictionPolicy", + "HyperVGeneration", + "IPVersions", + "Language", + "LinuxPatchAssessmentMode", + "LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "LinuxVMGuestPatchMode", + "LocalStorageDiskType", + "ManagedServiceIdentityType", + "Mode", + "Modes", + "Month", + "NetworkApiVersion", + "NetworkInterfaceAuxiliaryMode", + "NetworkInterfaceAuxiliarySku", + "NotificationType", + "OccurrenceState", + "OperatingSystemTypes", "OperationState", + "OptimizationPreference", "Origin", + "OsType", + "PriorityType", + "ProtocolTypes", + "ProvisioningState", + "PublicIPAddressSkuName", + "PublicIPAddressSkuTier", + "PublicIPAllocationMethod", + "RecurringScheduledActionsDeadlineType", + "RecurringScheduledActionsProvisioningState", + "RecurringScheduledActionsResourceOperationType", + "ResourceIdentityType", + "ResourceOperationStatus", "ResourceOperationType", + "ResourceProvisioningState", + "ResourceType", + "ScheduledActionType", + "SecurityEncryptionTypes", + "SecurityTypes", + "SettingNames", + "StorageAccountTypes", + "VMAttributeSupport", + "VMCategory", + "VMOperationStatus", + "WeekDay", + "WindowsPatchAssessmentMode", + "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "WindowsVMGuestPatchMode", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_enums.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_enums.py index 3230df9d31c3..6092b8b9ce9e 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_enums.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_enums.py @@ -10,6 +10,26 @@ from azure.core import CaseInsensitiveEnumMeta +class AcceleratorManufacturer(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Accelerator manufacturers supported by Azure VMs.""" + + AMD = "AMD" + """AMD GpuType.""" + NVIDIA = "Nvidia" + """Nvidia GpuType.""" + XILINX = "Xilinx" + """Xilinx GpuType.""" + + +class AcceleratorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Accelerator types supported by Azure VMs.""" + + GPU = "GPU" + """GPU Accelerator.""" + FPGA = "FPGA" + """FPGA Accelerator.""" + + class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -19,6 +39,98 @@ 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 ArchitectureType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Architecture types supported by Azure VMs.""" + + ARM64 = "ARM64" + """ARM64 Architecture.""" + X64 = "X64" + """X64 Architecture.""" + + +class BulkCreateCustomAllocationStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The allocation strategy for VM size selection in BulkCreateCustom.""" + + 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.""" + + +class BulkCreateCustomDistributionStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The distribution strategy for zone allocation in BulkCreateCustom.""" + + 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.""" + + +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 CapacityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Capacity types for LaunchBulkInstancesOperation.""" + + VM = "VM" + """Default. VM is the default capacity type for LaunchBulkInstancesOperation where capacity is + provisioned in terms of VMs.""" + V_CPU = "VCpu" + """VCpu is the capacity type for LaunchBulkInstancesOperation where capacity is provisioned in + terms of VCpus. If VCpu capacity is not exactly divisible by VCpu count in VMSizes, capacity in + VCpus will be overprovisioned by default.""" + + +class CpuManufacturer(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Cpu Manufacturers supported by Azure VMs.""" + + INTEL = "Intel" + """Intel CPU.""" + AMD = "AMD" + """AMD CPU.""" + MICROSOFT = "Microsoft" + """Microsoft CPU.""" + AMPERE = "Ampere" + """Ampere CPU.""" + + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The kind of entity that created the resource.""" + + USER = "User" + """The entity was created by a user.""" + APPLICATION = "Application" + """The entity was created by an application.""" + MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" + KEY = "Key" + """The entity was created by a key.""" + + class DeadlineType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The types of deadlines supported by Bulkactions.""" @@ -30,6 +142,381 @@ 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 EvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Different kind of eviction policies.""" + + DELETE = "Delete" + """When evicted, the Spot VM will be deleted and the corresponding capacity will be updated to + reflect this.""" + DEALLOCATE = "Deallocate" + """When evicted, the Spot VM will be deallocated/stopped.""" + + +class HyperVGeneration(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """HyperVGenerations supported by Azure VMs.""" + + GEN1 = "Gen1" + """Gen1 hyperV.""" + GEN2 = "Gen2" + """Gen2 hyperV.""" + + +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.""" + + +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 LocalStorageDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Local storage disk types supported by Azure VMs.""" + + HDD = "HDD" + """HDD DiskType.""" + SSD = "SSD" + """SSD DiskType.""" + + +class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of managed service identity (where both SystemAssigned and UserAssigned types are + allowed). + """ + + NONE = "None" + """No managed identity.""" + SYSTEM_ASSIGNED = "SystemAssigned" + """System assigned managed identity.""" + USER_ASSIGNED = "UserAssigned" + """User assigned managed identity.""" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + """System and user assigned managed identity.""" + + +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): + """Representation of the months available selection in a gregorian calendar.""" + + JANUARY = "January" + """The January month.""" + FEBRUARY = "February" + """The February month.""" + MARCH = "March" + """The March month.""" + APRIL = "April" + """The April month.""" + MAY = "May" + """The May month.""" + JUNE = "June" + """The June month.""" + JULY = "July" + """The July month.""" + AUGUST = "August" + """The August month.""" + SEPTEMBER = "September" + """The September month.""" + OCTOBER = "October" + """The October month.""" + NOVEMBER = "November" + """The November month.""" + DECEMBER = "December" + """The December month.""" + ALL = "All" + """All months.""" + + +class NetworkApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the Microsoft.Network API version used when creating networking resources in the + Network Interface Configurations. + """ + + ENUM2020_11_01 = "2020-11-01" + """2020-11-01 version.""" + ENUM2022_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.""" + + +class OccurrenceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The state the occurrence is at a given time.""" + + CREATED = "Created" + """The occurrence was created.""" + RESCHEDULING = "Rescheduling" + """The occurrence is being rescheduled.""" + SCHEDULED = "Scheduled" + """The occurrence has been scheduled.""" + SUCCEEDED = "Succeeded" + """The occurrence has successfully ran.""" + FAILED = "Failed" + """The occurrence has failed during its scheduling.""" + CANCELLING = "Cancelling" + """The occurrence is going through cancellation.""" + CANCELED = "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 Bulkactions.""" @@ -53,6 +540,17 @@ class OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """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.""" + AVAILABILITY = "Availability" + """Optimize while considering availability of resources.""" + COST_AVAILABILITY_BALANCED = "CostAvailabilityBalanced" + """Optimize while considering a balance of cost and availability.""" + + class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". @@ -66,6 +564,145 @@ 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): + """The status of the LaunchBulkInstancesOperation.""" + + CREATING = "Creating" + """Initial creation in progress.""" + SUCCEEDED = "Succeeded" + """The operation has completed successfully.""" + FAILED = "Failed" + """The operation has failed.""" + DELETING = "Deleting" + """Deletion in progress.""" + CANCELED = "Canceled" + """The operation has been canceled.""" + + +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 RecurringScheduledActionsDeadlineType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of deadline the scheduled action follows for its schedule.""" + + UNKNOWN = "Unknown" + """Default value of Unknown.""" + INITIATE_AT = "InitiateAt" + """Initiate the operation at the given deadline.""" + COMPLETE_BY = "CompleteBy" + """Complete the operation by the given deadline.""" + + +class RecurringScheduledActionsProvisioningState( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """Provisioning state of the scheduled action resource.""" + + SUCCEEDED = "Succeeded" + """Resource has been created.""" + FAILED = "Failed" + """Resource creation failed.""" + CANCELED = "Canceled" + """Resource creation was canceled.""" + DELETING = "Deleting" + """Resource is being deleted.""" + + +class RecurringScheduledActionsResourceOperationType( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """The resource operation to take on a scheduled-action failure.""" + + UNKNOWN = "Unknown" + """The default value for this enum type.""" + START = "Start" + """Start operations on the resources.""" + DEALLOCATE = "Deallocate" + """Deallocate operations on the resources.""" + HIBERNATE = "Hibernate" + """Hibernate operations on the resources.""" + CREATE = "Create" + """Create operations on the resources.""" + DELETE = "Delete" + """Delete operations on the resources.""" + + +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.""" + FAILED = "Failed" + """The resource operation has failed.""" + + class ResourceOperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of bulk operation that can be performed on resources using Bulkactions API.""" @@ -81,3 +718,233 @@ class ResourceOperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Create operations on the resources.""" DELETE = "Delete" """Delete operations on the resources.""" + GET_INSTANCE_VIEW = "GetInstanceView" + """Post-Start VM agent health-check sub-operation; surfaced when the customer opts into + verifyVmAgentHealth on a Start request.""" + + +class ResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The provisioning state of a resource type.""" + + SUCCEEDED = "Succeeded" + """Resource has been created.""" + FAILED = "Failed" + """Resource creation failed.""" + CANCELED = "Canceled" + """Resource creation was canceled.""" + + +class ResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of resource being targeted.""" + + VIRTUAL_MACHINE = "VirtualMachine" + """Resources defined are Virtual Machines.""" + VIRTUAL_MACHINE_SCALE_SET = "VirtualMachineScaleSet" + """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.""" + DEALLOCATE = "Deallocate" + """Perform a deallocate action on the specified resources.""" + HIBERNATE = "Hibernate" + """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 VMAttributeSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """VMSizes supported by Azure VMs. Included is a union of Excluded and Required.""" + + EXCLUDED = "Excluded" + """All VMSizes having the feature support will be excluded.""" + INCLUDED = "Included" + """VMSizes that have the feature support and that do not have the feature support will be used. + Included is a union of Excluded and Required.""" + REQUIRED = "Required" + """Only the VMSizes having the feature support will be used.""" + + +class VMCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """VMCategories defined for Azure VMs.""" + + GENERAL_PURPOSE = "GeneralPurpose" + """General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and + development, small to medium databases, and low to medium traffic web servers.""" + COMPUTE_OPTIMIZED = "ComputeOptimized" + """Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium + traffic web servers, network appliances, batch processes, and application servers.""" + MEMORY_OPTIMIZED = "MemoryOptimized" + """Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational + database servers, medium to large caches, and in-memory analytics.""" + STORAGE_OPTIMIZED = "StorageOptimized" + """Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal + for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases.""" + GPU_ACCELERATED = "GpuAccelerated" + """GPU optimized VM sizes are specialized virtual machines available with single, multiple, or + fractional GPUs.""" + FPGA_ACCELERATED = "FpgaAccelerated" + """FPGA optimized VM sizes are specialized virtual machines available with single or multiple + FPGA.""" + HIGH_PERFORMANCE_COMPUTE = "HighPerformanceCompute" + """Azure High Performance Compute VMs are optimized for various HPC workloads such as CFD, FEA, + EDA, rendering, molecular dynamics, weather simulation, and financial risk analysis.""" + + +class VMOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Virtual Machine operation status values.""" + + CREATING = "Creating" + """Indicates that the virtual machine is either in the process of being created or is scheduled to + be created.""" + CANCELED = "Canceled" + """Indicates that the cancellation request was successful because the virtual machine had not been + created yet.""" + CANCEL_FAILED_STATUS_UNKNOWN = "CancelFailedStatusUnknown" + """Indicates that the cancellation request could not be applied because the virtual machine had + already been created.""" + FAILED = "Failed" + """Indicates that the virtual machine operation failed.""" + SUCCEEDED = "Succeeded" + """Indicates that the virtual machine operation completed successfully.""" + DELETING = "Deleting" + """Indicates that the virtual machine is being deleted.""" + CANCELLING = "Cancelling" + """Indicates that the virtual machine operation is being cancelled.""" + + +class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Representation of the possible selection of days in a week in a gregorian calendar.""" + + MONDAY = "Monday" + """Monday weekday.""" + TUESDAY = "Tuesday" + """Tuesday weekday.""" + WEDNESDAY = "Wednesday" + """Wednesday weekday.""" + THURSDAY = "Thursday" + """Thursday weekday.""" + FRIDAY = "Friday" + """Friday weekday.""" + SATURDAY = "Saturday" + """Saturday weekday.""" + SUNDAY = "Sunday" + """Sunday weekday.""" + ALL = "All" + """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.""" diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_models.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_models.py index d405eaba9637..8f13fcd42129 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_models.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/models/_models.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,7 +9,9 @@ # pylint: disable=useless-super-delegation import datetime -from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload +from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload + +from azure.core.exceptions import ODataV4Format from .._utils.model_base import Model as _Model, rest_field @@ -16,17 +19,17 @@ from .. import models as _models -class CancelOperationsContent(_Model): - """This is the request to cancel running operations in scheduled actions using the operation ids. +class AcknowledgeBulkOperationErrorsRequest(_Model): + """The request to acknowledge bulk operation errors. - :ivar operation_ids: The list of operation ids to cancel operations on. Required. + :ivar operation_ids: The set of operation ids to acknowledge. 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 cancel operations on. Required.""" + """The set of operation ids to acknowledge. Required.""" @overload def __init__( @@ -46,21 +49,34 @@ 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 AcknowledgeBulkOperationErrorsResponse(_Model): + """The response from acknowledging bulk operation errors. - :ivar results: An array of resource operations that were successfully cancelled. Required. - :vartype results: list[~azure.mgmt.compute.bulkaction.models.ResourceOperation] + :ivar acknowledged: The set of operation ids that were newly acknowledged. Required. + :vartype acknowledged: list[str] + :ivar not_found: The set of operation ids that were not found in the completed operations + store. Required. + :vartype not_found: list[str] + :ivar skipped: The set of operation ids that were skipped because they were already + acknowledged, not failed, or belong to a different scope. Required. + :vartype skipped: list[str] """ - results: list["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """An array of resource operations that were successfully cancelled. Required.""" + acknowledged: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The set of operation ids that were newly acknowledged. Required.""" + not_found: list[str] = rest_field(name="notFound", visibility=["read", "create", "update", "delete", "query"]) + """The set of operation ids that were not found in the completed operations store. Required.""" + skipped: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The set of operation ids that were skipped because they were already acknowledged, not failed, + or belong to a different scope. Required.""" @overload def __init__( self, *, - results: list["_models.ResourceOperation"], + acknowledged: list[str], + not_found: list[str], + skipped: list[str], ) -> None: ... @overload @@ -74,38 +90,36 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class DeallocateResourceOperationResponse(_Model): - """The response from a deallocate request. +class AdditionalCapabilities(_Model): + """Enables or disables a capability on the virtual machine or virtual machine scale set. - :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.compute.bulkaction.models.ResourceOperation] + :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 """ - 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"] + ultra_ssd_enabled: Optional[bool] = rest_field( + name="ultraSSDEnabled", visibility=["read", "create", "update", "delete", "query"] ) - """The results from the deallocate request if no errors exist.""" + """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, *, - description: str, - type: str, - location: str, - results: Optional[list["_models.ResourceOperation"]] = None, + ultra_ssd_enabled: Optional[bool] = None, + hibernation_enabled: Optional[bool] = None, ) -> None: ... @overload @@ -119,38 +133,55 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -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 delete request eg virtual machines. Required. - :vartype type: str - :ivar location: The location of the delete request eg westus. Required. - :vartype location: str - :ivar results: The results from the delete request if no errors exist. - :vartype results: list[~azure.mgmt.compute.bulkaction.models.ResourceOperation] +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.compute.bulkaction.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 """ - 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 delete request eg westus. Required.""" - results: Optional[list["_models.ResourceOperation"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + pass_name: Optional[Literal["OobeSystem"]] = rest_field( + name="passName", visibility=["read", "create", "update", "delete", "query"] ) - """The results from the delete request if no errors exist.""" + """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, *, - description: str, - type: str, - location: str, - results: Optional[list["_models.ResourceOperation"]] = None, + 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 @@ -164,65 +195,55 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ErrorAdditionalInfo(_Model): - """The resource management error additional info. +class AllInstancesDown(_Model): + """Specifies if Scheduled Events should be auto-approved when all instances are down. - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: any + :ivar all_instances_down_automatically_approve: Specifies if Scheduled Events should be + auto-approved when all instances are down. Its default value is true. + :vartype all_instances_down_automatically_approve: bool """ - type: Optional[str] = rest_field(visibility=["read"]) - """The additional info type.""" - info: Optional[Any] = rest_field(visibility=["read"]) - """The additional info.""" - + all_instances_down_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.""" -class ErrorDetail(_Model): - """The error detail. + @overload + def __init__( + self, + *, + all_instances_down_automatically_approve: Optional[bool] = None, + ) -> None: ... - :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.compute.bulkaction.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.compute.bulkaction.models.ErrorAdditionalInfo] - """ + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ - 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"] - ) - """The error additional info.""" + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) -class ErrorResponse(_Model): - """Error response. +class ApiEntityReference(_Model): + """The API entity reference. - :ivar error: The error object. - :vartype error: ~azure.mgmt.compute.bulkaction.models.ErrorDetail + :ivar id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :vartype id: str """ - error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The error object.""" + 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, *, - error: Optional["_models.ErrorDetail"] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin ) -> None: ... @overload @@ -236,28 +257,45 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteDeallocateContent(_Model): - """The ExecuteDeallocateRequest request for executeDeallocate operations. +class ApiError(_Model): + """ApiError for Fleet. - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :ivar code: The error code. + :vartype code: str + :ivar target: The target of the particular error. + :vartype target: str + :ivar message: The error message. + :vartype message: str + :ivar details: The API error details. + :vartype details: list[~azure.mgmt.compute.bulkaction.models.ApiErrorBase] + :ivar innererror: The API inner error. + :vartype innererror: ~azure.mgmt.compute.bulkaction.models.BulkInstancesInnerError """ - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error code.""" + target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The target of the particular error.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error message.""" + details: Optional[list["_models.ApiErrorBase"]] = 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.""" + """The API error details.""" + innererror: Optional["_models.BulkInstancesInnerError"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The API inner error.""" @overload def __init__( self, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", + code: Optional[str] = None, + target: Optional[str] = None, + message: Optional[str] = None, + details: Optional[list["_models.ApiErrorBase"]] = None, + innererror: Optional["_models.BulkInstancesInnerError"] = None, ) -> None: ... @overload @@ -271,35 +309,31 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteDeleteContent(_Model): - """The ExecuteDeleteRequest for delete VM operation. +class ApiErrorBase(_Model): + """API error base. - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources - :ivar force_deletion: Forced delete resource item. - :vartype force_deletion: bool + :ivar code: The error code. + :vartype code: str + :ivar target: The target of the particular error. + :vartype target: str + :ivar message: The error message. + :vartype message: 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.""" - force_deletion: Optional[bool] = rest_field( - name="forceDeletion", visibility=["read", "create", "update", "delete", "query"] - ) - """Forced delete resource item.""" + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error code.""" + target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The target of the particular error.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error message.""" @overload def __init__( self, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", - force_deletion: Optional[bool] = None, + code: Optional[str] = None, + target: Optional[str] = None, + message: Optional[str] = None, ) -> None: ... @overload @@ -313,28 +347,24 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteHibernateContent(_Model): - """The ExecuteHibernateRequest request for executeHibernate operations. +class ApplicationProfile(_Model): + """Contains the list of gallery applications that should be made available to the VM. - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :ivar gallery_applications: Specifies the gallery applications that should be made available to + the VM. + :vartype gallery_applications: list[~azure.mgmt.compute.bulkaction.models.VMGalleryApplication] """ - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + gallery_applications: Optional[list["_models.VMGalleryApplication"]] = rest_field( + name="galleryApplications", 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.""" + """Specifies the gallery applications that should be made available to the VM.""" @overload def __init__( self, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", + gallery_applications: Optional[list["_models.VMGalleryApplication"]] = None, ) -> None: ... @overload @@ -348,28 +378,33 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteStartContent(_Model): - """The ExecuteStartRequest request for executeStart operations. +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 execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :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 """ - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + 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"] ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" + """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, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", + enabled: Optional[bool] = None, + storage_uri: Optional[str] = None, ) -> None: ... @overload @@ -383,23 +418,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 BulkactionVMExtension(_Model): + """Defines a virtual machine extension. - :ivar retry_policy: Retry policy the user can pass. - :vartype retry_policy: ~azure.mgmt.compute.bulkaction.models.RetryPolicy + :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.compute.bulkaction.models.BulkActionVmExtensionProperties """ - retry_policy: Optional["_models.RetryPolicy"] = rest_field( - name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + 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"] ) - """Retry policy the user can pass.""" + """Properties of the virtual machine extension. Required.""" @overload def __init__( self, *, - retry_policy: Optional["_models.RetryPolicy"] = None, + name: str, + properties: "_models.BulkActionVmExtensionProperties", ) -> None: ... @overload @@ -413,37 +453,104 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class FallbackOperationInfo(_Model): - """Describes the fallback operation that was performed. +class BulkActionVmExtensionProperties(_Model): + """Describes the properties of a Virtual Machine Extension. - :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.compute.bulkaction.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.compute.bulkaction.models.ResourceOperationError + :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 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.compute.bulkaction.models.KeyVaultSecretReference + :ivar provision_after_extensions: Collection of extension names after which this extension + needs to be provisioned. + :vartype provision_after_extensions: list[str] """ - last_op_type: Union[str, "_models.ResourceOperationType"] = rest_field( - name="lastOpType", visibility=["read", "create", "update", "delete", "query"] + force_update_tag: Optional[str] = rest_field( + name="forceUpdateTag", 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"] + """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"] ) - """The error code if the fallback operation failed.""" + """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, *, - last_op_type: Union[str, "_models.ResourceOperationType"], - status: str, - error: Optional["_models.ResourceOperationError"] = 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 @@ -457,23 +564,153 @@ 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] +class BulkactionVMProperties(_Model): + """Describes the properties of a Virtual Machine for bulk create. + + :ivar scheduled_events_policy: Specifies Redeploy, Reboot and + ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the + virtual machine. + :vartype scheduled_events_policy: ~azure.mgmt.compute.bulkaction.models.ScheduledEventsPolicy + :ivar storage_profile: Specifies the storage settings for the virtual machine disks. + :vartype storage_profile: ~azure.mgmt.compute.bulkaction.models.StorageProfile + :ivar hardware_profile: Specifies the hardware profile for the virtual machine. + :vartype hardware_profile: ~azure.mgmt.compute.bulkaction.models.HardwareProfile + :ivar additional_capabilities: Specifies additional capabilities enabled or disabled on the + virtual machine. + :vartype additional_capabilities: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.models.OSProfile + :ivar network_profile: Specifies the network interfaces of the virtual machine. + :vartype network_profile: ~azure.mgmt.compute.bulkaction.models.NetworkProfile + :ivar security_profile: Specifies the Security related profile settings for the virtual + machine. + :vartype security_profile: ~azure.mgmt.compute.bulkaction.models.SecurityProfile + :ivar diagnostics_profile: Specifies the boot diagnostic settings state. Minimum compute + api-version: 2015-06-15. + :vartype diagnostics_profile: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.CapacityReservationProfile + :ivar application_profile: Specifies the gallery applications that should be made available to + the VM. + :vartype application_profile: ~azure.mgmt.compute.bulkaction.models.ApplicationProfile + :ivar vm_extensions: Virtual Machine Extensions Array to be applied to the Virtual Machines. + :vartype vm_extensions: list[~azure.mgmt.compute.bulkaction.models.BulkactionVMExtension] """ - operation_ids: list[str] = rest_field( - name="operationIds", visibility=["read", "create", "update", "delete", "query"] + scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = rest_field( + name="scheduledEventsPolicy", visibility=["read", "create", "update", "delete", "query"] ) - """The list of operation ids to get the status of. Required.""" + """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"] + ) + """Specifies the storage settings for the virtual machine disks.""" + hardware_profile: Optional["_models.HardwareProfile"] = rest_field( + name="hardwareProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the hardware profile for the virtual machine.""" + 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.""" + 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.""" + 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, *, - operation_ids: list[str], + scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = None, + storage_profile: Optional["_models.StorageProfile"] = None, + hardware_profile: Optional["_models.HardwareProfile"] = None, + additional_capabilities: Optional["_models.AdditionalCapabilities"] = None, + os_profile: Optional["_models.OSProfile"] = None, + network_profile: Optional["_models.NetworkProfile"] = 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, + vm_extensions: Optional[list["_models.BulkactionVMExtension"]] = None, ) -> None: ... @overload @@ -487,21 +724,60 @@ 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.compute.bulkaction.models.ResourceOperation] +class BulkCreateCustomOverride(_Model): + """A single per-VM override. Extends the shared override fields with a per-VM name. + + :ivar virtual_machine_name: ARM VM name for this VM. Optional; when omitted the name is + generated from the prefix as {prefix}_{index}. + :vartype virtual_machine_name: str + :ivar virtual_machine_profile: VM profile, the same shape as operation-level + ComputeProfile.virtualMachineProfile. Overrides the operation-level VM profile. + :vartype virtual_machine_profile: ~azure.mgmt.compute.bulkaction.models.BulkactionVMProperties + :ivar tags: Tags overriding the operation-level tags. + :vartype tags: dict[str, str] + :ivar identity: Identity overriding the operation-level identity. + :vartype identity: ~azure.mgmt.compute.bulkaction.models.VirtualMachineIdentity + :ivar plan: Plan overriding the operation-level plan. + :vartype plan: ~azure.mgmt.compute.bulkaction.models.Plan + :ivar extensions: Extensions. When non-empty they replace the operation-level extensions; when + omitted the operation-level extensions are inherited. + :vartype extensions: list[~azure.mgmt.compute.bulkaction.models.BulkactionVMExtension] """ - results: list["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """An array of resource operations based on their operation ids. Required.""" + virtual_machine_name: Optional[str] = rest_field( + name="virtualMachineName", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM VM name for this VM. Optional; when omitted the name is generated from the prefix as + {prefix}_{index}.""" + virtual_machine_profile: Optional["_models.BulkactionVMProperties"] = rest_field( + name="virtualMachineProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """VM profile, the same shape as operation-level ComputeProfile.virtualMachineProfile. Overrides + the operation-level VM profile.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tags overriding the operation-level tags.""" + identity: Optional["_models.VirtualMachineIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Identity overriding the operation-level identity.""" + plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Plan overriding the operation-level plan.""" + extensions: Optional[list["_models.BulkactionVMExtension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Extensions. When non-empty they replace the operation-level extensions; when omitted the + operation-level extensions are inherited.""" @overload def __init__( self, *, - results: list["_models.ResourceOperation"], + virtual_machine_name: Optional[str] = None, + virtual_machine_profile: Optional["_models.BulkactionVMProperties"] = None, + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.VirtualMachineIdentity"] = None, + plan: Optional["_models.Plan"] = None, + extensions: Optional[list["_models.BulkactionVMExtension"]] = None, ) -> None: ... @overload @@ -515,38 +791,53 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class HibernateResourceOperationResponse(_Model): - """The response from a Hibernate request. +class BulkCreateCustomOverrideBase(_Model): + """Override fields shared by per-VM and per-VM-size overrides. Each set field takes precedence + over the operation-level value. VM size, zone, priority, eviction policy, and billing are owned + by the service and cannot be set here. + + :ivar virtual_machine_profile: VM profile, the same shape as operation-level + ComputeProfile.virtualMachineProfile. Overrides the operation-level VM profile. + :vartype virtual_machine_profile: ~azure.mgmt.compute.bulkaction.models.BulkactionVMProperties + :ivar tags: Tags overriding the operation-level tags. + :vartype tags: dict[str, str] + :ivar identity: Identity overriding the operation-level identity. + :vartype identity: ~azure.mgmt.compute.bulkaction.models.VirtualMachineIdentity + :ivar plan: Plan overriding the operation-level plan. + :vartype plan: ~azure.mgmt.compute.bulkaction.models.Plan + :ivar extensions: Extensions. When non-empty they replace the operation-level extensions; when + omitted the operation-level extensions are inherited. + :vartype extensions: list[~azure.mgmt.compute.bulkaction.models.BulkactionVMExtension] + """ - :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.compute.bulkaction.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( + virtual_machine_profile: Optional["_models.BulkactionVMProperties"] = rest_field( + name="virtualMachineProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """VM profile, the same shape as operation-level ComputeProfile.virtualMachineProfile. Overrides + the operation-level VM profile.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tags overriding the operation-level tags.""" + identity: Optional["_models.VirtualMachineIdentity"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The results from the Hibernate request if no errors exist.""" + """Identity overriding the operation-level identity.""" + plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Plan overriding the operation-level plan.""" + extensions: Optional[list["_models.BulkactionVMExtension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Extensions. When non-empty they replace the operation-level extensions; when omitted the + operation-level extensions are inherited.""" @overload def __init__( self, *, - description: str, - type: str, - location: str, - results: Optional[list["_models.ResourceOperation"]] = None, + virtual_machine_profile: Optional["_models.BulkactionVMProperties"] = None, + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.VirtualMachineIdentity"] = None, + plan: Optional["_models.Plan"] = None, + extensions: Optional[list["_models.BulkactionVMExtension"]] = None, ) -> None: ... @overload @@ -560,50 +851,37 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Operation(_Model): - """REST API Operation. +class BulkCreateCustomOverridesProfile(_Model): + """Groups the per-VM overrides with the name prefix that names any override that does not supply + its own VM name. - :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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.ActionType + :ivar virtual_machine_name_prefix: Prefix used to build the ARM VM name ({prefix}_{index}) for + overrides that omit a virtualMachineName. Required when any override is unnamed and rejected + when every override is named. + :vartype virtual_machine_name_prefix: str + :ivar overrides: Per-VM overrides. The count is the VM count and must equal capacity. Each + override maps to VM index i. + :vartype overrides: list[~azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverride] """ - 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( + virtual_machine_name_prefix: Optional[str] = rest_field( + name="virtualMachineNamePrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Prefix used to build the ARM VM name ({prefix}_{index}) for overrides that omit a + virtualMachineName. Required when any override is unnamed and rejected when every override is + named.""" + overrides: Optional[list["_models.BulkCreateCustomOverride"]] = 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\"""" + """Per-VM overrides. The count is the VM count and must equal capacity. Each override maps to VM + index i.""" @overload def __init__( self, *, - display: Optional["_models.OperationDisplay"] = None, + virtual_machine_name_prefix: Optional[str] = None, + overrides: Optional[list["_models.BulkCreateCustomOverride"]] = None, ) -> None: ... @overload @@ -617,74 +895,49 @@ 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 ResourceOperation(_Model): - """High level response from an operation on a resource. - - :ivar resource_id: Unique identifier for the resource involved in the operation, for example - Azure resource ID. - :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.compute.bulkaction.models.ResourceOperationDetails +class BulkCreateCustomPriorityProfile(_Model): + """Configuration options for Regular or Spot instances in BulkCreateCustom. + + :ivar type: The priority type for VM allocation. Known values are: "Regular" and "Spot". + :vartype type: str or ~azure.mgmt.compute.bulkaction.models.PriorityType + :ivar max_price_per_vm: Price per hour of each Spot VM will never exceed this. + :vartype max_price_per_vm: float + :ivar eviction_policy: Eviction Policy to follow when evicting Spot VMs. Known values are: + "Delete" and "Deallocate". + :vartype eviction_policy: str or ~azure.mgmt.compute.bulkaction.models.EvictionPolicy + :ivar allocation_strategy: The allocation strategy for VM size selection. Known values are: + "LowestPrice" and "Prioritized". + :vartype allocation_strategy: str or + ~azure.mgmt.compute.bulkaction.models.BulkCreateCustomAllocationStrategy """ - resource_id: Optional[str] = rest_field( - name="resourceId", visibility=["read", "create", "update", "delete", "query"] + type: Optional[Union[str, "_models.PriorityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Unique identifier for the resource involved in the operation, for example Azure resource ID.""" - 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"] + """The priority type for VM allocation. Known values are: \"Regular\" and \"Spot\".""" + max_price_per_vm: Optional[float] = rest_field( + name="maxPricePerVM", 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"] + """Price per hour of each Spot VM will never exceed this.""" + eviction_policy: Optional[Union[str, "_models.EvictionPolicy"]] = rest_field( + name="evictionPolicy", visibility=["read", "create", "update", "delete", "query"] ) - """Details of the operation performed on a resource.""" + """Eviction Policy to follow when evicting Spot VMs. Known values are: \"Delete\" and + \"Deallocate\".""" + allocation_strategy: Optional[Union[str, "_models.BulkCreateCustomAllocationStrategy"]] = rest_field( + name="allocationStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """The allocation strategy for VM size selection. Known values are: \"LowestPrice\" and + \"Prioritized\".""" @overload def __init__( self, *, - resource_id: Optional[str] = None, - error_code: Optional[str] = None, - error_details: Optional[str] = None, - operation: Optional["_models.ResourceOperationDetails"] = None, + type: Optional[Union[str, "_models.PriorityType"]] = None, + max_price_per_vm: Optional[float] = None, + eviction_policy: Optional[Union[str, "_models.EvictionPolicy"]] = None, + allocation_strategy: Optional[Union[str, "_models.BulkCreateCustomAllocationStrategy"]] = None, ) -> None: ... @overload @@ -698,105 +951,91 @@ 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, for example - Azure resource ID. - :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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.OperationState - :ivar timezone: Timezone for the operation. - :vartype timezone: str - :ivar resource_operation_error: Operation level errors if they exist. - :vartype resource_operation_error: ~azure.mgmt.compute.bulkaction.models.ResourceOperationError - :ivar fallback_operation_info: Fallback operation details if a fallback was performed. - :vartype fallback_operation_info: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.models.RetryPolicy +class BulkCreateCustomProperties(_Model): + """Details of the BulkCreateCustom. + + :ivar created_time: The UTC time the BulkCreateCustom resource was created. + :vartype created_time: ~datetime.datetime + :ivar provisioning_state: The status of the last operation. Known values are: "Creating", + "Succeeded", "Failed", "Deleting", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.compute.bulkaction.models.ProvisioningState + :ivar capacity: Total capacity to achieve. It can be in terms of VMs or vCPUs. Required. + :vartype capacity: int + :ivar capacity_type: Specifies capacity type for launching instances. It can be in terms of VMs + or vCPUs. Known values are: "VM" and "VCpu". + :vartype capacity_type: str or ~azure.mgmt.compute.bulkaction.models.CapacityType + :ivar priority_profile: Configuration Options for Regular or Spot instances in + BulkCreateCustom. Required. + :vartype priority_profile: + ~azure.mgmt.compute.bulkaction.models.BulkCreateCustomPriorityProfile + :ivar vm_sizes_profile: List of VM sizes supported for BulkCreateCustom. + :vartype vm_sizes_profile: + list[~azure.mgmt.compute.bulkaction.models.BulkCreateCustomVmSizeProfile] + :ivar compute_profile: Compute Profile to configure the Virtual Machines. Required. + :vartype compute_profile: ~azure.mgmt.compute.bulkaction.models.ComputeProfile + :ivar zone_allocation_policy: Zone Allocation Policy for launching instances. + :vartype zone_allocation_policy: + ~azure.mgmt.compute.bulkaction.models.BulkCreateCustomZoneAllocationPolicy + :ivar overrides_profile: Per-VM overrides and the shared name prefix, specified when the + operation is created. + :vartype overrides_profile: + ~azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverridesProfile + :ivar execution_parameters: Extra parameters that control how the request is executed, + including the retry policy. + :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters """ - 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, for example Azure resource ID.""" - 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"] + created_time: Optional[datetime.datetime] = rest_field(name="createdTime", visibility=["read"], format="rfc3339") + """The UTC time the BulkCreateCustom resource was created.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] ) - """Subscription id attached to the request.""" - deadline: Optional[datetime.datetime] = rest_field( - visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + """The status of the last operation. Known values are: \"Creating\", \"Succeeded\", \"Failed\", + \"Deleting\", and \"Canceled\".""" + capacity: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total capacity to achieve. It can be in terms of VMs or vCPUs. Required.""" + capacity_type: Optional[Union[str, "_models.CapacityType"]] = rest_field( + name="capacityType", visibility=["read", "create", "update", "delete", "query"] ) - """Deadline for the operation.""" - deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field( - name="deadlineType", visibility=["read", "create", "update", "delete", "query"] + """Specifies capacity type for launching instances. It can be in terms of VMs or vCPUs. Known + values are: \"VM\" and \"VCpu\".""" + priority_profile: "_models.BulkCreateCustomPriorityProfile" = rest_field( + name="priorityProfile", 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"] + """Configuration Options for Regular or Spot instances in BulkCreateCustom. Required.""" + vm_sizes_profile: Optional[list["_models.BulkCreateCustomVmSizeProfile"]] = rest_field( + name="vmSizesProfile", 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.""" - resource_operation_error: Optional["_models.ResourceOperationError"] = rest_field( - name="resourceOperationError", visibility=["read", "create", "update", "delete", "query"] + """List of VM sizes supported for BulkCreateCustom.""" + compute_profile: "_models.ComputeProfile" = rest_field( + name="computeProfile", 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"] + """Compute Profile to configure the Virtual Machines. Required.""" + zone_allocation_policy: Optional["_models.BulkCreateCustomZoneAllocationPolicy"] = rest_field( + name="zoneAllocationPolicy", 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" + """Zone Allocation Policy for launching instances.""" + overrides_profile: Optional["_models.BulkCreateCustomOverridesProfile"] = rest_field( + name="overridesProfile", visibility=["create", "update"] ) - """Time the operation was complete if errors are null.""" - retry_policy: Optional["_models.RetryPolicy"] = rest_field( - name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + """Per-VM overrides and the shared name prefix, specified when the operation is created.""" + execution_parameters: Optional["_models.ExecutionParameters"] = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] ) - """Retry policy the user can pass.""" + """Extra parameters that control how the request is executed, including the retry policy.""" @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, - 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, + capacity: int, + priority_profile: "_models.BulkCreateCustomPriorityProfile", + compute_profile: "_models.ComputeProfile", + capacity_type: Optional[Union[str, "_models.CapacityType"]] = None, + vm_sizes_profile: Optional[list["_models.BulkCreateCustomVmSizeProfile"]] = None, + zone_allocation_policy: Optional["_models.BulkCreateCustomZoneAllocationPolicy"] = None, + overrides_profile: Optional["_models.BulkCreateCustomOverridesProfile"] = None, + execution_parameters: Optional["_models.ExecutionParameters"] = None, ) -> None: ... @overload @@ -810,26 +1049,42 @@ 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 BulkCreateCustomVmSizeProfile(_Model): + """A VM size profile entry that may additionally carry an optional per-VM-size profile override. + Every VM that the service assigns to this size inherits the override, layered on top of the + operation-level base profile and beneath any per-VM override. Present only on the + bulkCreateCustom endpoint; the uniform endpoint rejects a non-null override. - :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 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. Required. + :vartype rank: int + :ivar override: Optional per-VM-size profile override applied to every VM the service assigns + to this size. A size maps to many VMs, so virtualMachineName is not part of this shape. + virtualMachineProfile is layered beneath any per-VM override; tags, identity, and plan are + merged with the per-VM override, with the per-VM value winning. + :vartype override: ~azure.mgmt.compute.bulkaction.models.BulkCreateCustomOverrideBase """ - 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.""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the VM size, eg Standard_D2ads_v5. Required.""" + rank: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The rank of this VM size in the priority order. Required.""" + override: Optional["_models.BulkCreateCustomOverrideBase"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Optional per-VM-size profile override applied to every VM the service assigns to this size. A + size maps to many VMs, so virtualMachineName is not part of this shape. virtualMachineProfile + is layered beneath any per-VM override; tags, identity, and plan are merged with the per-VM + override, with the per-VM value winning.""" @overload def __init__( self, *, - error_code: str, - error_details: str, + name: str, + rank: int, + override: Optional["_models.BulkCreateCustomOverrideBase"] = None, ) -> None: ... @overload @@ -843,21 +1098,34 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Resources(_Model): - """The resources needed for the user request. +class BulkCreateCustomZoneAllocationPolicy(_Model): + """The zone allocation policy for distributing VMs across availability zones in BulkCreateCustom. - :ivar ids: The resource ids used for the request. Required. - :vartype ids: list[str] + :ivar distribution_strategy: The distribution strategy for zone allocation. Defaults to + BestEffortBalanced. Known values are: "BestEffortSingleZone", "Prioritized", and + "BestEffortBalanced". + :vartype distribution_strategy: str or + ~azure.mgmt.compute.bulkaction.models.BulkCreateCustomDistributionStrategy + :ivar zone_preferences: The zone preferences for allocation priority. + :vartype zone_preferences: list[~azure.mgmt.compute.bulkaction.models.ZonePreference] """ - ids: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resource ids used for the request. Required.""" + distribution_strategy: Optional[Union[str, "_models.BulkCreateCustomDistributionStrategy"]] = rest_field( + name="distributionStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """The distribution strategy for zone allocation. Defaults to BestEffortBalanced. Known values + are: \"BestEffortSingleZone\", \"Prioritized\", and \"BestEffortBalanced\".""" + 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, *, - ids: list[str], + distribution_strategy: Optional[Union[str, "_models.BulkCreateCustomDistributionStrategy"]] = None, + zone_preferences: Optional[list["_models.ZonePreference"]] = None, ) -> None: ... @overload @@ -871,39 +1139,30 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class RetryPolicy(_Model): - """The retry policy for the user request. +class BulkInstancesInnerError(_Model): + """Inner error details. - :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.compute.bulkaction.models.ResourceOperationType + :ivar exception_type: The exception type. + :vartype exception_type: str + :ivar error_detail: The internal error message or exception dump. + :vartype error_detail: str """ - 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"] + exception_type: Optional[str] = rest_field( + name="exceptionType", 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"] + """The exception type.""" + error_detail: Optional[str] = rest_field( + name="errorDetail", visibility=["read", "create", "update", "delete", "query"] ) - """Action to take on failure. Known values are: \"Unknown\", \"Start\", \"Deallocate\", - \"Hibernate\", \"Create\", and \"Delete\".""" + """The internal error message or exception dump.""" @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, + exception_type: Optional[str] = None, + error_detail: Optional[str] = None, ) -> None: ... @overload @@ -917,29 +1176,392 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StartResourceOperationResponse(_Model): - """The response from a start request. +class CancelOccurrenceRequest(_Model): + """The request to cancel an occurrence. - :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. + :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] + """ + + 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, + *, + resource_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 CancelOperationsContent(_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] + """ + + operation_ids: list[str] = rest_field( + name="operationIds", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of operation ids to cancel operations on. 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 CancelOperationsResponse(_Model): + """This is the response from a cancel operations request. + + :ivar results: An array of resource operations that were successfully cancelled. Required. + :vartype results: list[~azure.mgmt.compute.bulkaction.models.ResourceOperation] + """ + + 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, + *, + 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 CapacityReservationProfile(_Model): + """The parameters of a capacity reservation Profile. + + :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.compute.bulkaction.models.SubResource + """ + + capacity_reservation_group: Optional["_models.SubResource"] = rest_field( + name="capacityReservationGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + capacity_reservation_group: Optional["_models.SubResource"] = 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 ComputeProfile(_Model): + """Compute Profile to configure the Virtual Machines. + + :ivar virtual_machine_profile: Base Virtual Machine Profile Properties to be specified + according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineProperties. + Required. + :vartype virtual_machine_profile: ~azure.mgmt.compute.bulkaction.models.BulkactionVMProperties + :ivar extensions: Virtual Machine Extensions Array to be specified according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineExtension. + :vartype extensions: list[~azure.mgmt.compute.bulkaction.models.BulkactionVMExtension] + :ivar compute_api_version: Specifies the Microsoft.Compute API version to use when creating + underlying Virtual Machines. The default value will be the latest supported computeApiVersion + by LaunchBulkInstancesOperation. + :vartype compute_api_version: str + """ + + virtual_machine_profile: "_models.BulkactionVMProperties" = rest_field( + name="virtualMachineProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Base Virtual Machine Profile Properties to be specified according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineProperties. + Required.""" + extensions: Optional[list["_models.BulkactionVMExtension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Virtual Machine Extensions Array to be specified according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineExtension.""" + compute_api_version: Optional[str] = rest_field( + name="computeApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machines. + The default value will be the latest supported computeApiVersion by + LaunchBulkInstancesOperation.""" + + @overload + def __init__( + self, + *, + virtual_machine_profile: "_models.BulkactionVMProperties", + extensions: Optional[list["_models.BulkactionVMExtension"]] = None, + compute_api_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 CreateResourceOperationResponse(_Model): + """The response from a create request. + + :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 create request eg westus. Required. :vartype location: str - :ivar results: The results from the start request if no errors exist. + :ivar results: The results from the create request if no errors exist. :vartype results: list[~azure.mgmt.compute.bulkaction.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.""" + """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.""" + """The location of the create 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.""" + """The results from the create 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 DataDisk(_Model): + """Describes a data disk. + + :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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.ManagedDiskParametersContent + :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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.DiskDeleteOptionTypes + """ + + 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"] + ) + """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.ManagedDiskParametersContent"] = 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, + *, + 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.ManagedDiskParametersContent"] = 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 + 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 DeallocateResourceOperationResponse(_Model): + """The response from a deallocate request. + + :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.compute.bulkaction.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 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 results from the deallocate request if no errors exist.""" @overload def __init__( @@ -960,3 +1582,7033 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: 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 (PST) + 2025-05-30T06:35:00-07:00. + + :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] + """ + + 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, + *, + delay: datetime.datetime, + resource_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 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 delete request eg virtual machines. Required. + :vartype type: str + :ivar location: The location of the delete request eg westus. Required. + :vartype location: str + :ivar results: The results from the delete request if no errors exist. + :vartype results: list[~azure.mgmt.compute.bulkaction.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 delete request eg virtual machines. Required.""" + location: str = rest_field(visibility=["read", "create"]) + """The location of the delete request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The results from the delete 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 DiagnosticsProfile(_Model): + """Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15. + + :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.compute.bulkaction.models.BootDiagnostics + """ + + boot_diagnostics: Optional["_models.BootDiagnostics"] = rest_field( + name="bootDiagnostics", visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + boot_diagnostics: Optional["_models.BootDiagnostics"] = 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 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 option: Specifies the ephemeral disk settings for operating system disk. "Local" + :vartype option: str or ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.models.DiffDiskPlacement + """ + + option: Optional[Union[str, "_models.DiffDiskOptions"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + option: Optional[Union[str, "_models.DiffDiskOptions"]] = None, + placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = 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 SubResource(_Model): + """Describes a reference to a sub-resource. + + :ivar id: The ID of the sub-resource. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The ID of the sub-resource.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> 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 DiskEncryptionSetParametersContent(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: The ID of the sub-resource. + :vartype id: str + """ + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> 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 DiskEncryptionSettings(_Model): + """Describes a Encryption Settings for a Disk. + + :ivar disk_encryption_key: Specifies the location of the disk encryption key, which is a Key + Vault Secret. + :vartype disk_encryption_key: ~azure.mgmt.compute.bulkaction.models.KeyVaultSecretReference + :ivar key_encryption_key: Specifies the location of the key encryption key in Key Vault. + :vartype key_encryption_key: ~azure.mgmt.compute.bulkaction.models.KeyVaultKeyReference + :ivar enabled: Specifies whether disk encryption should be enabled on the virtual machine. + :vartype enabled: bool + """ + + disk_encryption_key: Optional["_models.KeyVaultSecretReference"] = rest_field( + name="diskEncryptionKey", visibility=["read", "create", "update", "delete", "query"] + ) + """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"] + ) + """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, + *, + disk_encryption_key: Optional["_models.KeyVaultSecretReference"] = None, + key_encryption_key: Optional["_models.KeyVaultKeyReference"] = None, + enabled: 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 EncryptionIdentity(_Model): + """Specifies the Managed Identity used by ADE to get access token for keyvault operations. + + :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 + """ + + user_assigned_identity_resource_id: Optional[str] = rest_field( + name="userAssignedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies ARM Resource ID of one of the user identities associated with the VM.""" + + @overload + def __init__( + self, + *, + user_assigned_identity_resource_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 ErrorAdditionalInfo(_Model): + """The resource management error additional info. + + :ivar type: The additional info type. + :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.compute.bulkaction.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.compute.bulkaction.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"] + ) + """The error additional info.""" + + +class ErrorResponse(_Model): + """Error response. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.compute.bulkaction.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = 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 EventGridAndResourceGraph(_Model): + """Specifies eventGridAndResourceGraph related Scheduled Event related configurations. + + :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 + """ + + 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: ... + + @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 ExecuteCreateContent(_Model): + """The ExecuteCreateRequest request for create operations. + + :ivar resource_config_parameters: resource creation payload. Required. + :vartype resource_config_parameters: + ~azure.mgmt.compute.bulkaction.models.ResourceProvisionPayload + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters + """ + + resource_config_parameters: "_models.ResourceProvisionPayload" = rest_field( + name="resourceConfigParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """resource creation payload. Required.""" + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + + @overload + def __init__( + self, + *, + resource_config_parameters: "_models.ResourceProvisionPayload", + execution_parameters: "_models.ExecutionParameters", + ) -> 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.compute.bulkaction.models.ExecutionParameters + :ivar resources: The resources for the request. + :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: ~azure.mgmt.compute.bulkaction.models.ResourcesWithContext + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: Optional["_models.Resources"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request.""" + resources_with_context: Optional["_models.ResourcesWithContext"] = rest_field( + name="resourcesWithContext", visibility=["read", "create", "update", "delete", "query"] + ) + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: Optional["_models.Resources"] = None, + resources_with_context: Optional["_models.ResourcesWithContext"] = 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 ExecuteDeleteContent(_Model): + """The ExecuteDeleteRequest for delete VM operation. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters + :ivar resources: The resources for the request. + :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: ~azure.mgmt.compute.bulkaction.models.ResourcesWithContext + :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: Optional["_models.Resources"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request.""" + resources_with_context: Optional["_models.ResourcesWithContext"] = rest_field( + name="resourcesWithContext", visibility=["read", "create", "update", "delete", "query"] + ) + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + 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: Optional["_models.Resources"] = None, + resources_with_context: Optional["_models.ResourcesWithContext"] = 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.compute.bulkaction.models.ExecutionParameters + :ivar resources: The resources for the request. + :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: ~azure.mgmt.compute.bulkaction.models.ResourcesWithContext + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: Optional["_models.Resources"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request.""" + resources_with_context: Optional["_models.ResourcesWithContext"] = rest_field( + name="resourcesWithContext", visibility=["read", "create", "update", "delete", "query"] + ) + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: Optional["_models.Resources"] = None, + resources_with_context: Optional["_models.ResourcesWithContext"] = 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 ExecuteReimageRequest(_Model): + """The ExecuteReimageRequest request for reimage operations. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters + :ivar resources: The resources for the request. + :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: ~azure.mgmt.compute.bulkaction.models.ResourcesWithContext + :ivar reimage_parameters: Reimage parameters including base profile and per-resource overrides. + :vartype reimage_parameters: ~azure.mgmt.compute.bulkaction.models.ReimagePayload + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: Optional["_models.Resources"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request.""" + resources_with_context: Optional["_models.ResourcesWithContext"] = rest_field( + name="resourcesWithContext", visibility=["read", "create", "update", "delete", "query"] + ) + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + reimage_parameters: Optional["_models.ReimagePayload"] = rest_field( + name="reimageParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """Reimage parameters including base profile and per-resource overrides.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: Optional["_models.Resources"] = None, + resources_with_context: Optional["_models.ResourcesWithContext"] = None, + reimage_parameters: Optional["_models.ReimagePayload"] = 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 ExecuteStartContent(_Model): + """The ExecuteStartRequest request for executeStart operations. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters + :ivar resources: The resources for the request. + :vartype resources: ~azure.mgmt.compute.bulkaction.models.Resources + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: ~azure.mgmt.compute.bulkaction.models.ResourcesWithContext + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: Optional["_models.Resources"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request.""" + resources_with_context: Optional["_models.ResourcesWithContext"] = rest_field( + name="resourcesWithContext", visibility=["read", "create", "update", "delete", "query"] + ) + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: Optional["_models.Resources"] = None, + resources_with_context: Optional["_models.ResourcesWithContext"] = 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 ExecuteVdiCreateRequest(_Model): + """The VdiCreateRequest request for create operations. + + :ivar resource_config_parameters: resource creation payload. Required. + :vartype resource_config_parameters: + ~azure.mgmt.compute.bulkaction.models.ResourceProvisionVdiPayload + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.compute.bulkaction.models.ExecutionParameters + """ + + resource_config_parameters: "_models.ResourceProvisionVdiPayload" = rest_field( + name="resourceConfigParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """resource creation payload. Required.""" + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + + @overload + def __init__( + self, + *, + resource_config_parameters: "_models.ResourceProvisionVdiPayload", + execution_parameters: "_models.ExecutionParameters", + ) -> 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.compute.bulkaction.models.OptimizationPreference + :ivar retry_policy: Retry policy the user can pass. + :vartype retry_policy: ~azure.mgmt.compute.bulkaction.models.RetryPolicy + :ivar verify_vm_agent_health: When true on an executeStart request, run a post-Start VM agent + health check and engage the fallback chain if the guest agent does not report Ready. Ignored + for non-Start operations. + :vartype verify_vm_agent_health: bool + """ + + 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.""" + verify_vm_agent_health: Optional[bool] = rest_field( + name="verifyVmAgentHealth", visibility=["read", "create", "update", "delete", "query"] + ) + """When true on an executeStart request, run a post-Start VM agent health check and engage the + fallback chain if the guest agent does not report Ready. Ignored for non-Start operations.""" + + @overload + def __init__( + self, + *, + optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = None, + retry_policy: Optional["_models.RetryPolicy"] = None, + verify_vm_agent_health: 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 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.compute.bulkaction.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.compute.bulkaction.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", "Delete", and + "GetInstanceView". + :vartype last_op_type: str or ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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\", \"Delete\", and + \"GetInstanceView\".""" + 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.compute.bulkaction.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.compute.bulkaction.models.OsType + :ivar priority_profile: The priority profile for VM allocation. Required. + :vartype priority_profile: ~azure.mgmt.compute.bulkaction.models.PriorityProfile + :ivar zone_allocation_policy: The zone allocation policy for distributing VMs across + availability zones. + :vartype zone_allocation_policy: ~azure.mgmt.compute.bulkaction.models.ZoneAllocationPolicy + :ivar min_capacity: The minimum number of VMs that must be successfully created for the request + to proceed. If fewer than this number can be allocated, the entire request is automatically + rejected. + :vartype min_capacity: int + """ + + 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.""" + min_capacity: Optional[int] = rest_field( + name="minCapacity", visibility=["read", "create", "update", "delete", "query"] + ) + """The minimum number of VMs that must be successfully created for the request to proceed. If + fewer than this number can be allocated, the entire request is automatically rejected.""" + + @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, + min_capacity: Optional[int] = 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 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] + """ + + 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.""" + + @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 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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 LaunchBulkInstancesOperationProperties(_Model): + """Details of the LaunchBulkInstancesOperation. + + :ivar created_time: The UTC time the LaunchBulkInstancesOperation resource was created. + :vartype created_time: ~datetime.datetime + :ivar provisioning_state: The status of the last operation. Known values are: "Creating", + "Succeeded", "Failed", "Deleting", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.compute.bulkaction.models.ProvisioningState + :ivar capacity: Total capacity to achieve. It can be in terms of VMs or vCPUs. Required. + :vartype capacity: int + :ivar capacity_type: Specifies capacity type for launching instances. It can be in terms of VMs + or vCPUs. Known values are: "VM" and "VCpu". + :vartype capacity_type: str or ~azure.mgmt.compute.bulkaction.models.CapacityType + :ivar priority_profile: Configuration Options for Regular or Spot instances in + LaunchBulkInstancesOperation. Required. + :vartype priority_profile: ~azure.mgmt.compute.bulkaction.models.PriorityProfile + :ivar vm_sizes_profile: List of VM sizes supported for LaunchBulkInstancesOperation. + :vartype vm_sizes_profile: list[~azure.mgmt.compute.bulkaction.models.VmSizeProfile] + :ivar vm_attributes: Attributes to launch instances. + :vartype vm_attributes: ~azure.mgmt.compute.bulkaction.models.VMAttributes + :ivar compute_profile: Compute Profile to configure the Virtual Machines. Required. + :vartype compute_profile: ~azure.mgmt.compute.bulkaction.models.ComputeProfile + :ivar zone_allocation_policy: Zone Allocation Policy for launching instances. + :vartype zone_allocation_policy: ~azure.mgmt.compute.bulkaction.models.ZoneAllocationPolicy + :ivar retry_policy: Retry policy the user can pass. + :vartype retry_policy: ~azure.mgmt.compute.bulkaction.models.RetryPolicy + """ + + created_time: Optional[datetime.datetime] = rest_field(name="createdTime", visibility=["read"], format="rfc3339") + """The UTC time the LaunchBulkInstancesOperation resource was created.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The status of the last operation. Known values are: \"Creating\", \"Succeeded\", \"Failed\", + \"Deleting\", and \"Canceled\".""" + capacity: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Total capacity to achieve. It can be in terms of VMs or vCPUs. Required.""" + capacity_type: Optional[Union[str, "_models.CapacityType"]] = rest_field( + name="capacityType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies capacity type for launching instances. It can be in terms of VMs or vCPUs. Known + values are: \"VM\" and \"VCpu\".""" + priority_profile: "_models.PriorityProfile" = rest_field( + name="priorityProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration Options for Regular or Spot instances in LaunchBulkInstancesOperation. Required.""" + vm_sizes_profile: Optional[list["_models.VmSizeProfile"]] = rest_field( + name="vmSizesProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """List of VM sizes supported for LaunchBulkInstancesOperation.""" + vm_attributes: Optional["_models.VMAttributes"] = rest_field( + name="vmAttributes", visibility=["read", "create", "update", "delete", "query"] + ) + """Attributes to launch instances.""" + compute_profile: "_models.ComputeProfile" = rest_field( + name="computeProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Compute Profile to configure the Virtual Machines. Required.""" + zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = rest_field( + name="zoneAllocationPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Zone Allocation Policy for launching instances.""" + 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, + *, + capacity: int, + priority_profile: "_models.PriorityProfile", + compute_profile: "_models.ComputeProfile", + capacity_type: Optional[Union[str, "_models.CapacityType"]] = None, + vm_sizes_profile: Optional[list["_models.VmSizeProfile"]] = None, + vm_attributes: Optional["_models.VMAttributes"] = None, + zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = 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 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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 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.compute.bulkaction.models.SystemData + """ + + +class LocationBasedBulkCreateCustom(ProxyResource): + """Location based BulkCreateCustom resource. The location is part of the resource path. + + :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.compute.bulkaction.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.compute.bulkaction.models.BulkCreateCustomProperties + :ivar zones: Zones in which the BulkCreateCustom is available. + :vartype zones: list[str] + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.compute.bulkaction.models.ManagedServiceIdentity + :ivar plan: Details of the resource plan. + :vartype plan: ~azure.mgmt.compute.bulkaction.models.Plan + """ + + properties: Optional["_models.BulkCreateCustomProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Zones in which the BulkCreateCustom is available.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Details of the resource plan.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.BulkCreateCustomProperties"] = None, + zones: Optional[list[str]] = None, + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + plan: Optional["_models.Plan"] = 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 LocationBasedLaunchBulkInstancesOperation(ProxyResource): # pylint: disable=name-too-long + """Location based LaunchBulkInstancesOperation resource. The location is part of the resource + path. + + :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.compute.bulkaction.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: + ~azure.mgmt.compute.bulkaction.models.LaunchBulkInstancesOperationProperties + :ivar zones: Zones in which the LaunchBulkInstancesOperation is available. + :vartype zones: list[str] + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.compute.bulkaction.models.ManagedServiceIdentity + :ivar plan: Details of the resource plan. + :vartype plan: ~azure.mgmt.compute.bulkaction.models.Plan + """ + + properties: Optional["_models.LaunchBulkInstancesOperationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Zones in which the LaunchBulkInstancesOperation is available.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Details of the resource plan.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.LaunchBulkInstancesOperationProperties"] = None, + zones: Optional[list[str]] = None, + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + plan: Optional["_models.Plan"] = 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 ManagedDiskParametersContent(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.compute.bulkaction.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.compute.bulkaction.models.DiskEncryptionSetParametersContent + :ivar security_profile: Specifies the security profile for the managed disk. + :vartype security_profile: ~azure.mgmt.compute.bulkaction.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.DiskEncryptionSetParametersContent"] = 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.DiskEncryptionSetParametersContent"] = 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 ManagedServiceIdentity(_Model): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.compute.bulkaction.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.compute.bulkaction.models.UserAssignedIdentity] + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The service principal ID of the system assigned 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 of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity assigned to this resource. Required. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """The identities assigned to this resource by the user.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ManagedServiceIdentityType"], + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.NotificationType + :ivar language: The language the notification should be sent on. Required. "en-us" + :vartype language: str or ~azure.mgmt.compute.bulkaction.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 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.compute.bulkaction.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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 OperationStatusResult(_Model): + """The current status of an async operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.compute.bulkaction.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.compute.bulkaction.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = 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.compute.bulkaction.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.compute.bulkaction.models.DiskEncryptionSettings + :ivar name: The disk name. + :vartype name: str + :ivar vhd: The virtual hard disk. + :vartype vhd: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.ManagedDiskParametersContent + :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.compute.bulkaction.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.ManagedDiskParametersContent"] = 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.ManagedDiskParametersContent"] = 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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 OSProfileProvisioningData(_Model): + """Additional parameters for Reimaging Non-Ephemeral Virtual Machine. + + :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 `_. If + using cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during + creation `_. + :vartype custom_data: str + """ + + 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 + `_. If using + cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during creation + `_.""" + + @overload + def __init__( + self, + *, + admin_password: Optional[str] = None, + custom_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 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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 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.compute.bulkaction.models.PriorityType + :ivar max_price_per_vm: Price per hour of each Spot VM will never exceed this. Available from + 2026-04-06-preview. + :vartype max_price_per_vm: float + :ivar eviction_policy: Eviction Policy to follow when evicting Spot VMs. Available from + 2026-04-06-preview. Known values are: "Delete" and "Deallocate". + :vartype eviction_policy: str or ~azure.mgmt.compute.bulkaction.models.EvictionPolicy + :ivar allocation_strategy: The allocation strategy for VM size selection. Known values are: + "LowestPrice", "Prioritized", and "CapacityOptimized". + :vartype allocation_strategy: str or ~azure.mgmt.compute.bulkaction.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\".""" + max_price_per_vm: Optional[float] = rest_field( + name="maxPricePerVM", visibility=["read", "create", "update", "delete", "query"] + ) + """Price per hour of each Spot VM will never exceed this. Available from 2026-04-06-preview.""" + eviction_policy: Optional[Union[str, "_models.EvictionPolicy"]] = rest_field( + name="evictionPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Eviction Policy to follow when evicting Spot VMs. Available from 2026-04-06-preview. Known + values are: \"Delete\" and \"Deallocate\".""" + 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, + max_price_per_vm: Optional[float] = None, + eviction_policy: Optional[Union[str, "_models.EvictionPolicy"]] = 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.PublicIPAddressSkuName + :ivar tier: Specify public IP sku tier. Known values are: "Regional" and "Global". + :vartype tier: str or ~azure.mgmt.compute.bulkaction.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 RecurringScheduledActionsExecutionParameters(_Model): # pylint: disable=name-too-long + """The execution parameters the scheduled action is supposed to follow. + + :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.compute.bulkaction.models.OptimizationPreference + :ivar retry_policy: Retry policy the user can pass. + :vartype retry_policy: + ~azure.mgmt.compute.bulkaction.models.RecurringScheduledActionsRetryPolicy + """ + + 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.RecurringScheduledActionsRetryPolicy"] = 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.RecurringScheduledActionsRetryPolicy"] = 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 RecurringScheduledActionsRetryPolicy(_Model): + """Retry policy the scheduled action can pass. + + :ivar retry_count: Retry count for the request. + :vartype retry_count: int + :ivar retry_window_in_minutes: Retry window in minutes for the 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.compute.bulkaction.models.RecurringScheduledActionsResourceOperationType + """ + + retry_count: Optional[int] = rest_field( + name="retryCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Retry count for the request.""" + retry_window_in_minutes: Optional[int] = rest_field( + name="retryWindowInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Retry window in minutes for the request.""" + on_failure_action: Optional[Union[str, "_models.RecurringScheduledActionsResourceOperationType"]] = 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.RecurringScheduledActionsResourceOperationType"]] = 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 ReimagePayload(_Model): + """Reimage payload with common profile and per-resource overrides. + + :ivar base_profile: Common reimage profile applied to all resources unless overridden. + :vartype base_profile: ~azure.mgmt.compute.bulkaction.models.VirtualMachineReimageParameters + :ivar resource_overrides: Per-resource reimage overrides. + :vartype resource_overrides: + list[~azure.mgmt.compute.bulkaction.models.ReimageResourceOverride] + """ + + base_profile: Optional["_models.VirtualMachineReimageParameters"] = rest_field( + name="baseProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Common reimage profile applied to all resources unless overridden.""" + resource_overrides: Optional[list["_models.ReimageResourceOverride"]] = rest_field( + name="resourceOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """Per-resource reimage overrides.""" + + @overload + def __init__( + self, + *, + base_profile: Optional["_models.VirtualMachineReimageParameters"] = None, + resource_overrides: Optional[list["_models.ReimageResourceOverride"]] = 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 ReimageResourceOperationResponse(_Model): + """The response from a reimage request. + + :ivar description: The description of the operation response. Required. + :vartype description: str + :ivar type: The type of resources used in the reimage request eg virtual machines. Required. + :vartype type: str + :ivar location: The location of the reimage request eg westus. Required. + :vartype location: str + :ivar results: The results from the reimage request if no errors exist. + :vartype results: list[~azure.mgmt.compute.bulkaction.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 reimage request eg virtual machines. Required.""" + location: str = rest_field(visibility=["read", "create"]) + """The location of the reimage request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The results from the reimage 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 ReimageResourceOverride(_Model): + """Per-resource override entry for reimage requests. + + :ivar resource_id: The Azure resource ID of the virtual machine for this override. Required. + :vartype resource_id: str + :ivar profile: Per-resource reimage profile override. Required. + :vartype profile: ~azure.mgmt.compute.bulkaction.models.VirtualMachineReimageParameters + """ + + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The Azure resource ID of the virtual machine for this override. Required.""" + profile: "_models.VirtualMachineReimageParameters" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Per-resource reimage profile override. Required.""" + + @overload + def __init__( + self, + *, + resource_id: str, + profile: "_models.VirtualMachineReimageParameters", + ) -> 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.compute.bulkaction.models.ScheduledActionResourceInput] + """ + + resources: list["_models.ScheduledActionResourceInput"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of resources to be attached/patched. Required.""" + + @overload + def __init__( + self, + *, + resources: list["_models.ScheduledActionResourceInput"], + ) -> 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 ResourceNotificationDetails(_Model): + """Resource notification details containing notification metadata like the resource context. + + :ivar resource_context: Resource context for notification tracking. + :vartype resource_context: str + """ + + resource_context: Optional[str] = rest_field( + name="resourceContext", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource context for notification tracking.""" + + @overload + def __init__( + self, + *, + resource_context: 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 ResourceOperation(_Model): + """High level response from an operation on a resource. + + :ivar resource_id: Unique identifier for the resource involved in the operation, for example + Azure resource ID. + :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.compute.bulkaction.models.ResourceOperationDetails + :ivar virtual_machine_info: Information about the virtual machine. + :vartype virtual_machine_info: ~azure.mgmt.compute.bulkaction.models.VirtualMachineInfo + """ + + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique identifier for the resource involved in the operation, for example Azure resource ID.""" + 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.""" + virtual_machine_info: Optional["_models.VirtualMachineInfo"] = rest_field( + name="virtualMachineInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Information about the virtual machine.""" + + @overload + def __init__( + self, + *, + resource_id: Optional[str] = None, + error_code: Optional[str] = None, + error_details: Optional[str] = None, + operation: Optional["_models.ResourceOperationDetails"] = None, + virtual_machine_info: Optional["_models.VirtualMachineInfo"] = 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, for example + Azure resource ID. + :vartype resource_id: str + :ivar op_type: Type of operation performed on the resources. Known values are: "Unknown", + "Start", "Deallocate", "Hibernate", "Create", "Delete", and "GetInstanceView". + :vartype op_type: str or ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.OperationState + :ivar timezone: Timezone for the operation. + :vartype timezone: str + :ivar resource_operation_error: Operation level errors if they exist. + :vartype resource_operation_error: ~azure.mgmt.compute.bulkaction.models.ResourceOperationError + :ivar fallback_operation_info: Fallback operation details if a fallback was performed. + :vartype fallback_operation_info: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.models.RetryPolicy + :ivar resource_notification_details: Resource notification details. + :vartype resource_notification_details: + ~azure.mgmt.compute.bulkaction.models.ResourceNotificationDetails + """ + + 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, for example Azure resource ID.""" + 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\", \"Delete\", and \"GetInstanceView\".""" + 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.""" + 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.""" + resource_notification_details: Optional["_models.ResourceNotificationDetails"] = rest_field( + name="resourceNotificationDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource notification details.""" + + @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, + 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, + resource_notification_details: Optional["_models.ResourceNotificationDetails"] = 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 ResourceOperationResponse(_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.compute.bulkaction.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 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.compute.bulkaction.models.ScheduledActionResourceInput] + """ + + resources: list["_models.ScheduledActionResourceInput"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of resources we watch to patch. Required.""" + + @overload + def __init__( + self, + *, + resources: list["_models.ScheduledActionResourceInput"], + ) -> 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 base_profile: Bulk Actions Virtual Machine Profile object that contains VM properties + that are common across all VMs in this batch. + :vartype base_profile: dict[str, any] + :ivar resource_overrides: Bulk Actions Virtual Machine Profile array, that contains VM + properties that should be overridden for each VM in the batch. + :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", the service will create a + name based on the prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1.. + :vartype resource_prefix: str + """ + + base_profile: Optional[dict[str, Any]] = rest_field( + name="baseProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Bulk Actions Virtual Machine Profile object that contains VM properties that are common across + all VMs in this batch.""" + resource_overrides: Optional[list[dict[str, Any]]] = rest_field( + name="resourceOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """Bulk Actions Virtual Machine Profile 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\", the service will create a name based on the + prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1..""" + + @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, + ) -> 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 ResourceProvisionVdiPayload(_Model): + """Resource creation data model with Flex properties for VDI scenarios. + + :ivar base_profile: Bulk Actions Virtual Machine Profile object that contains VM properties + that are common across all VMs in this batch. + :vartype base_profile: dict[str, any] + :ivar resource_overrides: Bulk Actions Virtual Machine Profile array, that contains VM + properties that should be overridden for each VM in the batch. + :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", the service will create a + name based on the prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1.. + :vartype resource_prefix: str + :ivar flex_properties: Flex properties used for VDI resource creation scenarios. Required. + :vartype flex_properties: ~azure.mgmt.compute.bulkaction.models.FlexProperties + """ + + base_profile: Optional[dict[str, Any]] = rest_field( + name="baseProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Bulk Actions Virtual Machine Profile object that contains VM properties that are common across + all VMs in this batch.""" + resource_overrides: Optional[list[dict[str, Any]]] = rest_field( + name="resourceOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """Bulk Actions Virtual Machine Profile 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\", the service will create a name based on the + prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1..""" + flex_properties: "_models.FlexProperties" = rest_field( + name="flexProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Flex properties used for VDI resource creation scenarios. Required.""" + + @overload + def __init__( + self, + *, + resource_count: int, + flex_properties: "_models.FlexProperties", + base_profile: Optional[dict[str, Any]] = None, + resource_overrides: Optional[list[dict[str, Any]]] = 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.compute.bulkaction.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 ResourcesWithContext(_Model): + """The resources needed for the user request with the context for tracking purposes. + + :ivar resources: The resource ids used for the request. Required. + :vartype resources: list[~azure.mgmt.compute.bulkaction.models.ResourceWithContext] + """ + + resources: list["_models.ResourceWithContext"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ids used for the request. Required.""" + + @overload + def __init__( + self, + *, + resources: list["_models.ResourceWithContext"], + ) -> 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 ResourceWithContext(_Model): + """The resources needed for the user request with the resourceContext. + + :ivar resource_id: The resource ids used for the request. Required. + :vartype resource_id: str + :ivar resource_context: The operational context of the resourceId. Required. + :vartype resource_context: str + """ + + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The resource ids used for the request. Required.""" + resource_context: str = rest_field( + name="resourceContext", visibility=["read", "create", "update", "delete", "query"] + ) + """The operational context of the resourceId. Required.""" + + @overload + def __init__( + self, + *, + resource_id: str, + resource_context: 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 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", "Delete", and "GetInstanceView". + :vartype on_failure_action: str or ~azure.mgmt.compute.bulkaction.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\", \"Delete\", and \"GetInstanceView\".""" + + @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 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.ScheduledActionsSchedule + :ivar notification_settings: The notification settings for the scheduled action. Required. + :vartype notification_settings: + list[~azure.mgmt.compute.bulkaction.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.compute.bulkaction.models.RecurringScheduledActionsProvisioningState + """ + + 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.RecurringScheduledActionsProvisioningState"]] = 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.compute.bulkaction.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 ScheduledActionResourceInput(_Model): + """Represents the writable fields of a scheduled action resource used in attach and patch + requests. + + :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.compute.bulkaction.models.NotificationProperties] + """ + + 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.compute.bulkaction.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.ScheduledActionsSchedule + :ivar notification_settings: The notification settings for the scheduled action. Required. + :vartype notification_settings: + list[~azure.mgmt.compute.bulkaction.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.compute.bulkaction.models.RecurringScheduledActionsProvisioningState + :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.compute.bulkaction.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.RecurringScheduledActionsProvisioningState"]] = 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. If empty, + it means it will run on every week day. + :vartype requested_week_days: list[str or ~azure.mgmt.compute.bulkaction.models.WeekDay] + :ivar requested_months: The months the scheduled action is supposed to run on. If empty, it + means it will run on every month. + :vartype requested_months: list[str or ~azure.mgmt.compute.bulkaction.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. + :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.compute.bulkaction.models.RecurringScheduledActionsExecutionParameters + :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.compute.bulkaction.models.RecurringScheduledActionsDeadlineType + """ + + 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: Optional[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. If empty, it means it will run on + every week day.""" + requested_months: Optional[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. If empty, it means it will run on every + month.""" + requested_days_of_the_month: Optional[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.""" + execution_parameters: Optional["_models.RecurringScheduledActionsExecutionParameters"] = 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.RecurringScheduledActionsDeadlineType"]] = 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: Optional[list[Union[str, "_models.WeekDay"]]] = None, + requested_months: Optional[list[Union[str, "_models.Month"]]] = None, + requested_days_of_the_month: Optional[list[int]] = None, + execution_parameters: Optional["_models.RecurringScheduledActionsExecutionParameters"] = None, + deadline_type: Optional[Union[str, "_models.RecurringScheduledActionsDeadlineType"]] = 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 ScheduledActionsScheduleUpdate(_Model): + """Schedule properties for update (PATCH). All properties are optional so individual fields can be + patched (merge semantics); omitting a property preserves the current value. + + :ivar scheduled_time: The time the scheduled action is supposed to run on. + :vartype scheduled_time: ~datetime.time + :ivar time_zone: The timezone the scheduled time is specified on. + :vartype time_zone: str + :ivar requested_week_days: The week days the scheduled action is supposed to run on. If empty, + it means it will run on every week day. + :vartype requested_week_days: list[str or ~azure.mgmt.compute.bulkaction.models.WeekDay] + :ivar requested_months: The months the scheduled action is supposed to run on. If empty, it + means it will run on every month. + :vartype requested_months: list[str or ~azure.mgmt.compute.bulkaction.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. + :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.compute.bulkaction.models.RecurringScheduledActionsExecutionParameters + :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.compute.bulkaction.models.RecurringScheduledActionsDeadlineType + """ + + scheduled_time: Optional[datetime.time] = rest_field( + name="scheduledTime", visibility=["read", "create", "update", "delete", "query"] + ) + """The time the scheduled action is supposed to run on.""" + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) + """The timezone the scheduled time is specified on.""" + requested_week_days: Optional[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. If empty, it means it will run on + every week day.""" + requested_months: Optional[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. If empty, it means it will run on every + month.""" + requested_days_of_the_month: Optional[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.""" + execution_parameters: Optional["_models.RecurringScheduledActionsExecutionParameters"] = 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.RecurringScheduledActionsDeadlineType"]] = 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: Optional[datetime.time] = None, + time_zone: Optional[str] = None, + requested_week_days: Optional[list[Union[str, "_models.WeekDay"]]] = None, + requested_months: Optional[list[Union[str, "_models.Month"]]] = None, + requested_days_of_the_month: Optional[list[int]] = None, + execution_parameters: Optional["_models.RecurringScheduledActionsExecutionParameters"] = None, + deadline_type: Optional[Union[str, "_models.RecurringScheduledActionsDeadlineType"]] = 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.ScheduledActionsScheduleUpdate + :ivar notification_settings: The notification settings for the scheduled action. + :vartype notification_settings: + list[~azure.mgmt.compute.bulkaction.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.ScheduledActionsScheduleUpdate"] = 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.ScheduledActionsScheduleUpdate"] = 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.compute.bulkaction.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.compute.bulkaction.models.UserInitiatedRedeploy + :ivar user_initiated_reboot: The configuration parameters used while creating + userInitiatedReboot scheduled event setting creation. + :vartype user_initiated_reboot: ~azure.mgmt.compute.bulkaction.models.UserInitiatedReboot + :ivar scheduled_events_additional_publishing_targets: The configuration parameters used while + publishing scheduledEventsAdditionalPublishingTargets. + :vartype scheduled_events_additional_publishing_targets: + ~azure.mgmt.compute.bulkaction.models.ScheduledEventsAdditionalPublishingTargets + :ivar all_instances_down: The configuration parameters used while creating AllInstancesDown + scheduled event setting creation. + :vartype all_instances_down: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.models.TerminateNotificationProfile + :ivar os_image_notification_profile: Specifies OS Image Scheduled Event related configurations. + :vartype os_image_notification_profile: + ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.SecurityTypes + :ivar encryption_identity: Specifies the Managed Identity used by ADE to get access token for + keyvault operations. + :vartype encryption_identity: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.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 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.compute.bulkaction.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.compute.bulkaction.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 + 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 TerminateNotificationProfile(_Model): + """Profile properties for the Terminate Scheduled event. + + :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 + """ + + not_before_timeout: Optional[str] = rest_field( + name="notBeforeTimeout", visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + 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 UefiSettings(_Model): + """Specifies the security settings like secure boot and vTPM used while creating the virtual + machine. Minimum api-version: 2020-12-01. + + :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 + """ + + secure_boot_enabled: Optional[bool] = rest_field( + name="secureBootEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + secure_boot_enabled: Optional[bool] = None, + v_tpm_enabled: 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 UserAssignedIdentitiesValue(_Model): + """UserAssignedIdentitiesValue. + + :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 + """ + + 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 UserAssignedIdentity(_Model): + """User assigned identity properties. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal ID of the assigned identity.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) + """The client ID of the assigned identity.""" + + +class UserInitiatedReboot(_Model): + """Specifies Reboot related Scheduled Event related configurations. + + :ivar user_initiated_reboot_automatically_approve: Specifies Reboot Scheduled Event related + configurations. + :vartype user_initiated_reboot_automatically_approve: bool + """ + + user_initiated_reboot_automatically_approve: Optional[bool] = rest_field( + name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies Reboot Scheduled Event related configurations.""" + + @overload + def __init__( + self, + *, + user_initiated_reboot_automatically_approve: 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 UserInitiatedRedeploy(_Model): + """Specifies Redeploy related Scheduled Event related configurations. + + :ivar user_initiated_redeploy_automatically_approve: Specifies Redeploy Scheduled Event related + configurations. + :vartype user_initiated_redeploy_automatically_approve: bool + """ + + user_initiated_redeploy_automatically_approve: Optional[bool] = rest_field( + name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies Redeploy Scheduled Event related configurations.""" + + @overload + def __init__( + self, + *, + user_initiated_redeploy_automatically_approve: 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 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 + """ + + 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 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"] + ) + """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, + *, + certificate_url: Optional[str] = None, + certificate_store: 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 VaultSecretGroup(_Model): + """Describes a set of certificates which are all in the same Key Vault. + + :ivar source_vault: The relative URL of the Key Vault containing all of the certificates in + VaultCertificates. + :vartype source_vault: ~azure.mgmt.compute.bulkaction.models.SubResource + :ivar vault_certificates: The list of key vault references in SourceVault which contain + certificates. + :vartype vault_certificates: list[~azure.mgmt.compute.bulkaction.models.VaultCertificate] + """ + + source_vault: Optional["_models.SubResource"] = rest_field( + name="sourceVault", 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"] + ) + """The list of key vault references in SourceVault which contain certificates.""" + + @overload + def __init__( + self, + *, + source_vault: Optional["_models.SubResource"] = None, + vault_certificates: Optional[list["_models.VaultCertificate"]] = 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 VirtualHardDisk(_Model): + """Describes the uri of a disk. + + :ivar uri: Specifies the virtual hard disk's uri. + :vartype uri: str + """ + + uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the virtual hard disk's uri.""" + + @overload + def __init__( + self, + *, + uri: 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 VirtualMachine(_Model): + """A virtual machine launched by a LaunchBulkInstancesOperation. + + :ivar name: The name of the virtual machine. Required. + :vartype name: str + :ivar id: The compute RP resource id of the virtual machine. + subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}. + Required. + :vartype id: str + :ivar type: Type of the virtual machine. + :vartype type: str + :ivar operation_status: Represents the operationStatus of the virtual machine in response to + the last operation performed on it by the LaunchBulkInstancesOperation. Required. Known values + are: "Creating", "Canceled", "CancelFailedStatusUnknown", "Failed", "Succeeded", "Deleting", + and "Cancelling". + :vartype operation_status: str or ~azure.mgmt.compute.bulkaction.models.VMOperationStatus + :ivar error: Error information when operationStatus is Failed. + :vartype error: ~azure.mgmt.compute.bulkaction.models.ApiError + """ + + name: str = rest_field(visibility=["read"]) + """The name of the virtual machine. Required.""" + id: str = rest_field(visibility=["read"]) + """The compute RP resource id of the virtual machine. + subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}. + Required.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Type of the virtual machine.""" + operation_status: Union[str, "_models.VMOperationStatus"] = rest_field(name="operationStatus", visibility=["read"]) + """Represents the operationStatus of the virtual machine in response to the last operation + performed on it by the LaunchBulkInstancesOperation. Required. Known values are: \"Creating\", + \"Canceled\", \"CancelFailedStatusUnknown\", \"Failed\", \"Succeeded\", \"Deleting\", and + \"Cancelling\".""" + error: Optional["_models.ApiError"] = rest_field(visibility=["read"]) + """Error information when operationStatus is Failed.""" + + +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.compute.bulkaction.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.compute.bulkaction.models.UserAssignedIdentitiesValue] + """ + + 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 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, + *, + type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = 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 VirtualMachineInfo(_Model): + """Information about a virtual machine. + + :ivar vm_size: The name of the VM size, eg Standard_D2ads_v5. + :vartype vm_size: str + :ivar zone: The zone identifier. + :vartype zone: str + """ + + vm_size: Optional[str] = rest_field(name="vmSize", visibility=["read", "create", "update", "delete", "query"]) + """The name of the VM size, eg Standard_D2ads_v5.""" + zone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The zone identifier.""" + + @overload + def __init__( + self, + *, + vm_size: Optional[str] = None, + 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 VirtualMachineIpTag(_Model): + """Contains the IP tag associated with the public IP address. + + :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 + """ + + ip_tag_type: Optional[str] = rest_field( + name="ipTagType", visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + ip_tag_type: Optional[str] = None, + tag: 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 VirtualMachineNetworkInterfaceConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machine network interface configurations. + + :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.compute.bulkaction.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"] + ) + """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, + *, + name: str, + properties: Optional["_models.VirtualMachineNetworkInterfaceConfigurationProperties"] = None, + 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 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.compute.bulkaction.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.compute.bulkaction.models.SubResource + :ivar dns_settings: The dns settings to be applied on the network interfaces. + :vartype dns_settings: + ~azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration + :ivar ip_configurations: Specifies the IP configurations of the network interface. Required. + :vartype ip_configurations: + list[~azure.mgmt.compute.bulkaction.models.VirtualMachineNetworkInterfaceIPConfiguration] + :ivar dscp_configuration: The DSCP configuration for the network interface. + :vartype dscp_configuration: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.NetworkInterfaceAuxiliarySku + """ + + 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, + *, + 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 + 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 VirtualMachineNetworkInterfaceDnsSettingsConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machines network configuration's DNS settings. + + :ivar dns_servers: List of DNS servers IP addresses. + :vartype dns_servers: list[str] + """ + + dns_servers: Optional[list[str]] = rest_field( + name="dnsServers", visibility=["read", "create", "update", "delete", "query"] + ) + """List of DNS servers IP addresses.""" + + @overload + def __init__( + self, + *, + dns_servers: 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 VirtualMachineNetworkInterfaceIPConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machine network profile's IP configuration. + + :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.compute.bulkaction.models.VirtualMachineNetworkInterfaceIPConfigurationProperties + """ + + 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"] + ) + """Describes a virtual machine network interface IP configuration properties.""" + + @overload + def __init__( + self, + *, + name: str, + properties: Optional["_models.VirtualMachineNetworkInterfaceIPConfigurationProperties"] = 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 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.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.IPVersions + :ivar application_security_groups: Specifies an array of references to application security + group. + :vartype application_security_groups: list[~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.SubResource] + """ + + 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 publicIPAddressConfiguration.""" + private_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = rest_field( + name="privateIPAddressVersion", 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"] + ) + """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, + *, + 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 + 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 VirtualMachinePublicIPAddressConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machines IP Configuration's PublicIPAddress configuration. + + :ivar name: The publicIP address configuration name. Required. + :vartype name: str + :ivar properties: Describes a virtual machines IP Configuration's PublicIPAddress + configuration. + :vartype properties: + ~azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressConfigurationProperties + :ivar sku: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + :vartype sku: ~azure.mgmt.compute.bulkaction.models.PublicIPAddressSku + :ivar tags: Resource tags applied to the publicIP address created by this + PublicIPAddressConfiguration. + :vartype tags: dict[str, str] + """ + + 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, + *, + name: str, + properties: Optional["_models.VirtualMachinePublicIPAddressConfigurationProperties"] = None, + sku: Optional["_models.PublicIPAddressSku"] = None, + 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 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.compute.bulkaction.models.DeleteOptions + :ivar dns_settings: The dns settings to be applied on the publicIP addresses . + :vartype dns_settings: + ~azure.mgmt.compute.bulkaction.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration + :ivar ip_tags: The list of IP tags associated with the public IP address. + :vartype ip_tags: list[~azure.mgmt.compute.bulkaction.models.VirtualMachineIpTag] + :ivar public_ip_prefix: The PublicIPPrefix from which to allocate publicIP addresses. + :vartype public_ip_prefix: ~azure.mgmt.compute.bulkaction.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.compute.bulkaction.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.compute.bulkaction.models.PublicIPAllocationMethod + """ + + idle_timeout_in_minutes: Optional[int] = rest_field( + name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + 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 + 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 VirtualMachinePublicIPAddressDnsSettingsConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machines network configuration's DNS settings. + + :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.compute.bulkaction.models.DomainNameLabelScopeTypes + """ + + domain_name_label: str = rest_field( + name="domainNameLabel", visibility=["read", "create", "update", "delete", "query"] + ) + """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 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, + *, + domain_name_label: str, + domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = 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 VirtualMachineReimageParameters(_Model): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be + reimaged. + + :ivar temp_disk: Specifies whether to reimage temp disk. Default value: false. Note: This temp + disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. + :vartype temp_disk: bool + :ivar exact_version: Specifies in decimal number, the version the OS disk should be reimaged + to. If exact version is not provided, the OS disk is reimaged to the existing version of OS + Disk. + :vartype exact_version: str + :ivar os_profile: Specifies information required for reimaging the non-ephemeral OS disk. + :vartype os_profile: ~azure.mgmt.compute.bulkaction.models.OSProfileProvisioningData + """ + + temp_disk: Optional[bool] = rest_field(name="tempDisk", visibility=["read", "create", "update", "delete", "query"]) + """Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage + parameter is only supported for VM/VMSS with Ephemeral OS disk.""" + exact_version: Optional[str] = rest_field( + name="exactVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is + not provided, the OS disk is reimaged to the existing version of OS Disk.""" + os_profile: Optional["_models.OSProfileProvisioningData"] = rest_field( + name="osProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies information required for reimaging the non-ephemeral OS disk.""" + + @overload + def __init__( + self, + *, + temp_disk: Optional[bool] = None, + exact_version: Optional[str] = None, + os_profile: Optional["_models.OSProfileProvisioningData"] = 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 VMAttributeMinMaxDouble(_Model): + """VMAttributes using double values. + + :ivar min: Minimum value. If not specified, no minimum filter is applied. + :vartype min: float + :ivar max: Maximum value. Must be greater than zero. Double.MaxValue(1.7976931348623157E+308). + :vartype max: float + """ + + min: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Minimum value. If not specified, no minimum filter is applied.""" + max: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum value. Must be greater than zero. Double.MaxValue(1.7976931348623157E+308).""" + + @overload + def __init__( + self, + *, + min: Optional[float] = None, # pylint: disable=redefined-builtin + max: Optional[float] = None, # pylint: disable=redefined-builtin + ) -> 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 VMAttributeMinMaxInteger(_Model): + """While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 + (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes. + + :ivar min: Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified. + :vartype min: int + :ivar max: Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. + :vartype max: int + """ + + min: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.""" + max: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.""" + + @overload + def __init__( + self, + *, + min: Optional[int] = None, # pylint: disable=redefined-builtin + max: Optional[int] = None, # pylint: disable=redefined-builtin + ) -> 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 VMAttributes(_Model): + """VMAttributes that will be used to filter VMSizes which will be used to launch instances. + + :ivar v_cpu_count: The range of vCpuCount specified from Min to Max. Must be specified if + VMAttributes are specified, either Min or Max is required if specified. Required. + :vartype v_cpu_count: ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxInteger + :ivar memory_in_gi_b: The range of memory specified from Min to Max. Must be specified if + VMAttributes are specified, either Min or Max is required if specified. Required. + :vartype memory_in_gi_b: ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxDouble + :ivar architecture_types: The VM architecture types specified as a list. Must be specified if + VMAttributes are specified. Must be compatible with image used. Required. + :vartype architecture_types: list[str or + ~azure.mgmt.compute.bulkaction.models.ArchitectureType] + :ivar memory_in_gi_b_per_v_cpu: The range of memory in GiB per vCPU specified from min to max. + Optional parameter. Either Min or Max is required if specified. + :vartype memory_in_gi_b_per_v_cpu: + ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxDouble + :ivar local_storage_support: Specifies whether the VMSize supporting local storage should be + used to launch instances or not. Included - Default if not specified as most Azure VMs support + local storage. Known values are: "Excluded", "Included", and "Required". + :vartype local_storage_support: str or ~azure.mgmt.compute.bulkaction.models.VMAttributeSupport + :ivar local_storage_in_gi_b: LocalStorageSupport should be set to "Included" or "Required" to + use this VMAttribute. If localStorageSupport is "Excluded", this VMAttribute can not be used. + :vartype local_storage_in_gi_b: ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxDouble + :ivar local_storage_disk_types: The local storage disk types specified as a list. + LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. If + localStorageSupport is "Excluded", this VMAttribute can not be used. + :vartype local_storage_disk_types: list[str or + ~azure.mgmt.compute.bulkaction.models.LocalStorageDiskType] + :ivar data_disk_count: The range of data disk count specified from Min to Max. Optional + parameter. Either Min or Max is required if specified. + :vartype data_disk_count: ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxInteger + :ivar network_interface_count: The range of network interface count specified from Min to Max. + Optional parameter. Either Min or Max is required if specified. + :vartype network_interface_count: + ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxInteger + :ivar network_bandwidth_in_mbps: The range of network bandwidth in Mbps specified from Min to + Max. Optional parameter. Either Min or Max is required if specified. + :vartype network_bandwidth_in_mbps: + ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxDouble + :ivar rdma_support: Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) + should be used to build launch instances or not. Known values are: "Excluded", "Included", and + "Required". + :vartype rdma_support: str or ~azure.mgmt.compute.bulkaction.models.VMAttributeSupport + :ivar rdma_network_interface_count: The range of RDMA (Remote Direct Memory Access) network + interface count specified from Min to Max. Optional parameter. Either Min or Max is required if + specified. rdmaSupport should be set to "Included" or "Required" to use this VMAttribute. If + rdmaSupport is "Excluded", this VMAttribute can not be used. + :vartype rdma_network_interface_count: + ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxInteger + :ivar accelerator_support: Specifies whether the VMSize supporting accelerator should be used + to launch instances or not. acceleratorSupport should be set to "Included" or "Required" to use + this VMAttribute. If acceleratorSupport is "Excluded", this VMAttribute can not be used. Known + values are: "Excluded", "Included", and "Required". + :vartype accelerator_support: str or ~azure.mgmt.compute.bulkaction.models.VMAttributeSupport + :ivar accelerator_manufacturers: The accelerator manufacturers specified as a list. + acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. If + acceleratorSupport is "Excluded", this VMAttribute can not be used. + :vartype accelerator_manufacturers: list[str or + ~azure.mgmt.compute.bulkaction.models.AcceleratorManufacturer] + :ivar accelerator_types: The accelerator types specified as a list. acceleratorSupport should + be set to "Included" or "Required" to use this VMAttribute. If acceleratorSupport is + "Excluded", this VMAttribute can not be used. + :vartype accelerator_types: list[str or ~azure.mgmt.compute.bulkaction.models.AcceleratorType] + :ivar accelerator_count: The range of accelerator count specified from min to max. Optional + parameter. Either Min or Max is required if specified. acceleratorSupport should be set to + "Included" or "Required" to use this VMAttribute. If acceleratorSupport is "Excluded", this + VMAttribute can not be used. + :vartype accelerator_count: ~azure.mgmt.compute.bulkaction.models.VMAttributeMinMaxInteger + :ivar vm_categories: The VM category specified as a list. Optional parameter. + :vartype vm_categories: list[str or ~azure.mgmt.compute.bulkaction.models.VMCategory] + :ivar cpu_manufacturers: The VM CPU manufacturers specified as a list. Optional parameter. + :vartype cpu_manufacturers: list[str or ~azure.mgmt.compute.bulkaction.models.CpuManufacturer] + :ivar hyper_v_generations: The hyperV generations specified as a list. Optional parameter. + :vartype hyper_v_generations: list[str or + ~azure.mgmt.compute.bulkaction.models.HyperVGeneration] + :ivar burstable_support: Specifies whether the VMSize supporting burstable capability should be + used to launch instances or not. Known values are: "Excluded", "Included", and "Required". + :vartype burstable_support: str or ~azure.mgmt.compute.bulkaction.models.VMAttributeSupport + :ivar allowed_vm_sizes: Specifies which VMSizes should be allowed while filtering on + VMAttributes. Cannot be specified together with excludedVMSizes. Maximum of 10 VM sizes + allowed. Optional parameter. + :vartype allowed_vm_sizes: list[str] + :ivar excluded_vm_sizes: Specifies which VMSizes should be excluded while filtering on + VMAttributes. Cannot be specified together with allowedVMSizes. Maximum of 10 VM sizes allowed. + Optional parameter. + :vartype excluded_vm_sizes: list[str] + """ + + v_cpu_count: "_models.VMAttributeMinMaxInteger" = rest_field( + name="vCpuCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are + specified, either Min or Max is required if specified. Required.""" + memory_in_gi_b: "_models.VMAttributeMinMaxDouble" = rest_field( + name="memoryInGiB", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, + either Min or Max is required if specified. Required.""" + architecture_types: list[Union[str, "_models.ArchitectureType"]] = rest_field( + name="architectureTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The VM architecture types specified as a list. Must be specified if VMAttributes are specified. + Must be compatible with image used. Required.""" + memory_in_gi_b_per_v_cpu: Optional["_models.VMAttributeMinMaxDouble"] = rest_field( + name="memoryInGiBPerVCpu", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min + or Max is required if specified.""" + local_storage_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="localStorageSupport", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the VMSize supporting local storage should be used to launch instances or + not. Included - Default if not specified as most Azure VMs support local storage. Known values + are: \"Excluded\", \"Included\", and \"Required\".""" + local_storage_in_gi_b: Optional["_models.VMAttributeMinMaxDouble"] = rest_field( + name="localStorageInGiB", visibility=["read", "create", "update", "delete", "query"] + ) + """LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If + localStorageSupport is \"Excluded\", this VMAttribute can not be used.""" + local_storage_disk_types: Optional[list[Union[str, "_models.LocalStorageDiskType"]]] = rest_field( + name="localStorageDiskTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The local storage disk types specified as a list. LocalStorageSupport should be set to + \"Included\" or \"Required\" to use this VMAttribute. If localStorageSupport is \"Excluded\", + this VMAttribute can not be used.""" + data_disk_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( + name="dataDiskCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max + is required if specified.""" + network_interface_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( + name="networkInterfaceCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of network interface count specified from Min to Max. Optional parameter. Either Min + or Max is required if specified.""" + network_bandwidth_in_mbps: Optional["_models.VMAttributeMinMaxDouble"] = rest_field( + name="networkBandwidthInMbps", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either + Min or Max is required if specified.""" + rdma_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="rdmaSupport", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to + build launch instances or not. Known values are: \"Excluded\", \"Included\", and \"Required\".""" + rdma_network_interface_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( + name="rdmaNetworkInterfaceCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to + Max. Optional parameter. Either Min or Max is required if specified. rdmaSupport should be set + to \"Included\" or \"Required\" to use this VMAttribute. If rdmaSupport is \"Excluded\", this + VMAttribute can not be used.""" + accelerator_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="acceleratorSupport", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the VMSize supporting accelerator should be used to launch instances or not. + acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If + acceleratorSupport is \"Excluded\", this VMAttribute can not be used. Known values are: + \"Excluded\", \"Included\", and \"Required\".""" + accelerator_manufacturers: Optional[list[Union[str, "_models.AcceleratorManufacturer"]]] = rest_field( + name="acceleratorManufacturers", visibility=["read", "create", "update", "delete", "query"] + ) + """The accelerator manufacturers specified as a list. acceleratorSupport should be set to + \"Included\" or \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", + this VMAttribute can not be used.""" + accelerator_types: Optional[list[Union[str, "_models.AcceleratorType"]]] = rest_field( + name="acceleratorTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The accelerator types specified as a list. acceleratorSupport should be set to \"Included\" or + \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute + can not be used.""" + accelerator_count: Optional["_models.VMAttributeMinMaxInteger"] = rest_field( + name="acceleratorCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The range of accelerator count specified from min to max. Optional parameter. Either Min or Max + is required if specified. acceleratorSupport should be set to \"Included\" or \"Required\" to + use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute can not be used.""" + vm_categories: Optional[list[Union[str, "_models.VMCategory"]]] = rest_field( + name="vmCategories", visibility=["read", "create", "update", "delete", "query"] + ) + """The VM category specified as a list. Optional parameter.""" + cpu_manufacturers: Optional[list[Union[str, "_models.CpuManufacturer"]]] = rest_field( + name="cpuManufacturers", visibility=["read", "create", "update", "delete", "query"] + ) + """The VM CPU manufacturers specified as a list. Optional parameter.""" + hyper_v_generations: Optional[list[Union[str, "_models.HyperVGeneration"]]] = rest_field( + name="hyperVGenerations", visibility=["read", "create", "update", "delete", "query"] + ) + """The hyperV generations specified as a list. Optional parameter.""" + burstable_support: Optional[Union[str, "_models.VMAttributeSupport"]] = rest_field( + name="burstableSupport", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the VMSize supporting burstable capability should be used to launch instances + or not. Known values are: \"Excluded\", \"Included\", and \"Required\".""" + allowed_vm_sizes: Optional[list[str]] = rest_field( + name="allowedVMSizes", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies which VMSizes should be allowed while filtering on VMAttributes. Cannot be specified + together with excludedVMSizes. Maximum of 10 VM sizes allowed. Optional parameter.""" + excluded_vm_sizes: Optional[list[str]] = rest_field( + name="excludedVMSizes", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies which VMSizes should be excluded while filtering on VMAttributes. Cannot be specified + together with allowedVMSizes. Maximum of 10 VM sizes allowed. Optional parameter.""" + + @overload + def __init__( + self, + *, + v_cpu_count: "_models.VMAttributeMinMaxInteger", + memory_in_gi_b: "_models.VMAttributeMinMaxDouble", + architecture_types: list[Union[str, "_models.ArchitectureType"]], + memory_in_gi_b_per_v_cpu: Optional["_models.VMAttributeMinMaxDouble"] = None, + local_storage_support: Optional[Union[str, "_models.VMAttributeSupport"]] = None, + local_storage_in_gi_b: Optional["_models.VMAttributeMinMaxDouble"] = None, + local_storage_disk_types: Optional[list[Union[str, "_models.LocalStorageDiskType"]]] = None, + data_disk_count: Optional["_models.VMAttributeMinMaxInteger"] = None, + network_interface_count: Optional["_models.VMAttributeMinMaxInteger"] = None, + network_bandwidth_in_mbps: Optional["_models.VMAttributeMinMaxDouble"] = None, + rdma_support: Optional[Union[str, "_models.VMAttributeSupport"]] = None, + rdma_network_interface_count: Optional["_models.VMAttributeMinMaxInteger"] = None, + accelerator_support: Optional[Union[str, "_models.VMAttributeSupport"]] = None, + accelerator_manufacturers: Optional[list[Union[str, "_models.AcceleratorManufacturer"]]] = None, + accelerator_types: Optional[list[Union[str, "_models.AcceleratorType"]]] = None, + accelerator_count: Optional["_models.VMAttributeMinMaxInteger"] = None, + vm_categories: Optional[list[Union[str, "_models.VMCategory"]]] = None, + cpu_manufacturers: Optional[list[Union[str, "_models.CpuManufacturer"]]] = None, + hyper_v_generations: Optional[list[Union[str, "_models.HyperVGeneration"]]] = None, + burstable_support: Optional[Union[str, "_models.VMAttributeSupport"]] = None, + allowed_vm_sizes: Optional[list[str]] = None, + excluded_vm_sizes: 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 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.compute.bulkaction.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.compute.bulkaction.models.DiskEncryptionSetParametersContent + """ + + security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = rest_field( + name="securityEncryptionType", visibility=["read", "create", "update", "delete", "query"] + ) + """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.DiskEncryptionSetParametersContent"] = 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, + *, + security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = None, + disk_encryption_set: Optional["_models.DiskEncryptionSetParametersContent"] = 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 VMGalleryApplication(_Model): + """Specifies the required information to reference a compute gallery application version. + + :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 + """ + + 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"] + ) + """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, + *, + 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 + 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 VmSizeProfile(_Model): + """A VM size profile with a name and rank for flex VM creation. + + :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. Required. + :vartype rank: int + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the VM size, eg Standard_D2ads_v5. Required.""" + rank: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The rank of this VM size in the priority order. Required.""" + + @overload + def __init__( + self, + *, + name: str, + rank: int, + ) -> 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 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 + """ + + v_cpus_available: Optional[int] = rest_field( + name="vCpusAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + v_cpus_available: Optional[int] = None, + v_cpus_per_core: Optional[int] = 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 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.compute.bulkaction.models.AdditionalUnattendContent] + :ivar patch_settings: [Preview Feature] Specifies settings related to VM Guest Patching on + Windows. + :vartype patch_settings: ~azure.mgmt.compute.bulkaction.models.PatchSettings + :ivar win_rm: Specifies the Windows Remote Management listeners. This enables remote Windows + PowerShell. + :vartype win_rm: ~azure.mgmt.compute.bulkaction.models.WinRMConfiguration + """ + + 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, 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"] + ) + """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"] + ) + """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"] + ) + """[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"] + ) + """Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.""" + + @overload + def __init__( + self, + *, + 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 + 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 WindowsVMGuestPatchAutomaticByPlatformSettings(_Model): # pylint: disable=name-too-long + """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in + Windows 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.compute.bulkaction.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 + """ + + reboot_setting: Optional[Union[str, "_models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = 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.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = 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 WinRMConfiguration(_Model): + """Describes Windows Remote Management configuration of the VM. + + :ivar listeners: The list of Windows Remote Management listeners. + :vartype listeners: list[~azure.mgmt.compute.bulkaction.models.WinRMListener] + """ + + listeners: Optional[list["_models.WinRMListener"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Windows Remote Management listeners.""" + + @overload + def __init__( + self, + *, + listeners: Optional[list["_models.WinRMListener"]] = 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 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.compute.bulkaction.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 + """ + + protocol: Optional[Union[str, "_models.ProtocolTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """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, + *, + protocol: Optional[Union[str, "_models.ProtocolTypes"]] = None, + certificate_url: 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 ZoneAllocationPolicy(_Model): + """The zone allocation policy for distributing VMs across availability zones. + + :ivar distribution_strategy: The distribution strategy for zone allocation. Known values are: + "BestEffortSingleZone", "Prioritized", "BestEffortBalanced", and "StrictBalanced". + :vartype distribution_strategy: str or + ~azure.mgmt.compute.bulkaction.models.DistributionStrategy + :ivar zone_preferences: The zone preferences for allocation priority. + :vartype zone_preferences: list[~azure.mgmt.compute.bulkaction.models.ZonePreference] + """ + + distribution_strategy: Optional[Union[str, "_models.DistributionStrategy"]] = rest_field( + name="distributionStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """The distribution strategy for zone allocation. 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, + *, + distribution_strategy: Optional[Union[str, "_models.DistributionStrategy"]] = None, + zone_preferences: Optional[list["_models.ZonePreference"]] = 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 ZonePreference(_Model): + """A zone preference with a zone identifier and rank. + + :ivar zone: The zone identifier. Required. + :vartype zone: str + :ivar rank: The rank of this zone in the priority order. Required. + :vartype rank: int + """ + + zone: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The zone identifier. Required.""" + rank: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The rank of this zone in the priority order. Required.""" + + @overload + def __init__( + self, + *, + zone: str, + rank: int, + ) -> 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) diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/__init__.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/__init__.py index 452ba05d4218..870bc4fc237b 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/__init__.py @@ -14,6 +14,13 @@ from ._operations import Operations # type: ignore from ._operations import VirtualMachineBulkOperationsOperations # type: ignore +from ._operations import LaunchBulkInstancesOperationOperations # type: ignore +from ._operations import BulkCreateCustomOperations # type: ignore +from ._operations import ScheduledActionsOperations # type: ignore +from ._operations import ScheduledActionExtensionOperations # type: ignore +from ._operations import ScheduledActionOperationStatusOperations # type: ignore +from ._operations import OccurrencesOperations # type: ignore +from ._operations import OccurrenceExtensionOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -22,6 +29,13 @@ __all__ = [ "Operations", "VirtualMachineBulkOperationsOperations", + "LaunchBulkInstancesOperationOperations", + "BulkCreateCustomOperations", + "ScheduledActionsOperations", + "ScheduledActionExtensionOperations", + "ScheduledActionOperationStatusOperations", + "OccurrencesOperations", + "OccurrenceExtensionOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/_operations.py index bb04f9b4a7d1..df27d18a0c30 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/_operations.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/operations/_operations.py @@ -9,7 +9,7 @@ from collections.abc import MutableMapping from io import IOBase import json -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import PipelineClient @@ -25,15 +25,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models, types as _types from .._configuration import ComputeBulkActionsMgmtClientConfiguration from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer +from .._validation import api_version_validation T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] @@ -47,7 +50,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", "2026-06-06")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,7 +72,7 @@ def build_virtual_machine_bulk_operations_bulk_deallocate_operation_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", "2026-06-06")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,7 +103,7 @@ def build_virtual_machine_bulk_operations_bulk_hibernate_operation_request( # p _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-06-06")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -131,7 +134,7 @@ def build_virtual_machine_bulk_operations_bulk_start_operation_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", "2026-06-06")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -155,6 +158,68 @@ def build_virtual_machine_bulk_operations_bulk_start_operation_request( # pylin return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_virtual_machine_bulk_operations_bulk_create_operation_request( # pylint: disable=name-too-long + resource_group_name: str, location: 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCreate" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "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_virtual_machine_bulk_operations_bulk_vdi_flex_create_operation_request( # pylint: disable=name-too-long + resource_group_name: str, location: 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkVdiFlexCreate" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "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_virtual_machine_bulk_operations_bulk_delete_operation_request( # pylint: disable=name-too-long resource_group_name: str, location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -162,7 +227,7 @@ def build_virtual_machine_bulk_operations_bulk_delete_operation_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", "2026-06-06")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -193,7 +258,7 @@ def build_virtual_machine_bulk_operations_bulk_get_operations_status_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", "2026-06-06")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -224,7 +289,7 @@ def build_virtual_machine_bulk_operations_bulk_cancel_operations_request( # pyl _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-06-06")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -248,249 +313,7725 @@ def build_virtual_machine_bulk_operations_bulk_cancel_operations_request( # pyl return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class Operations: - """ - .. warning:: - **DO NOT** instantiate this class directly. +def build_virtual_machine_bulk_operations_bulk_reimage_operation_request( # pylint: disable=name-too-long + resource_group_name: str, location: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - Instead, you should access the following operations through - :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s - :attr:`operations` attribute. - """ + 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ComputeBulkActionsMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkReimage" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: - """List the operations for the provider. + _url: str = _url.format(**path_format_arguments) # type: ignore - :return: An iterator like instance of Operation - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.Operation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + # 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") - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - def prepare_request(next_link=None): - if not next_link: - _request = build_operations_list_request( - api_version=self._config.api_version, - 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) +def build_virtual_machine_bulk_operations_bulk_list_operation_errors_request( # pylint: disable=name-too-long + resource_group_name: str, + location: str, + subscription_id: str, + *, + lookback_in_minutes: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_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) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") - return _request + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/listBulkOperationErrors" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - 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) + _url: str = _url.format(**path_format_arguments) # type: ignore - def get_next(next_link=None): - _request = prepare_request(next_link) + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if lookback_in_minutes is not None: + _params["lookbackInMinutes"] = _SERIALIZER.query("lookback_in_minutes", lookback_in_minutes, "int") - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "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, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - return pipeline_response - return ItemPaged(get_next, extract_data) +def build_virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_request( # pylint: disable=name-too-long + resource_group_name: str, location: 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") -class VirtualMachineBulkOperationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/acknowledgeBulkOperationErrors" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } - Instead, you should access the following operations through - :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s - :attr:`virtual_machine_bulk_operations` attribute. - """ + _url: str = _url.format(**path_format_arguments) # type: ignore - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ComputeBulkActionsMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - @overload - def bulk_deallocate_operation( - self, - resource_group_name: str, - location: str, - request_body: _models.ExecuteDeallocateContent, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DeallocateResourceOperationResponse: - """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + # 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") - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeallocateContent - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - @overload - def bulk_deallocate_operation( - self, - resource_group_name: str, - location: str, - request_body: _types.ExecuteDeallocateContent, - *, + +def build_launch_bulk_instances_operation_get_request( # pylint: disable=name-too-long + resource_group_name: str, location: str, 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_launch_bulk_instances_operation_get_operation_status_request( # pylint: disable=name-too-long + location: str, async_operation_id: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations/asyncOperations/{asyncOperationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "asyncOperationId": _SERIALIZER.url("async_operation_id", async_operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_launch_bulk_instances_operation_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, location: str, name: 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "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="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_launch_bulk_instances_operation_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + location: str, + name: str, + subscription_id: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if delete_instances is not None: + _params["deleteInstances"] = _SERIALIZER.query("delete_instances", delete_instances, "bool") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_launch_bulk_instances_operation_cancel_request( # pylint: disable=name-too-long + resource_group_name: str, location: str, name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations/{name}/cancel" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_launch_bulk_instances_operation_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, location: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_launch_bulk_instances_operation_list_by_subscription_request( # pylint: disable=name-too-long + location: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = ( + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_launch_bulk_instances_operation_list_virtual_machines_request( # pylint: disable=name-too-long + resource_group_name: str, + location: str, + name: str, + subscription_id: str, + *, + filter: Optional[str] = None, + skiptoken: Optional[str] = None, + **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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/launchBulkInstancesOperations/{name}/virtualMachines" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + if skiptoken is not None: + _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_bulk_create_custom_get_request( + resource_group_name: str, location: str, 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/bulkCreateCustom/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_bulk_create_custom_get_async_operation_status_request( # pylint: disable=name-too-long + location: str, async_operation_id: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/bulkCreateCustom/asyncOperations/{asyncOperationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "asyncOperationId": _SERIALIZER.url("async_operation_id", async_operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_bulk_create_custom_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, location: str, name: 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/bulkCreateCustom/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "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="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_bulk_create_custom_delete_request( + resource_group_name: str, + location: str, + name: str, + subscription_id: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/bulkCreateCustom/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if delete_instances is not None: + _params["deleteInstances"] = _SERIALIZER.query("delete_instances", delete_instances, "bool") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_bulk_create_custom_cancel_request( + resource_group_name: str, location: str, name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/bulkCreateCustom/{name}/cancel" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_bulk_create_custom_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, location: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/bulkCreateCustom" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_bulk_create_custom_list_by_subscription_request( # pylint: disable=name-too-long + location: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/bulkCreateCustom" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_get_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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_create_or_update_request( # pylint: disable=name-too-long + 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 {}) + + 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "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="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_update_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 {}) + + 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_delete_request( + resource_group_name: str, scheduled_action_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_scheduled_actions_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_list_by_subscription_request( # pylint: disable=name-too-long + 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/scheduledActions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_list_resources_request( # pylint: disable=name-too-long + 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/resources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_actions_attach_resources_request( # pylint: disable=name-too-long + 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 {}) + + 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/attachResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "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_detach_resources_request( # pylint: disable=name-too-long + 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 {}) + + 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/detachResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "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_patch_resources_request( # pylint: disable=name-too-long + 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 {}) + + 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/patchResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "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_disable_request( + resource_group_name: str, scheduled_action_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/disable" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + 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: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-07-06-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/enable" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_scheduled_actions_cancel_next_occurrence_request( # pylint: disable=name-too-long + 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 {}) + + 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/cancelNextOccurrence" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "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_trigger_manual_occurrence_request( # pylint: disable=name-too-long + 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/triggerManualOccurrence" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # 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) + + +def build_scheduled_action_extension_list_by_vms_request( # pylint: disable=name-too-long + resource_uri: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{resourceUri}/providers/Microsoft.Compute/associatedScheduledActions" + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scheduled_action_operation_status_get_request( # pylint: disable=name-too-long + location: str, operation_id: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/scheduledActionsOperationStatuses/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_occurrences_get_request( + resource_group_name: str, scheduled_action_name: str, occurrence_id: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + "occurrenceId": _SERIALIZER.url("occurrence_id", occurrence_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_occurrences_list_by_scheduled_action_request( # pylint: disable=name-too-long + 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/occurrences" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_occurrences_list_resources_request( + resource_group_name: str, scheduled_action_name: str, occurrence_id: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/resources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + "occurrenceId": _SERIALIZER.url("occurrence_id", occurrence_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_occurrences_cancel_request( + resource_group_name: str, scheduled_action_name: str, occurrence_id: 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/cancel" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + "occurrenceId": _SERIALIZER.url("occurrence_id", occurrence_id, "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_occurrences_delay_request( + resource_group_name: str, scheduled_action_name: str, occurrence_id: 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-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/scheduledActions/{scheduledActionName}/occurrences/{occurrenceId}/delay" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "scheduledActionName": _SERIALIZER.url("scheduled_action_name", scheduled_action_name, "str"), + "occurrenceId": _SERIALIZER.url("occurrence_id", occurrence_id, "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_occurrence_extension_list_occurrence_by_vms_request( # pylint: disable=name-too-long + resource_uri: 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", "2026-07-06-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/{resourceUri}/providers/Microsoft.Compute/associatedOccurrences" + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, "str", skip_quote=True), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """List the operations for the provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class VirtualMachineBulkOperationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`virtual_machine_bulk_operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def bulk_deallocate_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteDeallocateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DeallocateResourceOperationResponse: + """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeallocateContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_deallocate_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteDeallocateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DeallocateResourceOperationResponse: + """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteDeallocateContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_deallocate_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DeallocateResourceOperationResponse: + """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def bulk_deallocate_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteDeallocateContent, _types.ExecuteDeallocateContent, IO[bytes]], + **kwargs: Any + ) -> _models.DeallocateResourceOperationResponse: + """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteDeallocateContent type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeallocateContent or + ~azure.mgmt.compute.bulkaction.types.ExecuteDeallocateContent or IO[bytes] + :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse + :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.DeallocateResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_deallocate_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.DeallocateResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_hibernate_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteHibernateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.HibernateResourceOperationResponse: + """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteHibernateContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_hibernate_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteHibernateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.HibernateResourceOperationResponse: + """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteHibernateContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_hibernate_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.HibernateResourceOperationResponse: + """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def bulk_hibernate_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteHibernateContent, _types.ExecuteHibernateContent, IO[bytes]], + **kwargs: Any + ) -> _models.HibernateResourceOperationResponse: + """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteHibernateContent type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteHibernateContent or + ~azure.mgmt.compute.bulkaction.types.ExecuteHibernateContent or IO[bytes] + :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse + :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.HibernateResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_hibernate_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.HibernateResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_start_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteStartContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.StartResourceOperationResponse: + """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered + as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteStartContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_start_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteStartContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.StartResourceOperationResponse: + """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered + as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteStartContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_start_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.StartResourceOperationResponse: + """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered + as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def bulk_start_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteStartContent, _types.ExecuteStartContent, IO[bytes]], + **kwargs: Any + ) -> _models.StartResourceOperationResponse: + """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered + as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteStartContent type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteStartContent or + ~azure.mgmt.compute.bulkaction.types.ExecuteStartContent or IO[bytes] + :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse + :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.StartResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_start_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.StartResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteCreateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteCreateContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteCreateContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteCreateContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def bulk_create_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteCreateContent, _types.ExecuteCreateContent, IO[bytes]], + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkCreate: Execute create operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteCreateContent type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteCreateContent or + ~azure.mgmt.compute.bulkaction.types.ExecuteCreateContent or IO[bytes] + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :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.CreateResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_create_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.CreateResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteVdiCreateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteVdiCreateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteVdiCreateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteVdiCreateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def bulk_vdi_flex_create_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteVdiCreateRequest, _types.ExecuteVdiCreateRequest, IO[bytes]], + **kwargs: Any + ) -> _models.CreateResourceOperationResponse: + """BulkVdiFlexCreate: Bulk create operation for a batch of virtual machines, this operation + supports flex properties to give options on Sku and zone selection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteVdiCreateRequest type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteVdiCreateRequest or + ~azure.mgmt.compute.bulkaction.types.ExecuteVdiCreateRequest or IO[bytes] + :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CreateResourceOperationResponse + :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.CreateResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_vdi_flex_create_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.CreateResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_delete_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteDeleteContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_delete_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteDeleteContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_delete_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def bulk_delete_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteDeleteContent, _types.ExecuteDeleteContent, IO[bytes]], + **kwargs: Any + ) -> _models.DeleteResourceOperationResponse: + """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteDeleteContent type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent or + ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent or IO[bytes] + :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :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.DeleteResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_delete_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.DeleteResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: _models.GetOperationStatusContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: _types.GetOperationStatusContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def bulk_get_operations_status( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.GetOperationStatusContent, _types.GetOperationStatusContent, IO[bytes]], + **kwargs: Any + ) -> _models.GetOperationStatusResponse: + """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual + machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a GetOperationStatusContent type or a + IO[bytes] type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent or + ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent or IO[bytes] + :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :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.GetOperationStatusResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_get_operations_status_request( + resource_group_name=resource_group_name, + location=location, + 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.GetOperationStatusResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: _models.CancelOperationsContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: _types.CancelOperationsContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def bulk_cancel_operations( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.CancelOperationsContent, _types.CancelOperationsContent, IO[bytes]], + **kwargs: Any + ) -> _models.CancelOperationsResponse: + """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a CancelOperationsContent type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent or + ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent or IO[bytes] + :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :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.CancelOperationsResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_cancel_operations_request( + resource_group_name=resource_group_name, + location=location, + 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.CancelOperationsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: _models.ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteReimageRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: _types.ExecuteReimageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteReimageRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Required. + :type request_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: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def bulk_reimage_operation( + self, + resource_group_name: str, + location: str, + request_body: Union[_models.ExecuteReimageRequest, _types.ExecuteReimageRequest, IO[bytes]], + **kwargs: Any + ) -> _models.ReimageResourceOperationResponse: + """BulkReimage: Execute reimage operation for a batch of virtual machines, this operation is + triggered as soon as Computeschedule receives it. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param request_body: The request body. Is either a ExecuteReimageRequest type or a IO[bytes] + type. Required. + :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteReimageRequest or + ~azure.mgmt.compute.bulkaction.types.ExecuteReimageRequest or IO[bytes] + :return: ReimageResourceOperationResponse. The ReimageResourceOperationResponse is compatible + with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ReimageResourceOperationResponse + :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.ReimageResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_body, (IOBase, bytes)): + _content = request_body + else: + _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_virtual_machine_bulk_operations_bulk_reimage_operation_request( + resource_group_name=resource_group_name, + location=location, + 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.ReimageResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "lookback_in_minutes", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def bulk_list_operation_errors( + self, resource_group_name: str, location: str, *, lookback_in_minutes: Optional[int] = None, **kwargs: Any + ) -> ItemPaged["_models.ResourceOperation"]: + """BulkListOperationErrors: List bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :keyword lookback_in_minutes: The number of minutes to look back for errors. Default value is + None. + :paramtype lookback_in_minutes: int + :return: An iterator like instance of ResourceOperation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.ResourceOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_virtual_machine_bulk_operations_bulk_list_operation_errors_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + lookback_in_minutes=lookback_in_minutes, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: _models.AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: _types.AcknowledgeBulkOperationErrorsRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.AcknowledgeBulkOperationErrorsRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. 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: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def bulk_acknowledge_operation_errors( + self, + resource_group_name: str, + location: str, + body: Union[ + _models.AcknowledgeBulkOperationErrorsRequest, _types.AcknowledgeBulkOperationErrorsRequest, IO[bytes] + ], + **kwargs: Any + ) -> _models.AcknowledgeBulkOperationErrorsResponse: + """BulkAcknowledgeOperationErrors: Acknowledge bulk operation errors for a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param body: The list of operation ids to acknowledge. Is either a + AcknowledgeBulkOperationErrorsRequest type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsRequest or + ~azure.mgmt.compute.bulkaction.types.AcknowledgeBulkOperationErrorsRequest or IO[bytes] + :return: AcknowledgeBulkOperationErrorsResponse. The AcknowledgeBulkOperationErrorsResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.AcknowledgeBulkOperationErrorsResponse + :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.AcknowledgeBulkOperationErrorsResponse] = 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_virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_request( + resource_group_name=resource_group_name, + location=location, + 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.AcknowledgeBulkOperationErrorsResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class LaunchBulkInstancesOperationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`launch_bulk_instances_operation` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def get( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> _models.LocationBasedLaunchBulkInstancesOperation: + """Gets an instance of LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :return: LocationBasedLaunchBulkInstancesOperation. The + LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LocationBasedLaunchBulkInstancesOperation] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_get_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.LocationBasedLaunchBulkInstancesOperation, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "location", "async_operation_id", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def get_operation_status( + self, location: str, async_operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of a LaunchBulkInstancesOperation. + + :param location: The location name. Required. + :type location: str + :param async_operation_id: The async operation id. Required. + :type async_operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.OperationStatusResult + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_get_operation_status_request( + location=location, + async_operation_id=async_operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _create_or_update_initial( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[ + _models.LocationBasedLaunchBulkInstancesOperation, + _types.LocationBasedLaunchBulkInstancesOperation, + IO[bytes], + ], + **kwargs: Any + ) -> Iterator[bytes]: + 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[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource, (IOBase, bytes)): + _content = resource + else: + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_launch_bulk_instances_operation_create_or_update_request( + resource_group_name=resource_group_name, + location=location, + name=name, + 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 = True + 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, 201]: + 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) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _models.LocationBasedLaunchBulkInstancesOperation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns LocationBasedLaunchBulkInstancesOperation. The + LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _types.LocationBasedLaunchBulkInstancesOperation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.types.LocationBasedLaunchBulkInstancesOperation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns LocationBasedLaunchBulkInstancesOperation. The + LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: 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: An instance of LROPoller that returns LocationBasedLaunchBulkInstancesOperation. The + LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[ + _models.LocationBasedLaunchBulkInstancesOperation, + _types.LocationBasedLaunchBulkInstancesOperation, + IO[bytes], + ], + **kwargs: Any + ) -> LROPoller[_models.LocationBasedLaunchBulkInstancesOperation]: + """Creates or updates LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :param resource: Resource create parameters. Is either a + LocationBasedLaunchBulkInstancesOperation type or a IO[bytes] type. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation + or ~azure.mgmt.compute.bulkaction.types.LocationBasedLaunchBulkInstancesOperation or IO[bytes] + :return: An instance of LROPoller that returns LocationBasedLaunchBulkInstancesOperation. The + LocationBasedLaunchBulkInstancesOperation is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.LocationBasedLaunchBulkInstancesOperation] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + resource=resource, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.LocationBasedLaunchBulkInstancesOperation, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.LocationBasedLaunchBulkInstancesOperation].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.LocationBasedLaunchBulkInstancesOperation]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _delete_initial( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_delete_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + delete_instances=delete_instances, + api_version=self._config.api_version, + 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 = True + 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 [202, 204]: + 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) + + response_headers = {} + if response.status_code == 202: + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_delete( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes LaunchBulkInstancesOperations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :keyword delete_instances: When true, deletes all virtual machines created by this BulkAction + Operation. Default value is None. + :paramtype delete_instances: bool + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + delete_instances=delete_instances, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _cancel_initial(self, resource_group_name: str, location: str, name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_launch_bulk_instances_operation_cancel_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_cancel(self, resource_group_name: str, location: str, name: str, **kwargs: Any) -> LROPoller[None]: + """Cancels LaunchBulkInstancesOperation instances that have not yet launched. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_resource_group( + self, resource_group_name: str, location: str, **kwargs: Any + ) -> ItemPaged["_models.LocationBasedLaunchBulkInstancesOperation"]: + """List LaunchBulkInstancesOperation resources by resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedLaunchBulkInstancesOperation + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedLaunchBulkInstancesOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_launch_bulk_instances_operation_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedLaunchBulkInstancesOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "location", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_subscription( + self, location: str, **kwargs: Any + ) -> ItemPaged["_models.LocationBasedLaunchBulkInstancesOperation"]: + """List LaunchBulkInstancesOperation resources by subscriptionId. + + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedLaunchBulkInstancesOperation + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedLaunchBulkInstancesOperation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedLaunchBulkInstancesOperation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_launch_bulk_instances_operation_list_by_subscription_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedLaunchBulkInstancesOperation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "filter", + "skiptoken", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_virtual_machines( + self, + resource_group_name: str, + location: str, + name: str, + *, + filter: Optional[str] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.VirtualMachine"]: + """List VirtualMachine resources of a LaunchBulkInstancesOperation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the LaunchBulkInstancesOperation. Required. + :type name: str + :keyword filter: Filter expression to filter the virtual machines. Default value is None. + :paramtype filter: str + :keyword skiptoken: Skip token for pagination. Uses the token from a previous response to fetch + the next page of results. Default value is None. + :paramtype skiptoken: str + :return: An iterator like instance of VirtualMachine + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.VirtualMachine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.VirtualMachine]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_launch_bulk_instances_operation_list_virtual_machines_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + filter=filter, + skiptoken=skiptoken, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.VirtualMachine], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class BulkCreateCustomOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`bulk_create_custom` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def get( + self, resource_group_name: str, location: str, name: str, **kwargs: Any + ) -> _models.LocationBasedBulkCreateCustom: + """Gets an instance of BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :return: LocationBasedBulkCreateCustom. The LocationBasedBulkCreateCustom is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LocationBasedBulkCreateCustom] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_get_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.LocationBasedBulkCreateCustom, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "location", "async_operation_id", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def get_async_operation_status( + self, location: str, async_operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of an async operation of a BulkCreateCustom. + + :param location: The location name. Required. + :type location: str + :param async_operation_id: The async operation id. Required. + :type async_operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.OperationStatusResult + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_get_async_operation_status_request( + location=location, + async_operation_id=async_operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _create_or_update_initial( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[_models.LocationBasedBulkCreateCustom, _types.LocationBasedBulkCreateCustom, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + 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[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource, (IOBase, bytes)): + _content = resource + else: + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_bulk_create_custom_create_or_update_request( + resource_group_name=resource_group_name, + location=location, + name=name, + 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 = True + 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, 201]: + 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) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _models.LocationBasedBulkCreateCustom, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: _types.LocationBasedBulkCreateCustom, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.types.LocationBasedBulkCreateCustom + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Required. + :type resource: 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: An instance of LROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_create_or_update( + self, + resource_group_name: str, + location: str, + name: str, + resource: Union[_models.LocationBasedBulkCreateCustom, _types.LocationBasedBulkCreateCustom, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.LocationBasedBulkCreateCustom]: + """Creates or updates BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :param resource: Resource create parameters. Is either a LocationBasedBulkCreateCustom type or + a IO[bytes] type. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom or + ~azure.mgmt.compute.bulkaction.types.LocationBasedBulkCreateCustom or IO[bytes] + :return: An instance of LROPoller that returns LocationBasedBulkCreateCustom. The + LocationBasedBulkCreateCustom is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.LocationBasedBulkCreateCustom] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + resource=resource, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.LocationBasedBulkCreateCustom, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.LocationBasedBulkCreateCustom].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.LocationBasedBulkCreateCustom]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _delete_initial( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_delete_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + delete_instances=delete_instances, + api_version=self._config.api_version, + 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 = True + 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 [202, 204]: + 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) + + response_headers = {} + if response.status_code == 202: + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "location", + "name", + "delete_instances", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_delete( + self, + resource_group_name: str, + location: str, + name: str, + *, + delete_instances: Optional[bool] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes BulkCreateCustoms. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :keyword delete_instances: When true, deletes all virtual machines created by this BulkAction + Operation. Default value is None. + :paramtype delete_instances: bool + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + delete_instances=delete_instances, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _cancel_initial(self, resource_group_name: str, location: str, name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_bulk_create_custom_cancel_request( + resource_group_name=resource_group_name, + location=location, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_cancel(self, resource_group_name: str, location: str, name: str, **kwargs: Any) -> LROPoller[None]: + """Cancels BulkCreateCustom instances that have not yet launched. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :param name: The name of the BulkCreateCustom. The value must be an UUID. Required. + :type name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + location=location, + name=name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "location", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_resource_group( + self, resource_group_name: str, location: str, **kwargs: Any + ) -> ItemPaged["_models.LocationBasedBulkCreateCustom"]: + """List BulkCreateCustom resources by resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedBulkCreateCustom + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedBulkCreateCustom]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_bulk_create_custom_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedBulkCreateCustom], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "location", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_subscription(self, location: str, **kwargs: Any) -> ItemPaged["_models.LocationBasedBulkCreateCustom"]: + """List BulkCreateCustom resources by subscriptionId. + + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of LocationBasedBulkCreateCustom + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.LocationBasedBulkCreateCustom] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LocationBasedBulkCreateCustom]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_bulk_create_custom_list_by_subscription_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LocationBasedBulkCreateCustom], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ScheduledActionsOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`scheduled_actions` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def get(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> _models.ScheduledAction: + """Get a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: ScheduledAction. The ScheduledAction is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ScheduledAction + :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 = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScheduledAction] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_get_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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.ScheduledAction, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _create_or_update_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: Union[_models.ScheduledAction, _types.ScheduledAction, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + 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[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource, (IOBase, bytes)): + _content = resource + else: + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_create_or_update_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 201]: + 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) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: _models.ScheduledAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: _types.ScheduledAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Required. + :type resource: ~azure.mgmt.compute.bulkaction.types.ScheduledAction + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Required. + :type resource: 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: An instance of LROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_create_or_update( + self, + resource_group_name: str, + scheduled_action_name: str, + resource: Union[_models.ScheduledAction, _types.ScheduledAction, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ScheduledAction]: + """Create a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param resource: Resource create parameters. Is either a ScheduledAction type or a IO[bytes] + type. Required. + :type resource: ~azure.mgmt.compute.bulkaction.models.ScheduledAction or + ~azure.mgmt.compute.bulkaction.types.ScheduledAction or IO[bytes] + :return: An instance of LROPoller that returns ScheduledAction. The ScheduledAction is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ScheduledAction] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + resource=resource, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ScheduledAction, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ScheduledAction].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ScheduledAction]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _update_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: Union[_models.ScheduledActionUpdate, _types.ScheduledActionUpdate, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + 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[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_update_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: _models.ScheduledActionUpdate, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Required. + :type properties: ~azure.mgmt.compute.bulkaction.models.ScheduledActionUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: _types.ScheduledActionUpdate, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Required. + :type properties: ~azure.mgmt.compute.bulkaction.types.ScheduledActionUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Required. + :type properties: 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: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_update( + self, + resource_group_name: str, + scheduled_action_name: str, + properties: Union[_models.ScheduledActionUpdate, _types.ScheduledActionUpdate, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Update a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param properties: The resource properties to be updated. Is either a ScheduledActionUpdate + type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.compute.bulkaction.models.ScheduledActionUpdate or + ~azure.mgmt.compute.bulkaction.types.ScheduledActionUpdate or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + properties=properties, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _delete_initial(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_delete_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202, 204]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_delete(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> LROPoller[None]: + """Delete a ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ScheduledAction"]: + """List ScheduledAction resources by resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ScheduledAction + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ScheduledAction"]: + """List ScheduledAction resources by subscription ID. + + :return: An iterator like instance of ScheduledAction + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledAction] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledAction]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_resources( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> ItemPaged["_models.ScheduledActionResource"]: + """List resources attached to Scheduled Actions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An iterator like instance of ScheduledActionResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledActionResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledActionResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_actions_list_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _attach_resources_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceAttachRequest, _types.ResourceAttachRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + 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[Iterator[bytes]] = 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_attach_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.ResourceAttachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceAttachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _types.ResourceAttachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.ResourceAttachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_attach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceAttachRequest, _types.ResourceAttachRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Attach resources to the scheduled action so they are included in future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a ResourceAttachRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceAttachRequest or + ~azure.mgmt.compute.bulkaction.types.ResourceAttachRequest or IO[bytes] + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._attach_resources_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _detach_resources_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceDetachRequest, _types.ResourceDetachRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + 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[Iterator[bytes]] = 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_detach_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.ResourceDetachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceDetachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _types.ResourceDetachRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.ResourceDetachRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_detach_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourceDetachRequest, _types.ResourceDetachRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Detach resources from the scheduled action so they are excluded from future occurrences. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a ResourceDetachRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourceDetachRequest or + ~azure.mgmt.compute.bulkaction.types.ResourceDetachRequest or IO[bytes] + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._detach_resources_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.ResourcePatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourcePatchRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _types.ResourcePatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.ResourcePatchRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def patch_resources( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.ResourcePatchRequest, _types.ResourcePatchRequest, IO[bytes]], + **kwargs: Any + ) -> _models.ResourceOperationResponse: + """A synchronous resource action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a ResourcePatchRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.ResourcePatchRequest or + ~azure.mgmt.compute.bulkaction.types.ResourcePatchRequest or IO[bytes] + :return: ResourceOperationResponse. The ResourceOperationResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse + :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.ResourceOperationResponse] = 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_patch_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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.ResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _disable_initial(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_disable_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_disable(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> LROPoller[None]: + """Disable the scheduled action so its future occurrences do not run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._disable_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _enable_initial(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scheduled_actions_enable_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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 = True + 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 [202]: + 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) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_enable(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> LROPoller[None]: + """Enable a previously disabled scheduled action so its future occurrences run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._enable_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _cancel_next_occurrence_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + 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[Iterator[bytes]] = 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_cancel_next_occurrence_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + 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 = True + 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, 202]: + 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) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: _models.CancelOccurrenceRequest, + *, content_type: str = "application/json", **kwargs: Any - ) -> _models.DeallocateResourceOperationResponse: - """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteDeallocateContent + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def bulk_deallocate_operation( + def begin_cancel_next_occurrence( self, resource_group_name: str, - location: str, - request_body: IO[bytes], + scheduled_action_name: str, + body: _types.CancelOccurrenceRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.DeallocateResourceOperationResponse: - """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - @distributed_trace - def bulk_deallocate_operation( + @overload + def begin_cancel_next_occurrence( self, resource_group_name: str, - location: str, - request_body: Union[_models.ExecuteDeallocateContent, _types.ExecuteDeallocateContent, IO[bytes]], + scheduled_action_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> _models.DeallocateResourceOperationResponse: - """BulkDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. 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: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_cancel_next_occurrence( + self, + resource_group_name: str, + scheduled_action_name: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the next scheduled occurrence of the scheduled action. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Is either a ExecuteDeallocateContent type or a IO[bytes] - type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeallocateContent or - ~azure.mgmt.compute.bulkaction.types.ExecuteDeallocateContent or IO[bytes] - :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeallocateResourceOperationResponse + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param body: The content of the action request. Is either a CancelOccurrenceRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest or + ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest or IO[bytes] + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cancel_next_occurrence_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _trigger_manual_occurrence_initial( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -499,26 +8040,16 @@ def bulk_deallocate_operation( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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.DeallocateResourceOperationResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(request_body, (IOBase, bytes)): - _content = request_body - else: - _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_virtual_machine_bulk_operations_bulk_deallocate_operation_request( + _request = build_scheduled_actions_trigger_manual_occurrence_request( resource_group_name=resource_group_name, - location=location, + scheduled_action_name=scheduled_action_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -528,19 +8059,18 @@ def bulk_deallocate_operation( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True 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 + if response.status_code not in [200, 202]: + 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, @@ -548,126 +8078,259 @@ def bulk_deallocate_operation( ) 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.DeallocateResourceOperationResponse, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @overload - def bulk_hibernate_operation( - self, - resource_group_name: str, - location: str, - request_body: _models.ExecuteHibernateContent, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.HibernateResourceOperationResponse: - """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_trigger_manual_occurrence( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> LROPoller[_models.Occurrence]: + """Trigger a manual occurrence of the scheduled action immediately, outside its normal schedule. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteHibernateContent - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An instance of LROPoller that returns Occurrence. The Occurrence is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.Occurrence] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def bulk_hibernate_operation( - self, - resource_group_name: str, - location: str, - request_body: _types.ExecuteHibernateContent, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.HibernateResourceOperationResponse: - """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + cls: ClsType[_models.Occurrence] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._trigger_manual_occurrence_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteHibernateContent - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Occurrence, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - @overload - def bulk_hibernate_operation( - self, - resource_group_name: str, - location: str, - request_body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.HibernateResourceOperationResponse: - """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - :param resource_group_name: The name of the resource group. The name is case insensitive. + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Occurrence].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Occurrence]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ScheduledActionExtensionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`scheduled_action_extension` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "resource_uri", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_vms(self, resource_uri: str, **kwargs: Any) -> ItemPaged["_models.ScheduledActionResources"]: + """List ScheduledActionResources resources by parent. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_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: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse + :type resource_uri: str + :return: An iterator like instance of ScheduledActionResources + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.ScheduledActionResources] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ScheduledActionResources]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scheduled_action_extension_list_by_vms_request( + resource_uri=resource_uri, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ScheduledActionOperationStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`scheduled_action_operation_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def bulk_hibernate_operation( - self, - resource_group_name: str, - location: str, - request_body: Union[_models.ExecuteHibernateContent, _types.ExecuteHibernateContent, IO[bytes]], - **kwargs: Any - ) -> _models.HibernateResourceOperationResponse: - """BulkHibernate: Execute hibernate operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": ["api_version", "subscription_id", "location", "operation_id", "accept"] + }, + api_versions_list=["2026-07-06-preview"], + ) + def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: + """Get the status of a ScheduledActions asynchronous operation. Both the ``Azure-AsyncOperation`` + and ``Location`` headers returned by long-running operations point at this endpoint. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str :param location: The location name. Required. :type location: str - :param request_body: The request body. Is either a ExecuteHibernateContent type or a IO[bytes] - type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteHibernateContent or - ~azure.mgmt.compute.bulkaction.types.ExecuteHibernateContent or IO[bytes] - :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is - compatible with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.HibernateResourceOperationResponse + :param operation_id: The operation id. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.OperationStatusResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -678,26 +8341,16 @@ def bulk_hibernate_operation( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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.HibernateResourceOperationResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(request_body, (IOBase, bytes)): - _content = request_body - else: - _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - _request = build_virtual_machine_bulk_operations_bulk_hibernate_operation_request( - resource_group_name=resource_group_name, + _request = build_scheduled_action_operation_status_get_request( location=location, + operation_id=operation_id, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -730,123 +8383,62 @@ def bulk_hibernate_operation( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.HibernateResourceOperationResponse, response.json()) + deserialized = _deserialize(_models.OperationStatusResult, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def bulk_start_operation( - self, - resource_group_name: str, - location: str, - request_body: _models.ExecuteStartContent, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.StartResourceOperationResponse: - """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered - as soon as Computeschedule receives it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteStartContent - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def bulk_start_operation( - self, - resource_group_name: str, - location: str, - request_body: _types.ExecuteStartContent, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.StartResourceOperationResponse: - """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered - as soon as Computeschedule receives it. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteStartContent - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ +class OccurrencesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - def bulk_start_operation( - self, - resource_group_name: str, - location: str, - request_body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.StartResourceOperationResponse: - """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered - as soon as Computeschedule receives it. + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`occurrences` attribute. + """ - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_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: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def bulk_start_operation( - self, - resource_group_name: str, - location: str, - request_body: Union[_models.ExecuteStartContent, _types.ExecuteStartContent, IO[bytes]], - **kwargs: Any - ) -> _models.StartResourceOperationResponse: - """BulkStart: Execute start operation for a batch of virtual machines, this operation is triggered - as soon as Computeschedule receives it. + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def get( + self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any + ) -> _models.Occurrence: + """Get a Occurrence. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Is either a ExecuteStartContent type or a IO[bytes] - type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteStartContent or - ~azure.mgmt.compute.bulkaction.types.ExecuteStartContent or IO[bytes] - :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.StartResourceOperationResponse + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :return: Occurrence. The Occurrence is compatible with MutableMapping + :rtype: ~azure.mgmt.compute.bulkaction.models.Occurrence :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -857,26 +8449,17 @@ def bulk_start_operation( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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.StartResourceOperationResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(request_body, (IOBase, bytes)): - _content = request_body - else: - _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.Occurrence] = kwargs.pop("cls", None) - _request = build_virtual_machine_bulk_operations_bulk_start_operation_request( + _request = build_occurrences_get_request( resource_group_name=resource_group_name, - location=location, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -904,130 +8487,275 @@ def bulk_start_operation( _models.ErrorResponse, response, ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + 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.Occurrence, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_by_scheduled_action( + self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any + ) -> ItemPaged["_models.Occurrence"]: + """List Occurrence resources by ScheduledAction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :return: An iterator like instance of Occurrence + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.Occurrence] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Occurrence]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_occurrences_list_by_scheduled_action_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.StartResourceOperationResponse, response.json()) + 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, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) - @overload - def bulk_delete_operation( - self, - resource_group_name: str, - location: str, - request_body: _models.ExecuteDeleteContent, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def list_resources( + self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any + ) -> ItemPaged["_models.OccurrenceResource"]: + """List resources attached to Scheduled Actions for the given occurrence. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible - with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :return: An iterator like instance of OccurrenceResource + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.OccurrenceResource] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def bulk_delete_operation( - self, - resource_group_name: str, - location: str, - request_body: _types.ExecuteDeleteContent, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + cls: ClsType[List[_models.OccurrenceResource]] = kwargs.pop("cls", None) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible - with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - def bulk_delete_operation( - self, - resource_group_name: str, - location: str, - request_body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. + def prepare_request(next_link=None): + if not next_link: - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_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: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible - with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ + _request = build_occurrences_list_resources_request( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + 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) - @distributed_trace - def bulk_delete_operation( + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _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]: + 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) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _cancel_initial( self, resource_group_name: str, - location: str, - request_body: Union[_models.ExecuteDeleteContent, _types.ExecuteDeleteContent, IO[bytes]], + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], **kwargs: Any - ) -> _models.DeleteResourceOperationResponse: - """BulkDelete: Execute delete operation for a batch of virtual machines, this operation is - triggered as soon as Computeschedule receives it. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Is either a ExecuteDeleteContent type or a IO[bytes] - type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.ExecuteDeleteContent or - ~azure.mgmt.compute.bulkaction.types.ExecuteDeleteContent or IO[bytes] - :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible - with MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.DeleteResourceOperationResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -1040,18 +8768,19 @@ def bulk_delete_operation( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DeleteResourceOperationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None - if isinstance(request_body, (IOBase, bytes)): - _content = request_body + if isinstance(body, (IOBase, bytes)): + _content = body else: - _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machine_bulk_operations_bulk_delete_operation_request( + _request = build_occurrences_cancel_request( resource_group_name=resource_group_name, - location=location, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -1065,19 +8794,18 @@ def bulk_delete_operation( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True 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 + if response.status_code not in [200, 202]: + 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, @@ -1085,128 +8813,236 @@ def bulk_delete_operation( ) 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.DeleteResourceOperationResponse, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - def bulk_get_operations_status( + def begin_cancel( self, resource_group_name: str, - location: str, - request_body: _models.GetOperationStatusContent, + scheduled_action_name: str, + occurrence_id: str, + body: _models.CancelOccurrenceRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def bulk_get_operations_status( + def begin_cancel( self, resource_group_name: str, - location: str, - request_body: _types.GetOperationStatusContent, + scheduled_action_name: str, + occurrence_id: str, + body: _types.CancelOccurrenceRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def bulk_get_operations_status( + def begin_cancel( self, resource_group_name: str, - location: str, - request_body: IO[bytes], + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: IO[bytes] + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. 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: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def bulk_get_operations_status( + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_cancel( self, resource_group_name: str, - location: str, - request_body: Union[_models.GetOperationStatusContent, _types.GetOperationStatusContent, IO[bytes]], + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.CancelOccurrenceRequest, _types.CancelOccurrenceRequest, IO[bytes]], **kwargs: Any - ) -> _models.GetOperationStatusResponse: - """BulkGetOperationsStatus: Polling endpoint to read status of operations performed on virtual - machines. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Cancel the occurrence so its pending operations do not run. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Is either a GetOperationStatusContent type or a + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Is either a CancelOccurrenceRequest type or a IO[bytes] type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusContent or - ~azure.mgmt.compute.bulkaction.types.GetOperationStatusContent or IO[bytes] - :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.GetOperationStatusResponse + :type body: ~azure.mgmt.compute.bulkaction.models.CancelOccurrenceRequest or + ~azure.mgmt.compute.bulkaction.types.CancelOccurrenceRequest or IO[bytes] + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def _delay_initial( + self, + resource_group_name: str, + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.DelayRequest, _types.DelayRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -1219,18 +9055,19 @@ def bulk_get_operations_status( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GetOperationStatusResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None - if isinstance(request_body, (IOBase, bytes)): - _content = request_body + if isinstance(body, (IOBase, bytes)): + _content = body else: - _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machine_bulk_operations_bulk_get_operations_status_request( + _request = build_occurrences_delay_request( resource_group_name=resource_group_name, - location=location, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -1244,19 +9081,18 @@ def bulk_get_operations_status( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True 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 + if response.status_code not in [200, 202]: + 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, @@ -1264,124 +9100,257 @@ def bulk_get_operations_status( ) 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.GetOperationStatusResponse, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + 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() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - def bulk_cancel_operations( + def begin_delay( self, resource_group_name: str, - location: str, - request_body: _models.CancelOperationsContent, + scheduled_action_name: str, + occurrence_id: str, + body: _models.DelayRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.models.DelayRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def bulk_cancel_operations( + def begin_delay( self, resource_group_name: str, - location: str, - request_body: _types.CancelOperationsContent, + scheduled_action_name: str, + occurrence_id: str, + body: _types.DelayRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.compute.bulkaction.types.DelayRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def bulk_cancel_operations( + def begin_delay( self, resource_group_name: str, - location: str, - request_body: IO[bytes], + scheduled_action_name: str, + occurrence_id: str, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Required. - :type request_body: IO[bytes] + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. 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: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def bulk_cancel_operations( + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={ + "2026-07-06-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "scheduled_action_name", + "occurrence_id", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-07-06-preview"], + ) + def begin_delay( self, resource_group_name: str, - location: str, - request_body: Union[_models.CancelOperationsContent, _types.CancelOperationsContent, IO[bytes]], + scheduled_action_name: str, + occurrence_id: str, + body: Union[_models.DelayRequest, _types.DelayRequest, IO[bytes]], **kwargs: Any - ) -> _models.CancelOperationsResponse: - """BulkCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request. + ) -> LROPoller[_models.ResourceOperationResponse]: + """Delay the occurrence to a later time. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param location: The location name. Required. - :type location: str - :param request_body: The request body. Is either a CancelOperationsContent type or a IO[bytes] + :param scheduled_action_name: The name of the ScheduledAction. Required. + :type scheduled_action_name: str + :param occurrence_id: The name of the Occurrence. Required. + :type occurrence_id: str + :param body: The content of the action request. Is either a DelayRequest type or a IO[bytes] type. Required. - :type request_body: ~azure.mgmt.compute.bulkaction.models.CancelOperationsContent or - ~azure.mgmt.compute.bulkaction.types.CancelOperationsContent or IO[bytes] - :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with - MutableMapping - :rtype: ~azure.mgmt.compute.bulkaction.models.CancelOperationsResponse + :type body: ~azure.mgmt.compute.bulkaction.models.DelayRequest or + ~azure.mgmt.compute.bulkaction.types.DelayRequest or IO[bytes] + :return: An instance of LROPoller that returns ResourceOperationResponse. The + ResourceOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.compute.bulkaction.models.ResourceOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _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.ResourceOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delay_initial( + resource_group_name=resource_group_name, + scheduled_action_name=scheduled_action_name, + occurrence_id=occurrence_id, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ResourceOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ResourceOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ResourceOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class OccurrenceExtensionOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.compute.bulkaction.ComputeBulkActionsMgmtClient`'s + :attr:`occurrence_extension` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeBulkActionsMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-07-06-preview", + params_added_on={"2026-07-06-preview": ["api_version", "resource_uri", "accept"]}, + api_versions_list=["2026-07-06-preview"], + ) + def list_occurrence_by_vms( + self, resource_uri: str, **kwargs: Any + ) -> ItemPaged["_models.OccurrenceExtensionResource"]: + """List OccurrenceExtensionResource resources by parent. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. + Required. + :type resource_uri: str + :return: An iterator like instance of OccurrenceExtensionResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.compute.bulkaction.models.OccurrenceExtensionResource] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OccurrenceExtensionResource]] = kwargs.pop("cls", None) + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -1390,61 +9359,74 @@ def bulk_cancel_operations( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + def prepare_request(next_link=None): + if not next_link: - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CancelOperationsResponse] = kwargs.pop("cls", None) + _request = build_occurrence_extension_list_occurrence_by_vms_request( + resource_uri=resource_uri, + api_version=self._config.api_version, + 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) - content_type = content_type or "application/json" - _content = None - if isinstance(request_body, (IOBase, bytes)): - _content = request_body - else: - _content = json.dumps(request_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_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) - _request = build_virtual_machine_bulk_operations_bulk_cancel_operations_request( - resource_group_name=resource_group_name, - location=location, - 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) + return _request - _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 - ) + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + 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) - response = pipeline_response.http_response + def get_next(next_link=None): + _request = prepare_request(next_link) - 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, + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CancelOperationsResponse, response.json()) + 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, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/types.py b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/types.py index 03737e44b492..d7cf340663ae 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/types.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/azure/mgmt/compute/bulkaction/types.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +7,614 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import TYPE_CHECKING, Union +from typing import Any, Literal, TYPE_CHECKING, Union from typing_extensions import Required, TypedDict if TYPE_CHECKING: - from .models import ResourceOperationType + from .models import ( + AcceleratorManufacturer, + AcceleratorType, + AllocationStrategy, + ArchitectureType, + BulkCreateCustomAllocationStrategy, + BulkCreateCustomDistributionStrategy, + CachingTypes, + CapacityType, + CpuManufacturer, + CreatedByType, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DistributionStrategy, + DomainNameLabelScopeTypes, + EvictionPolicy, + HyperVGeneration, + IPVersions, + Language, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + LocalStorageDiskType, + ManagedServiceIdentityType, + Mode, + Modes, + Month, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, + NotificationType, + OperatingSystemTypes, + OptimizationPreference, + OsType, + PriorityType, + ProtocolTypes, + ProvisioningState, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + RecurringScheduledActionsDeadlineType, + RecurringScheduledActionsProvisioningState, + RecurringScheduledActionsResourceOperationType, + ResourceIdentityType, + ResourceOperationType, + ResourceType, + ScheduledActionType, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StorageAccountTypes, + VMAttributeSupport, + VMCategory, + WeekDay, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, + ) + + +class AcknowledgeBulkOperationErrorsRequest(TypedDict, total=False): + """The request to acknowledge bulk operation errors. + + :ivar operation_ids: The set of operation ids to acknowledge. Required. + :vartype operation_ids: list[str] + """ + + operationIds: Required[list[str]] + """The set of operation ids to acknowledge. Required.""" + + +class AdditionalCapabilities(TypedDict, total=False): + """Enables or disables a capability on the virtual machine or virtual machine scale set. + + :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 + """ + + ultraSSDEnabled: bool + """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.""" + hibernationEnabled: bool + """The flag that enables or disables hibernation capability on the VM.""" + + +class AdditionalUnattendContent(TypedDict, total=False): + """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: Literal["OobeSystem"] + :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: Literal["Microsoft-Windows-Shell-Setup"] + :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: Union[str, "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 + """ + + passName: Literal["OobeSystem"] + """The pass name. Currently, the only allowable value is OobeSystem. Default value is + \"OobeSystem\".""" + componentName: Literal["Microsoft-Windows-Shell-Setup"] + """The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. + Default value is \"Microsoft-Windows-Shell-Setup\".""" + settingName: Union[str, "SettingNames"] + """Specifies the name of the setting to which the content applies. Possible values are: + FirstLogonCommands and AutoLogon. Known values are: \"AutoLogon\" and \"FirstLogonCommands\".""" + content: str + """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.""" + + +class AllInstancesDown(TypedDict, total=False): + """Specifies if Scheduled Events should be auto-approved when all instances are down. + + :ivar all_instances_down_automatically_approve: Specifies if Scheduled Events should be + auto-approved when all instances are down. Its default value is true. + :vartype all_instances_down_automatically_approve: bool + """ + + automaticallyApprove: bool + """Specifies if Scheduled Events should be auto-approved when all instances are down. Its default + value is true.""" + + +class ApiEntityReference(TypedDict, total=False): + """The API entity reference. + + :ivar id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :vartype id: str + """ + + id: str + """The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...""" + + +class ApplicationProfile(TypedDict, total=False): + """Contains the list of gallery applications that should be made available to the VM. + + :ivar gallery_applications: Specifies the gallery applications that should be made available to + the VM. + :vartype gallery_applications: list["VMGalleryApplication"] + """ + + galleryApplications: list["VMGalleryApplication"] + """Specifies the gallery applications that should be made available to the VM.""" + + +class BootDiagnostics(TypedDict, total=False): + """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 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 + """ + + enabled: bool + """Whether boot diagnostics should be enabled on the Virtual Machine.""" + storageUri: str + """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.""" + + +class BulkactionVMExtension(TypedDict, total=False): + """Defines a virtual machine extension. + + :ivar name: The name of the virtual machine extension. Required. + :vartype name: str + :ivar properties: Properties of the virtual machine extension. Required. + :vartype properties: "BulkActionVmExtensionProperties" + """ + + name: Required[str] + """The name of the virtual machine extension. Required.""" + properties: Required["BulkActionVmExtensionProperties"] + """Properties of the virtual machine extension. Required.""" + + +class BulkActionVmExtensionProperties(TypedDict, total=False): + """Describes the properties of a Virtual Machine Extension. + + :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 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: "KeyVaultSecretReference" + :ivar provision_after_extensions: Collection of extension names after which this extension + needs to be provisioned. + :vartype provision_after_extensions: list[str] + """ + + forceUpdateTag: str + """How the extension handler should be forced to update even if the extension configuration has + not changed.""" + publisher: str + """The name of the extension handler publisher.""" + type: str + """Specifies the type of the extension; an example is 'CustomScriptExtension'.""" + typeHandlerVersion: str + """Specifies the version of the script handler.""" + autoUpgradeMinorVersion: bool + """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.""" + enableAutomaticUpgrade: bool + """Indicates whether the extension should be automatically upgraded by the platform if there is a + newer version of the extension available.""" + settings: dict[str, Any] + """JSON formatted public settings for the extension.""" + protectedSettings: dict[str, Any] + """The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no + protected settings at all.""" + suppressFailures: bool + """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.""" + protectedSettingsFromKeyVault: "KeyVaultSecretReference" + """The extensions protected settings that are passed by reference, and consumed from key vault.""" + provisionAfterExtensions: list[str] + """Collection of extension names after which this extension needs to be provisioned.""" + + +class BulkactionVMProperties(TypedDict, total=False): + """Describes the properties of a Virtual Machine for bulk create. + + :ivar scheduled_events_policy: Specifies Redeploy, Reboot and + ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the + virtual machine. + :vartype scheduled_events_policy: "ScheduledEventsPolicy" + :ivar storage_profile: Specifies the storage settings for the virtual machine disks. + :vartype storage_profile: "StorageProfile" + :ivar hardware_profile: Specifies the hardware profile for the virtual machine. + :vartype hardware_profile: "HardwareProfile" + :ivar additional_capabilities: Specifies additional capabilities enabled or disabled on the + virtual machine. + :vartype additional_capabilities: "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: "OSProfile" + :ivar network_profile: Specifies the network interfaces of the virtual machine. + :vartype network_profile: "NetworkProfile" + :ivar security_profile: Specifies the Security related profile settings for the virtual + machine. + :vartype security_profile: "SecurityProfile" + :ivar diagnostics_profile: Specifies the boot diagnostic settings state. Minimum compute + api-version: 2015-06-15. + :vartype diagnostics_profile: "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: "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: "CapacityReservationProfile" + :ivar application_profile: Specifies the gallery applications that should be made available to + the VM. + :vartype application_profile: "ApplicationProfile" + :ivar vm_extensions: Virtual Machine Extensions Array to be applied to the Virtual Machines. + :vartype vm_extensions: list["BulkactionVMExtension"] + """ + + scheduledEventsPolicy: "ScheduledEventsPolicy" + """Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event + related configurations for the virtual machine.""" + storageProfile: "StorageProfile" + """Specifies the storage settings for the virtual machine disks.""" + hardwareProfile: "HardwareProfile" + """Specifies the hardware profile for the virtual machine.""" + additionalCapabilities: "AdditionalCapabilities" + """Specifies additional capabilities enabled or disabled on the virtual machine.""" + osProfile: "OSProfile" + """Specifies the operating system settings used while creating the virtual machine. Some of the + settings cannot be changed once VM is provisioned.""" + networkProfile: "NetworkProfile" + """Specifies the network interfaces of the virtual machine.""" + securityProfile: "SecurityProfile" + """Specifies the Security related profile settings for the virtual machine.""" + diagnosticsProfile: "DiagnosticsProfile" + """Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15.""" + licenseType: str + """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.""" + extensionsTimeBudget: str + """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.""" + scheduledEventsProfile: "ScheduledEventsProfile" + """Specifies Scheduled Event related configurations.""" + userData: str + """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.""" + capacityReservation: "CapacityReservationProfile" + """Specifies information about the capacity reservation that is used to allocate virtual machine. + Minimum compute api-version: 2021-04-01.""" + applicationProfile: "ApplicationProfile" + """Specifies the gallery applications that should be made available to the VM.""" + vmExtensions: list["BulkactionVMExtension"] + """Virtual Machine Extensions Array to be applied to the Virtual Machines.""" + + +class BulkCreateCustomOverride(TypedDict, total=False): + """A single per-VM override. Extends the shared override fields with a per-VM name. + + :ivar virtual_machine_name: ARM VM name for this VM. Optional; when omitted the name is + generated from the prefix as {prefix}_{index}. + :vartype virtual_machine_name: str + :ivar virtual_machine_profile: VM profile, the same shape as operation-level + ComputeProfile.virtualMachineProfile. Overrides the operation-level VM profile. + :vartype virtual_machine_profile: "BulkactionVMProperties" + :ivar tags: Tags overriding the operation-level tags. + :vartype tags: dict[str, str] + :ivar identity: Identity overriding the operation-level identity. + :vartype identity: "VirtualMachineIdentity" + :ivar plan: Plan overriding the operation-level plan. + :vartype plan: "Plan" + :ivar extensions: Extensions. When non-empty they replace the operation-level extensions; when + omitted the operation-level extensions are inherited. + :vartype extensions: list["BulkactionVMExtension"] + """ + + virtualMachineName: str + """ARM VM name for this VM. Optional; when omitted the name is generated from the prefix as + {prefix}_{index}.""" + virtualMachineProfile: "BulkactionVMProperties" + """VM profile, the same shape as operation-level ComputeProfile.virtualMachineProfile. Overrides + the operation-level VM profile.""" + tags: dict[str, str] + """Tags overriding the operation-level tags.""" + identity: "VirtualMachineIdentity" + """Identity overriding the operation-level identity.""" + plan: "Plan" + """Plan overriding the operation-level plan.""" + extensions: list["BulkactionVMExtension"] + """Extensions. When non-empty they replace the operation-level extensions; when omitted the + operation-level extensions are inherited.""" + + +class BulkCreateCustomOverrideBase(TypedDict, total=False): + """Override fields shared by per-VM and per-VM-size overrides. Each set field takes precedence + over the operation-level value. VM size, zone, priority, eviction policy, and billing are owned + by the service and cannot be set here. + + :ivar virtual_machine_profile: VM profile, the same shape as operation-level + ComputeProfile.virtualMachineProfile. Overrides the operation-level VM profile. + :vartype virtual_machine_profile: "BulkactionVMProperties" + :ivar tags: Tags overriding the operation-level tags. + :vartype tags: dict[str, str] + :ivar identity: Identity overriding the operation-level identity. + :vartype identity: "VirtualMachineIdentity" + :ivar plan: Plan overriding the operation-level plan. + :vartype plan: "Plan" + :ivar extensions: Extensions. When non-empty they replace the operation-level extensions; when + omitted the operation-level extensions are inherited. + :vartype extensions: list["BulkactionVMExtension"] + """ + + virtualMachineProfile: "BulkactionVMProperties" + """VM profile, the same shape as operation-level ComputeProfile.virtualMachineProfile. Overrides + the operation-level VM profile.""" + tags: dict[str, str] + """Tags overriding the operation-level tags.""" + identity: "VirtualMachineIdentity" + """Identity overriding the operation-level identity.""" + plan: "Plan" + """Plan overriding the operation-level plan.""" + extensions: list["BulkactionVMExtension"] + """Extensions. When non-empty they replace the operation-level extensions; when omitted the + operation-level extensions are inherited.""" + + +class BulkCreateCustomOverridesProfile(TypedDict, total=False): + """Groups the per-VM overrides with the name prefix that names any override that does not supply + its own VM name. + + :ivar virtual_machine_name_prefix: Prefix used to build the ARM VM name ({prefix}_{index}) for + overrides that omit a virtualMachineName. Required when any override is unnamed and rejected + when every override is named. + :vartype virtual_machine_name_prefix: str + :ivar overrides: Per-VM overrides. The count is the VM count and must equal capacity. Each + override maps to VM index i. + :vartype overrides: list["BulkCreateCustomOverride"] + """ + + virtualMachineNamePrefix: str + """Prefix used to build the ARM VM name ({prefix}_{index}) for overrides that omit a + virtualMachineName. Required when any override is unnamed and rejected when every override is + named.""" + overrides: list["BulkCreateCustomOverride"] + """Per-VM overrides. The count is the VM count and must equal capacity. Each override maps to VM + index i.""" + + +class BulkCreateCustomPriorityProfile(TypedDict, total=False): + """Configuration options for Regular or Spot instances in BulkCreateCustom. + + :ivar type: The priority type for VM allocation. Known values are: "Regular" and "Spot". + :vartype type: Union[str, "PriorityType"] + :ivar max_price_per_vm: Price per hour of each Spot VM will never exceed this. + :vartype max_price_per_vm: float + :ivar eviction_policy: Eviction Policy to follow when evicting Spot VMs. Known values are: + "Delete" and "Deallocate". + :vartype eviction_policy: Union[str, "EvictionPolicy"] + :ivar allocation_strategy: The allocation strategy for VM size selection. Known values are: + "LowestPrice" and "Prioritized". + :vartype allocation_strategy: Union[str, "BulkCreateCustomAllocationStrategy"] + """ + + type: Union[str, "PriorityType"] + """The priority type for VM allocation. Known values are: \"Regular\" and \"Spot\".""" + maxPricePerVM: float + """Price per hour of each Spot VM will never exceed this.""" + evictionPolicy: Union[str, "EvictionPolicy"] + """Eviction Policy to follow when evicting Spot VMs. Known values are: \"Delete\" and + \"Deallocate\".""" + allocationStrategy: Union[str, "BulkCreateCustomAllocationStrategy"] + """The allocation strategy for VM size selection. Known values are: \"LowestPrice\" and + \"Prioritized\".""" + + +class BulkCreateCustomProperties(TypedDict, total=False): + """Details of the BulkCreateCustom. + + :ivar created_time: The UTC time the BulkCreateCustom resource was created. + :vartype created_time: str + :ivar provisioning_state: The status of the last operation. Known values are: "Creating", + "Succeeded", "Failed", "Deleting", and "Canceled". + :vartype provisioning_state: Union[str, "ProvisioningState"] + :ivar capacity: Total capacity to achieve. It can be in terms of VMs or vCPUs. Required. + :vartype capacity: int + :ivar capacity_type: Specifies capacity type for launching instances. It can be in terms of VMs + or vCPUs. Known values are: "VM" and "VCpu". + :vartype capacity_type: Union[str, "CapacityType"] + :ivar priority_profile: Configuration Options for Regular or Spot instances in + BulkCreateCustom. Required. + :vartype priority_profile: "BulkCreateCustomPriorityProfile" + :ivar vm_sizes_profile: List of VM sizes supported for BulkCreateCustom. + :vartype vm_sizes_profile: list["BulkCreateCustomVmSizeProfile"] + :ivar compute_profile: Compute Profile to configure the Virtual Machines. Required. + :vartype compute_profile: "ComputeProfile" + :ivar zone_allocation_policy: Zone Allocation Policy for launching instances. + :vartype zone_allocation_policy: "BulkCreateCustomZoneAllocationPolicy" + :ivar overrides_profile: Per-VM overrides and the shared name prefix, specified when the + operation is created. + :vartype overrides_profile: "BulkCreateCustomOverridesProfile" + :ivar execution_parameters: Extra parameters that control how the request is executed, + including the retry policy. + :vartype execution_parameters: "ExecutionParameters" + """ + + createdTime: str + """The UTC time the BulkCreateCustom resource was created.""" + provisioningState: Union[str, "ProvisioningState"] + """The status of the last operation. Known values are: \"Creating\", \"Succeeded\", \"Failed\", + \"Deleting\", and \"Canceled\".""" + capacity: Required[int] + """Total capacity to achieve. It can be in terms of VMs or vCPUs. Required.""" + capacityType: Union[str, "CapacityType"] + """Specifies capacity type for launching instances. It can be in terms of VMs or vCPUs. Known + values are: \"VM\" and \"VCpu\".""" + priorityProfile: Required["BulkCreateCustomPriorityProfile"] + """Configuration Options for Regular or Spot instances in BulkCreateCustom. Required.""" + vmSizesProfile: list["BulkCreateCustomVmSizeProfile"] + """List of VM sizes supported for BulkCreateCustom.""" + computeProfile: Required["ComputeProfile"] + """Compute Profile to configure the Virtual Machines. Required.""" + zoneAllocationPolicy: "BulkCreateCustomZoneAllocationPolicy" + """Zone Allocation Policy for launching instances.""" + overridesProfile: "BulkCreateCustomOverridesProfile" + """Per-VM overrides and the shared name prefix, specified when the operation is created.""" + executionParameters: "ExecutionParameters" + """Extra parameters that control how the request is executed, including the retry policy.""" + + +class BulkCreateCustomVmSizeProfile(TypedDict, total=False): + """A VM size profile entry that may additionally carry an optional per-VM-size profile override. + Every VM that the service assigns to this size inherits the override, layered on top of the + operation-level base profile and beneath any per-VM override. Present only on the + bulkCreateCustom endpoint; the uniform endpoint rejects a non-null override. + + :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. Required. + :vartype rank: int + :ivar override: Optional per-VM-size profile override applied to every VM the service assigns + to this size. A size maps to many VMs, so virtualMachineName is not part of this shape. + virtualMachineProfile is layered beneath any per-VM override; tags, identity, and plan are + merged with the per-VM override, with the per-VM value winning. + :vartype override: "BulkCreateCustomOverrideBase" + """ + + name: Required[str] + """The name of the VM size, eg Standard_D2ads_v5. Required.""" + rank: Required[int] + """The rank of this VM size in the priority order. Required.""" + override: "BulkCreateCustomOverrideBase" + """Optional per-VM-size profile override applied to every VM the service assigns to this size. A + size maps to many VMs, so virtualMachineName is not part of this shape. virtualMachineProfile + is layered beneath any per-VM override; tags, identity, and plan are merged with the per-VM + override, with the per-VM value winning.""" + + +class BulkCreateCustomZoneAllocationPolicy(TypedDict, total=False): + """The zone allocation policy for distributing VMs across availability zones in BulkCreateCustom. + + :ivar distribution_strategy: The distribution strategy for zone allocation. Defaults to + BestEffortBalanced. Known values are: "BestEffortSingleZone", "Prioritized", and + "BestEffortBalanced". + :vartype distribution_strategy: Union[str, "BulkCreateCustomDistributionStrategy"] + :ivar zone_preferences: The zone preferences for allocation priority. + :vartype zone_preferences: list["ZonePreference"] + """ + + distributionStrategy: Union[str, "BulkCreateCustomDistributionStrategy"] + """The distribution strategy for zone allocation. Defaults to BestEffortBalanced. Known values + are: \"BestEffortSingleZone\", \"Prioritized\", and \"BestEffortBalanced\".""" + zonePreferences: list["ZonePreference"] + """The zone preferences for allocation priority.""" + + +class CancelOccurrenceRequest(TypedDict, total=False): + """The request to cancel an occurrence. + + :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] + """ + + resourceIds: Required[list[str]] + """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.""" class CancelOperationsContent(TypedDict, total=False): @@ -24,19 +628,310 @@ class CancelOperationsContent(TypedDict, total=False): """The list of operation ids to cancel operations on. Required.""" +class CapacityReservationProfile(TypedDict, total=False): + """The parameters of a capacity reservation Profile. + + :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: "SubResource" + """ + + capacityReservationGroup: "SubResource" + """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.""" + + +class ComputeProfile(TypedDict, total=False): + """Compute Profile to configure the Virtual Machines. + + :ivar virtual_machine_profile: Base Virtual Machine Profile Properties to be specified + according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineProperties. + Required. + :vartype virtual_machine_profile: "BulkactionVMProperties" + :ivar extensions: Virtual Machine Extensions Array to be specified according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineExtension. + :vartype extensions: list["BulkactionVMExtension"] + :ivar compute_api_version: Specifies the Microsoft.Compute API version to use when creating + underlying Virtual Machines. The default value will be the latest supported computeApiVersion + by LaunchBulkInstancesOperation. + :vartype compute_api_version: str + """ + + virtualMachineProfile: Required["BulkactionVMProperties"] + """Base Virtual Machine Profile Properties to be specified according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineProperties. + Required.""" + extensions: list["BulkactionVMExtension"] + """Virtual Machine Extensions Array to be specified according to + specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachine.json#/definitions/VirtualMachineExtension.""" + computeApiVersion: str + """Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machines. + The default value will be the latest supported computeApiVersion by + LaunchBulkInstancesOperation.""" + + +class DataDisk(TypedDict, total=False): + """Describes a data disk. + + :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: "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: "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: Union[str, "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: Union[str, "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: "ManagedDiskParametersContent" + :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: "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: Union[str, "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: Union[str, "DiskDeleteOptionTypes"] + """ + + lun: Required[int] + """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: str + """The disk name.""" + vhd: "VirtualHardDisk" + """The virtual hard disk.""" + image: "VirtualHardDisk" + """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: Union[str, "CachingTypes"] + """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\".""" + writeAcceleratorEnabled: bool + """Specifies whether writeAccelerator should be enabled or disabled on the disk.""" + createOption: Required[Union[str, "DiskCreateOptionTypes"]] + """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\".""" + diskSizeGB: int + """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.""" + managedDisk: "ManagedDiskParametersContent" + """The managed disk parameters.""" + sourceResource: "ApiEntityReference" + """The source resource identifier. It can be a snapshot, or disk restore point from which to + create a disk.""" + toBeDetached: bool + """Specifies whether the data disk is in process of detachment from the + VirtualMachine/VirtualMachineScaleset.""" + detachOption: Union[str, "DiskDetachOptionTypes"] + """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\"""" + deleteOption: Union[str, "DiskDeleteOptionTypes"] + """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\".""" + + +class DelayRequest(TypedDict, total=False): + """Request to ask for a delay in an occurrence, delay should be set to client local time eg (PST) + 2025-05-30T06:35:00-07:00. + + :ivar delay: The exact time to delay the operations to. Required. + :vartype delay: str + :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] + """ + + delay: Required[str] + """The exact time to delay the operations to. Required.""" + resourceIds: Required[list[str]] + """The resources that should be delayed. If empty, the delay will apply to the all resources in + the occurrence. Required.""" + + +class DiagnosticsProfile(TypedDict, total=False): + """Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15. + + :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: "BootDiagnostics" + """ + + bootDiagnostics: "BootDiagnostics" + """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.""" + + +class DiffDiskSettings(TypedDict, total=False): + """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 option: Specifies the ephemeral disk settings for operating system disk. "Local" + :vartype option: Union[str, "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: Union[str, "DiffDiskPlacement"] + """ + + option: Union[str, "DiffDiskOptions"] + """Specifies the ephemeral disk settings for operating system disk. \"Local\"""" + placement: Union[str, "DiffDiskPlacement"] + """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\".""" + + +class SubResource(TypedDict, total=False): + """Describes a reference to a sub-resource. + + :ivar id: The ID of the sub-resource. + :vartype id: str + """ + + id: str + """The ID of the sub-resource.""" + + +class DiskEncryptionSetParametersContent(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: The ID of the sub-resource. + :vartype id: str + """ + + +class DiskEncryptionSettings(TypedDict, total=False): + """Describes a Encryption Settings for a Disk. + + :ivar disk_encryption_key: Specifies the location of the disk encryption key, which is a Key + Vault Secret. + :vartype disk_encryption_key: "KeyVaultSecretReference" + :ivar key_encryption_key: Specifies the location of the key encryption key in Key Vault. + :vartype key_encryption_key: "KeyVaultKeyReference" + :ivar enabled: Specifies whether disk encryption should be enabled on the virtual machine. + :vartype enabled: bool + """ + + diskEncryptionKey: "KeyVaultSecretReference" + """Specifies the location of the disk encryption key, which is a Key Vault Secret.""" + keyEncryptionKey: "KeyVaultKeyReference" + """Specifies the location of the key encryption key in Key Vault.""" + enabled: bool + """Specifies whether disk encryption should be enabled on the virtual machine.""" + + +class EncryptionIdentity(TypedDict, total=False): + """Specifies the Managed Identity used by ADE to get access token for keyvault operations. + + :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 + """ + + userAssignedIdentityResourceId: str + """Specifies ARM Resource ID of one of the user identities associated with the VM.""" + + +class EventGridAndResourceGraph(TypedDict, total=False): + """Specifies eventGridAndResourceGraph related Scheduled Event related configurations. + + :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 + """ + + enable: bool + """Specifies if event grid and resource graph is enabled for Scheduled event related + configurations.""" + scheduledEventsApiVersion: str + """Specifies the api-version to determine which Scheduled Events configuration schema version will + be delivered.""" + + +class ExecuteCreateContent(TypedDict, total=False): + """The ExecuteCreateRequest request for create operations. + + :ivar resource_config_parameters: resource creation payload. Required. + :vartype resource_config_parameters: "ResourceProvisionPayload" + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: "ExecutionParameters" + """ + + resourceConfigParameters: Required["ResourceProvisionPayload"] + """resource creation payload. Required.""" + executionParameters: Required["ExecutionParameters"] + """The execution parameters for the request. Required.""" + + class ExecuteDeallocateContent(TypedDict, total=False): """The ExecuteDeallocateRequest request for executeDeallocate operations. :ivar execution_parameters: The execution parameters for the request. Required. :vartype execution_parameters: "ExecutionParameters" - :ivar resources: The resources for the request. Required. + :ivar resources: The resources for the request. :vartype resources: "Resources" + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: "ResourcesWithContext" """ executionParameters: Required["ExecutionParameters"] """The execution parameters for the request. Required.""" - resources: Required["Resources"] - """The resources for the request. Required.""" + resources: "Resources" + """The resources for the request.""" + resourcesWithContext: "ResourcesWithContext" + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" class ExecuteDeleteContent(TypedDict, total=False): @@ -44,16 +939,22 @@ class ExecuteDeleteContent(TypedDict, total=False): :ivar execution_parameters: The execution parameters for the request. Required. :vartype execution_parameters: "ExecutionParameters" - :ivar resources: The resources for the request. Required. + :ivar resources: The resources for the request. :vartype resources: "Resources" + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: "ResourcesWithContext" :ivar force_deletion: Forced delete resource item. :vartype force_deletion: bool """ executionParameters: Required["ExecutionParameters"] """The execution parameters for the request. Required.""" - resources: Required["Resources"] - """The resources for the request. Required.""" + resources: "Resources" + """The resources for the request.""" + resourcesWithContext: "ResourcesWithContext" + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" forceDeletion: bool """Forced delete resource item.""" @@ -63,14 +964,45 @@ class ExecuteHibernateContent(TypedDict, total=False): :ivar execution_parameters: The execution parameters for the request. Required. :vartype execution_parameters: "ExecutionParameters" - :ivar resources: The resources for the request. Required. + :ivar resources: The resources for the request. + :vartype resources: "Resources" + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: "ResourcesWithContext" + """ + + executionParameters: Required["ExecutionParameters"] + """The execution parameters for the request. Required.""" + resources: "Resources" + """The resources for the request.""" + resourcesWithContext: "ResourcesWithContext" + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + + +class ExecuteReimageRequest(TypedDict, total=False): + """The ExecuteReimageRequest request for reimage operations. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: "ExecutionParameters" + :ivar resources: The resources for the request. :vartype resources: "Resources" + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: "ResourcesWithContext" + :ivar reimage_parameters: Reimage parameters including base profile and per-resource overrides. + :vartype reimage_parameters: "ReimagePayload" """ executionParameters: Required["ExecutionParameters"] """The execution parameters for the request. Required.""" - resources: Required["Resources"] - """The resources for the request. Required.""" + resources: "Resources" + """The resources for the request.""" + resourcesWithContext: "ResourcesWithContext" + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + reimageParameters: "ReimagePayload" + """Reimage parameters including base profile and per-resource overrides.""" class ExecuteStartContent(TypedDict, total=False): @@ -78,25 +1010,119 @@ class ExecuteStartContent(TypedDict, total=False): :ivar execution_parameters: The execution parameters for the request. Required. :vartype execution_parameters: "ExecutionParameters" - :ivar resources: The resources for the request. Required. + :ivar resources: The resources for the request. :vartype resources: "Resources" + :ivar resources_with_context: The resources for the request with resource context information. + Cannot be provided together with ``resources`` - exactly one must be specified. + :vartype resources_with_context: "ResourcesWithContext" + """ + + executionParameters: Required["ExecutionParameters"] + """The execution parameters for the request. Required.""" + resources: "Resources" + """The resources for the request.""" + resourcesWithContext: "ResourcesWithContext" + """The resources for the request with resource context information. Cannot be provided together + with ``resources`` - exactly one must be specified.""" + + +class ExecuteVdiCreateRequest(TypedDict, total=False): + """The VdiCreateRequest request for create operations. + + :ivar resource_config_parameters: resource creation payload. Required. + :vartype resource_config_parameters: "ResourceProvisionVdiPayload" + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: "ExecutionParameters" """ + resourceConfigParameters: Required["ResourceProvisionVdiPayload"] + """resource creation payload. Required.""" executionParameters: Required["ExecutionParameters"] """The execution parameters for the request. Required.""" - resources: Required["Resources"] - """The resources for the request. Required.""" class ExecutionParameters(TypedDict, total=False): """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: Union[str, "OptimizationPreference"] :ivar retry_policy: Retry policy the user can pass. :vartype retry_policy: "RetryPolicy" + :ivar verify_vm_agent_health: When true on an executeStart request, run a post-Start VM agent + health check and engage the fallback chain if the guest agent does not report Ready. Ignored + for non-Start operations. + :vartype verify_vm_agent_health: bool """ + optimizationPreference: Union[str, "OptimizationPreference"] + """Details that could optimize the user's request. Known values are: \"Cost\", \"Availability\", + and \"CostAvailabilityBalanced\".""" retryPolicy: "RetryPolicy" """Retry policy the user can pass.""" + verifyVmAgentHealth: bool + """When true on an executeStart request, run a post-Start VM agent health check and engage the + fallback chain if the guest agent does not report Ready. Ignored for non-Start operations.""" + + +class Resource(TypedDict, total=False): + """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: "SystemData" + """ + + id: str + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: str + """The name of the resource.""" + type: str + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + systemData: "SystemData" + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class FlexProperties(TypedDict, total=False): + """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["VmSizeProfile"] + :ivar os_type: The operating system type for the VMs. Required. Known values are: "Windows" and + "Linux". + :vartype os_type: Union[str, "OsType"] + :ivar priority_profile: The priority profile for VM allocation. Required. + :vartype priority_profile: "PriorityProfile" + :ivar zone_allocation_policy: The zone allocation policy for distributing VMs across + availability zones. + :vartype zone_allocation_policy: "ZoneAllocationPolicy" + :ivar min_capacity: The minimum number of VMs that must be successfully created for the request + to proceed. If fewer than this number can be allocated, the entire request is automatically + rejected. + :vartype min_capacity: int + """ + + vmSizeProfiles: Required[list["VmSizeProfile"]] + """The list of VM size profiles to use for flex creation. Required.""" + osType: Required[Union[str, "OsType"]] + """The operating system type for the VMs. Required. Known values are: \"Windows\" and \"Linux\".""" + priorityProfile: Required["PriorityProfile"] + """The priority profile for VM allocation. Required.""" + zoneAllocationPolicy: "ZoneAllocationPolicy" + """The zone allocation policy for distributing VMs across availability zones.""" + minCapacity: int + """The minimum number of VMs that must be successfully created for the request to proceed. If + fewer than this number can be allocated, the entire request is automatically rejected.""" class GetOperationStatusContent(TypedDict, total=False): @@ -110,33 +1136,2658 @@ class GetOperationStatusContent(TypedDict, total=False): """The list of operation ids to get the status of. Required.""" -class Resources(TypedDict, total=False): - """The resources needed for the user request. +class HardwareProfile(TypedDict, total=False): + """Specifies the hardware profile for the virtual machine. - :ivar ids: The resource ids used for the request. Required. - :vartype ids: list[str] + :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: "VmSizeProperties" """ - ids: Required[list[str]] - """The resource ids used for the request. Required.""" + vmSize: str + """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.""" + vmSizeProperties: "VmSizeProperties" + """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.""" -class RetryPolicy(TypedDict, total=False): - """The retry policy for the user request. +class HostEndpointSettings(TypedDict, total=False): + """Specifies particular host endpoint settings. - :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: Union[str, "ResourceOperationType"] + :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: Union[str, "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 """ - retryCount: int - """Retry count for user request.""" - retryWindowInMinutes: int - """Retry window in minutes for user request.""" - onFailureAction: Union[str, "ResourceOperationType"] - """Action to take on failure. Known values are: \"Unknown\", \"Start\", \"Deallocate\", - \"Hibernate\", \"Create\", and \"Delete\".""" + mode: Union[str, "Modes"] + """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\".""" + inVMAccessControlProfileReferenceId: str + """Specifies the InVMAccessControlProfileVersion resource id in the format of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}.""" + + +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: str + """The image publisher.""" + offer: str + """Specifies the offer of the platform image or marketplace image used to create the virtual + machine.""" + sku: str + """The image SKU.""" + version: str + """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.""" + sharedGalleryImageId: str + """Specified the shared gallery image unique id for vm deployment. This can be fetched from shared + gallery image GET call.""" + communityGalleryImageId: str + """Specified the community gallery image unique id for vm deployment. This can be fetched from + community gallery image GET call.""" + + +class KeyVaultKeyReference(TypedDict, total=False): + """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: "SubResource" + """ + + keyUrl: Required[str] + """The URL referencing a key encryption key in Key Vault. Required.""" + sourceVault: Required["SubResource"] + """The relative URL of the Key Vault containing the key. Required.""" + + +class KeyVaultSecretReference(TypedDict, total=False): + """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: "SubResource" + """ + + secretUrl: Required[str] + """The URL referencing a secret in a Key Vault. Required.""" + sourceVault: Required["SubResource"] + """The relative URL of the Key Vault containing the secret. Required.""" + + +class LaunchBulkInstancesOperationProperties(TypedDict, total=False): + """Details of the LaunchBulkInstancesOperation. + + :ivar created_time: The UTC time the LaunchBulkInstancesOperation resource was created. + :vartype created_time: str + :ivar provisioning_state: The status of the last operation. Known values are: "Creating", + "Succeeded", "Failed", "Deleting", and "Canceled". + :vartype provisioning_state: Union[str, "ProvisioningState"] + :ivar capacity: Total capacity to achieve. It can be in terms of VMs or vCPUs. Required. + :vartype capacity: int + :ivar capacity_type: Specifies capacity type for launching instances. It can be in terms of VMs + or vCPUs. Known values are: "VM" and "VCpu". + :vartype capacity_type: Union[str, "CapacityType"] + :ivar priority_profile: Configuration Options for Regular or Spot instances in + LaunchBulkInstancesOperation. Required. + :vartype priority_profile: "PriorityProfile" + :ivar vm_sizes_profile: List of VM sizes supported for LaunchBulkInstancesOperation. + :vartype vm_sizes_profile: list["VmSizeProfile"] + :ivar vm_attributes: Attributes to launch instances. + :vartype vm_attributes: "VMAttributes" + :ivar compute_profile: Compute Profile to configure the Virtual Machines. Required. + :vartype compute_profile: "ComputeProfile" + :ivar zone_allocation_policy: Zone Allocation Policy for launching instances. + :vartype zone_allocation_policy: "ZoneAllocationPolicy" + :ivar retry_policy: Retry policy the user can pass. + :vartype retry_policy: "RetryPolicy" + """ + + createdTime: str + """The UTC time the LaunchBulkInstancesOperation resource was created.""" + provisioningState: Union[str, "ProvisioningState"] + """The status of the last operation. Known values are: \"Creating\", \"Succeeded\", \"Failed\", + \"Deleting\", and \"Canceled\".""" + capacity: Required[int] + """Total capacity to achieve. It can be in terms of VMs or vCPUs. Required.""" + capacityType: Union[str, "CapacityType"] + """Specifies capacity type for launching instances. It can be in terms of VMs or vCPUs. Known + values are: \"VM\" and \"VCpu\".""" + priorityProfile: Required["PriorityProfile"] + """Configuration Options for Regular or Spot instances in LaunchBulkInstancesOperation. Required.""" + vmSizesProfile: list["VmSizeProfile"] + """List of VM sizes supported for LaunchBulkInstancesOperation.""" + vmAttributes: "VMAttributes" + """Attributes to launch instances.""" + computeProfile: Required["ComputeProfile"] + """Compute Profile to configure the Virtual Machines. Required.""" + zoneAllocationPolicy: "ZoneAllocationPolicy" + """Zone Allocation Policy for launching instances.""" + retryPolicy: "RetryPolicy" + """Retry policy the user can pass.""" + + +class LinuxConfiguration(TypedDict, total=False): + """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: "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: "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 + """ + + disablePasswordAuthentication: bool + """Specifies whether password authentication should be disabled.""" + ssh: "SshConfiguration" + """Specifies the ssh key configuration for a Linux OS.""" + provisionVMAgent: bool + """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.""" + patchSettings: "LinuxPatchSettings" + """[Preview Feature] Specifies settings related to VM Guest Patching on Linux.""" + enableVMAgentPlatformUpdates: bool + """Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default + value is false.""" + + +class LinuxPatchSettings(TypedDict, total=False): + """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: Union[str, "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: Union[str, "LinuxPatchAssessmentMode"] + :ivar automatic_by_platform_settings: Specifies additional settings for patch mode + AutomaticByPlatform in VM Guest Patching on Linux. + :vartype automatic_by_platform_settings: "LinuxVMGuestPatchAutomaticByPlatformSettings" + """ + + patchMode: Union[str, "LinuxVMGuestPatchMode"] + """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\".""" + assessmentMode: Union[str, "LinuxPatchAssessmentMode"] + """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\".""" + automaticByPlatformSettings: "LinuxVMGuestPatchAutomaticByPlatformSettings" + """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux.""" + + +class LinuxVMGuestPatchAutomaticByPlatformSettings(TypedDict, total=False): # 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: Union[str, "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 + """ + + rebootSetting: Union[str, "LinuxVMGuestPatchAutomaticByPlatformRebootSetting"] + """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known + values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\".""" + bypassPlatformSafetyChecksOnUserSchedule: bool + """Enables customer to schedule patching without accidental upgrades.""" + + +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: "SystemData" + """ + + +class LocationBasedBulkCreateCustom(ProxyResource): + """Location based BulkCreateCustom resource. The location is part of the resource path. + + :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: "SystemData" + :ivar properties: The resource-specific properties for this resource. + :vartype properties: "BulkCreateCustomProperties" + :ivar zones: Zones in which the BulkCreateCustom is available. + :vartype zones: list[str] + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: "ManagedServiceIdentity" + :ivar plan: Details of the resource plan. + :vartype plan: "Plan" + """ + + properties: "BulkCreateCustomProperties" + """The resource-specific properties for this resource.""" + zones: list[str] + """Zones in which the BulkCreateCustom is available.""" + tags: dict[str, str] + """Resource tags.""" + identity: "ManagedServiceIdentity" + """The managed service identities assigned to this resource.""" + plan: "Plan" + """Details of the resource plan.""" + + +class LocationBasedLaunchBulkInstancesOperation(ProxyResource): # pylint: disable=name-too-long + """Location based LaunchBulkInstancesOperation resource. The location is part of the resource + path. + + :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: "SystemData" + :ivar properties: The resource-specific properties for this resource. + :vartype properties: "LaunchBulkInstancesOperationProperties" + :ivar zones: Zones in which the LaunchBulkInstancesOperation is available. + :vartype zones: list[str] + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: "ManagedServiceIdentity" + :ivar plan: Details of the resource plan. + :vartype plan: "Plan" + """ + + properties: "LaunchBulkInstancesOperationProperties" + """The resource-specific properties for this resource.""" + zones: list[str] + """Zones in which the LaunchBulkInstancesOperation is available.""" + tags: dict[str, str] + """Resource tags.""" + identity: "ManagedServiceIdentity" + """The managed service identities assigned to this resource.""" + plan: "Plan" + """Details of the resource plan.""" + + +class ManagedDiskParametersContent(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: Union[str, "StorageAccountTypes"] + :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for + the managed disk. + :vartype disk_encryption_set: "DiskEncryptionSetParametersContent" + :ivar security_profile: Specifies the security profile for the managed disk. + :vartype security_profile: "VMDiskSecurityProfile" + """ + + storageAccountType: Union[str, "StorageAccountTypes"] + """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\".""" + diskEncryptionSet: "DiskEncryptionSetParametersContent" + """Specifies the customer managed disk encryption set resource id for the managed disk.""" + securityProfile: "VMDiskSecurityProfile" + """Specifies the security profile for the managed disk.""" + + +class ManagedServiceIdentity(TypedDict, total=False): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: Union[str, "ManagedServiceIdentityType"] + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, "UserAssignedIdentity"] + """ + + principalId: str + """The service principal ID of the system assigned identity. This property will only be provided + for a system assigned identity.""" + tenantId: str + """The tenant ID of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Required[Union[str, "ManagedServiceIdentityType"]] + """The type of managed identity assigned to this resource. Required. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + userAssignedIdentities: dict[str, "UserAssignedIdentity"] + """The identities assigned to this resource by the user.""" + + +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: "NetworkInterfaceReferenceProperties" + """ + + properties: "NetworkInterfaceReferenceProperties" + """Describes a network interface reference properties.""" + + +class NetworkInterfaceReferenceProperties(TypedDict, total=False): + """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: Union[str, "DeleteOptions"] + """ + + primary: bool + """Specifies the primary network interface in case the virtual machine has more than 1 network + interface.""" + deleteOption: Union[str, "DeleteOptions"] + """Specify what happens to the network interface when the VM is deleted. Known values are: + \"Delete\" and \"Detach\".""" + + +class NetworkProfile(TypedDict, total=False): + """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["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: Union[str, "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["VirtualMachineNetworkInterfaceConfiguration"] + """ + + networkInterfaces: list["NetworkInterfaceReference"] + """Specifies the list of resource Ids for the network interfaces associated with the virtual + machine.""" + networkApiVersion: Union[str, "NetworkApiVersion"] + """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\".""" + networkInterfaceConfigurations: list["VirtualMachineNetworkInterfaceConfiguration"] + """Specifies the networking configurations that will be used to create the virtual machine + networking resources.""" + + +class NotificationProperties(TypedDict, total=False): + """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: Union[str, "NotificationType"] + :ivar language: The language the notification should be sent on. Required. "en-us" + :vartype language: Union[str, "Language"] + :ivar disabled: Tells if the notification is enabled or not. + :vartype disabled: bool + """ + + destination: Required[str] + """Where the notification should be sent. For email, it should follow email format. Required.""" + type: Required[Union[str, "NotificationType"]] + """Type of notification to be sent. Required. \"Email\"""" + language: Required[Union[str, "Language"]] + """The language the notification should be sent on. Required. \"en-us\"""" + disabled: bool + """Tells if the notification is enabled or not.""" + + +class OSDisk(TypedDict, total=False): + """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: Union[str, "OperatingSystemTypes"] + :ivar encryption_settings: Specifies the encryption settings for the OS Disk. Minimum compute + api-version: 2015-06-15. + :vartype encryption_settings: "DiskEncryptionSettings" + :ivar name: The disk name. + :vartype name: str + :ivar vhd: The virtual hard disk. + :vartype vhd: "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: "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: Union[str, "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: "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: Union[str, "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: "ManagedDiskParametersContent" + :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: Union[str, "DiskDeleteOptionTypes"] + """ + + osType: Union[str, "OperatingSystemTypes"] + """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\".""" + encryptionSettings: "DiskEncryptionSettings" + """Specifies the encryption settings for the OS Disk. Minimum compute api-version: 2015-06-15.""" + name: str + """The disk name.""" + vhd: "VirtualHardDisk" + """The virtual hard disk.""" + image: "VirtualHardDisk" + """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: Union[str, "CachingTypes"] + """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\".""" + writeAcceleratorEnabled: bool + """Specifies whether writeAccelerator should be enabled or disabled on the disk.""" + diffDiskSettings: "DiffDiskSettings" + """Specifies the ephemeral Disk Settings for the operating system disk used by the virtual + machine.""" + createOption: Required[Union[str, "DiskCreateOptionTypes"]] + """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\".""" + diskSizeGB: int + """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.""" + managedDisk: "ManagedDiskParametersContent" + """The managed disk parameters.""" + deleteOption: Union[str, "DiskDeleteOptionTypes"] + """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\".""" + + +class OSImageNotificationProfile(TypedDict, total=False): + """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 + """ + + notBeforeTimeout: str + """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: bool + """Specifies whether the OS Image Scheduled event is enabled or disabled.""" + + +class OSProfile(TypedDict, total=False): + """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: "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: "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["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 + """ + + computerName: str + """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 + `_.""" + adminUsername: str + """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.""" + adminPassword: str + """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 + `_.""" + customData: str + """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 + `_.""" + windowsConfiguration: "WindowsConfiguration" + """Specifies Windows operating system settings on the virtual machine.""" + linuxConfiguration: "LinuxConfiguration" + """Specifies the Linux operating system settings on the virtual machine. For a list of supported + Linux distributions, see `Linux on Azure-Endorsed Distributions + `_.""" + secrets: list["VaultSecretGroup"] + """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 + `_.""" + allowExtensionOperations: bool + """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.""" + requireGuestProvisionSignal: bool + """Optional property which must either be set to True or omitted.""" + + +class OSProfileProvisioningData(TypedDict, total=False): + """Additional parameters for Reimaging Non-Ephemeral Virtual Machine. + + :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 `_. If + using cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during + creation `_. + :vartype custom_data: str + """ + + adminPassword: str + """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 + `_.""" + customData: str + """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 + `_. If using + cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during creation + `_.""" + + +class PatchSettings(TypedDict, total=False): + """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: Union[str, "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: Union[str, "WindowsPatchAssessmentMode"] + :ivar automatic_by_platform_settings: Specifies additional settings for patch mode + AutomaticByPlatform in VM Guest Patching on Windows. + :vartype automatic_by_platform_settings: "WindowsVMGuestPatchAutomaticByPlatformSettings" + """ + + patchMode: Union[str, "WindowsVMGuestPatchMode"] + """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\".""" + enableHotpatching: bool + """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'.""" + assessmentMode: Union[str, "WindowsPatchAssessmentMode"] + """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\".""" + automaticByPlatformSettings: "WindowsVMGuestPatchAutomaticByPlatformSettings" + """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on + Windows.""" + + +class Plan(TypedDict, total=False): + """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: Required[str] + """A user defined name of the 3rd Party Artifact that is being procured. Required.""" + publisher: Required[str] + """The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. Required.""" + product: Required[str] + """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.""" + promotionCode: str + """A publisher provided promotion code as provisioned in Data Market for the said + product/artifact.""" + version: str + """The version of the desired product/artifact.""" + + +class PriorityProfile(TypedDict, total=False): + """The priority profile for flex VM creation. + + :ivar type: The priority type for VM allocation. Known values are: "Regular" and "Spot". + :vartype type: Union[str, "PriorityType"] + :ivar max_price_per_vm: Price per hour of each Spot VM will never exceed this. Available from + 2026-04-06-preview. + :vartype max_price_per_vm: float + :ivar eviction_policy: Eviction Policy to follow when evicting Spot VMs. Available from + 2026-04-06-preview. Known values are: "Delete" and "Deallocate". + :vartype eviction_policy: Union[str, "EvictionPolicy"] + :ivar allocation_strategy: The allocation strategy for VM size selection. Known values are: + "LowestPrice", "Prioritized", and "CapacityOptimized". + :vartype allocation_strategy: Union[str, "AllocationStrategy"] + """ + + type: Union[str, "PriorityType"] + """The priority type for VM allocation. Known values are: \"Regular\" and \"Spot\".""" + maxPricePerVM: float + """Price per hour of each Spot VM will never exceed this. Available from 2026-04-06-preview.""" + evictionPolicy: Union[str, "EvictionPolicy"] + """Eviction Policy to follow when evicting Spot VMs. Available from 2026-04-06-preview. Known + values are: \"Delete\" and \"Deallocate\".""" + allocationStrategy: Union[str, "AllocationStrategy"] + """The allocation strategy for VM size selection. Known values are: \"LowestPrice\", + \"Prioritized\", and \"CapacityOptimized\".""" + + +class ProxyAgentSettings(TypedDict, total=False): + """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: Union[str, "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: "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: "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: bool + """Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual + machine scale set.""" + mode: Union[str, "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\".""" + keyIncarnationId: int + """Increase the value of this property allows users to reset the key used for securing + communication channel between guest and host.""" + wireServer: "HostEndpointSettings" + """Specifies the Wire Server endpoint settings while creating the virtual machine or virtual + machine scale set. Minimum api-version: 2024-03-01.""" + imds: "HostEndpointSettings" + """Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine + scale set. Minimum api-version: 2024-03-01.""" + addProxyAgentExtension: bool + """Specify whether to implicitly install the ProxyAgent Extension. This option is currently + applicable only for Linux Os.""" + + +class PublicIPAddressSku(TypedDict, total=False): + """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: Union[str, "PublicIPAddressSkuName"] + :ivar tier: Specify public IP sku tier. Known values are: "Regional" and "Global". + :vartype tier: Union[str, "PublicIPAddressSkuTier"] + """ + + name: Union[str, "PublicIPAddressSkuName"] + """Specify public IP sku name. Known values are: \"Basic\" and \"Standard\".""" + tier: Union[str, "PublicIPAddressSkuTier"] + """Specify public IP sku tier. Known values are: \"Regional\" and \"Global\".""" + + +class RecurringScheduledActionsExecutionParameters(TypedDict, total=False): # pylint: disable=name-too-long + """The execution parameters the scheduled action is supposed to follow. + + :ivar optimization_preference: Details that could optimize the user's request. Known values + are: "Cost", "Availability", and "CostAvailabilityBalanced". + :vartype optimization_preference: Union[str, "OptimizationPreference"] + :ivar retry_policy: Retry policy the user can pass. + :vartype retry_policy: "RecurringScheduledActionsRetryPolicy" + """ + + optimizationPreference: Union[str, "OptimizationPreference"] + """Details that could optimize the user's request. Known values are: \"Cost\", \"Availability\", + and \"CostAvailabilityBalanced\".""" + retryPolicy: "RecurringScheduledActionsRetryPolicy" + """Retry policy the user can pass.""" + + +class RecurringScheduledActionsRetryPolicy(TypedDict, total=False): + """Retry policy the scheduled action can pass. + + :ivar retry_count: Retry count for the request. + :vartype retry_count: int + :ivar retry_window_in_minutes: Retry window in minutes for the 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: Union[str, "RecurringScheduledActionsResourceOperationType"] + """ + + retryCount: int + """Retry count for the request.""" + retryWindowInMinutes: int + """Retry window in minutes for the request.""" + onFailureAction: Union[str, "RecurringScheduledActionsResourceOperationType"] + """Action to take on failure. Known values are: \"Unknown\", \"Start\", \"Deallocate\", + \"Hibernate\", \"Create\", and \"Delete\".""" + + +class ReimagePayload(TypedDict, total=False): + """Reimage payload with common profile and per-resource overrides. + + :ivar base_profile: Common reimage profile applied to all resources unless overridden. + :vartype base_profile: "VirtualMachineReimageParameters" + :ivar resource_overrides: Per-resource reimage overrides. + :vartype resource_overrides: list["ReimageResourceOverride"] + """ + + baseProfile: "VirtualMachineReimageParameters" + """Common reimage profile applied to all resources unless overridden.""" + resourceOverrides: list["ReimageResourceOverride"] + """Per-resource reimage overrides.""" + + +class ReimageResourceOverride(TypedDict, total=False): + """Per-resource override entry for reimage requests. + + :ivar resource_id: The Azure resource ID of the virtual machine for this override. Required. + :vartype resource_id: str + :ivar profile: Per-resource reimage profile override. Required. + :vartype profile: "VirtualMachineReimageParameters" + """ + + resourceId: Required[str] + """The Azure resource ID of the virtual machine for this override. Required.""" + profile: Required["VirtualMachineReimageParameters"] + """Per-resource reimage profile override. Required.""" + + +class ResourceAttachRequest(TypedDict, total=False): + """Request model to attach a list of scheduled action resources. + + :ivar resources: List of resources to be attached/patched. Required. + :vartype resources: list["ScheduledActionResourceInput"] + """ + + resources: Required[list["ScheduledActionResourceInput"]] + """List of resources to be attached/patched. Required.""" + + +class ResourceDetachRequest(TypedDict, total=False): + """Request model to detach a list of scheduled action resources. + + :ivar resources: List of resources to be detached. Required. + :vartype resources: list[str] + """ + + resources: Required[list[str]] + """List of resources to be detached. Required.""" + + +class ResourcePatchRequest(TypedDict, total=False): + """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["ScheduledActionResourceInput"] + """ + + resources: Required[list["ScheduledActionResourceInput"]] + """The list of resources we watch to patch. Required.""" + + +class ResourceProvisionPayload(TypedDict, total=False): + """Resource creation data model. + + :ivar base_profile: Bulk Actions Virtual Machine Profile object that contains VM properties + that are common across all VMs in this batch. + :vartype base_profile: dict[str, Any] + :ivar resource_overrides: Bulk Actions Virtual Machine Profile array, that contains VM + properties that should be overridden for each VM in the batch. + :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", the service will create a + name based on the prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1.. + :vartype resource_prefix: str + """ + + baseProfile: dict[str, Any] + """Bulk Actions Virtual Machine Profile object that contains VM properties that are common across + all VMs in this batch.""" + resourceOverrides: list[dict[str, Any]] + """Bulk Actions Virtual Machine Profile array, that contains VM properties that should be + overridden for each VM in the batch.""" + resourceCount: Required[int] + """Number of VMs to be created. Required.""" + resourcePrefix: str + """If resourceOverrides doesn't contain \"name\", the service will create a name based on the + prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1..""" + + +class ResourceProvisionVdiPayload(TypedDict, total=False): + """Resource creation data model with Flex properties for VDI scenarios. + + :ivar base_profile: Bulk Actions Virtual Machine Profile object that contains VM properties + that are common across all VMs in this batch. + :vartype base_profile: dict[str, Any] + :ivar resource_overrides: Bulk Actions Virtual Machine Profile array, that contains VM + properties that should be overridden for each VM in the batch. + :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", the service will create a + name based on the prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1.. + :vartype resource_prefix: str + :ivar flex_properties: Flex properties used for VDI resource creation scenarios. Required. + :vartype flex_properties: "FlexProperties" + """ + + baseProfile: dict[str, Any] + """Bulk Actions Virtual Machine Profile object that contains VM properties that are common across + all VMs in this batch.""" + resourceOverrides: list[dict[str, Any]] + """Bulk Actions Virtual Machine Profile array, that contains VM properties that should be + overridden for each VM in the batch.""" + resourceCount: Required[int] + """Number of VMs to be created. Required.""" + resourcePrefix: str + """If resourceOverrides doesn't contain \"name\", the service will create a name based on the + prefix and ResourceCount, e.g., resourceprefix-0, resourceprefix-1..""" + flexProperties: Required["FlexProperties"] + """Flex properties used for VDI resource creation scenarios. Required.""" + + +class Resources(TypedDict, total=False): + """The resources needed for the user request. + + :ivar ids: The resource ids used for the request. Required. + :vartype ids: list[str] + """ + + ids: Required[list[str]] + """The resource ids used for the request. Required.""" + + +class ResourcesWithContext(TypedDict, total=False): + """The resources needed for the user request with the context for tracking purposes. + + :ivar resources: The resource ids used for the request. Required. + :vartype resources: list["ResourceWithContext"] + """ + + resources: Required[list["ResourceWithContext"]] + """The resource ids used for the request. Required.""" + + +class ResourceWithContext(TypedDict, total=False): + """The resources needed for the user request with the resourceContext. + + :ivar resource_id: The resource ids used for the request. Required. + :vartype resource_id: str + :ivar resource_context: The operational context of the resourceId. Required. + :vartype resource_context: str + """ + + resourceId: Required[str] + """The resource ids used for the request. Required.""" + resourceContext: Required[str] + """The operational context of the resourceId. Required.""" + + +class RetryPolicy(TypedDict, total=False): + """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", "Delete", and "GetInstanceView". + :vartype on_failure_action: Union[str, "ResourceOperationType"] + """ + + retryCount: int + """Retry count for user request.""" + retryWindowInMinutes: int + """Retry window in minutes for user request.""" + onFailureAction: Union[str, "ResourceOperationType"] + """Action to take on failure. Known values are: \"Unknown\", \"Start\", \"Deallocate\", + \"Hibernate\", \"Create\", \"Delete\", and \"GetInstanceView\".""" + + +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: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: dict[str, str] + """Resource tags.""" + location: Required[str] + """The geo-location where the resource lives. Required.""" + + +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: "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: "ScheduledActionProperties" + """ + + properties: "ScheduledActionProperties" + """The resource-specific properties for this resource.""" + + +class ScheduledActionProperties(TypedDict, total=False): + """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: Union[str, "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: Union[str, "ScheduledActionType"] + :ivar start_time: The time which the scheduled action is supposed to start running. Required. + :vartype start_time: str + :ivar end_time: The time when the scheduled action is supposed to stop scheduling. + :vartype end_time: str + :ivar schedule: The schedule the scheduled action is supposed to follow. Required. + :vartype schedule: "ScheduledActionsSchedule" + :ivar notification_settings: The notification settings for the scheduled action. Required. + :vartype notification_settings: list["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: Union[str, "RecurringScheduledActionsProvisioningState"] + """ + + resourceType: Required[Union[str, "ResourceType"]] + """The type of resource the scheduled action is targeting. Required. Known values are: + \"VirtualMachine\" and \"VirtualMachineScaleSet\".""" + actionType: Required[Union[str, "ScheduledActionType"]] + """The action the scheduled action should perform in the resources. Required. Known values are: + \"Start\", \"Deallocate\", and \"Hibernate\".""" + startTime: Required[str] + """The time which the scheduled action is supposed to start running. Required.""" + endTime: str + """The time when the scheduled action is supposed to stop scheduling.""" + schedule: Required["ScheduledActionsSchedule"] + """The schedule the scheduled action is supposed to follow. Required.""" + notificationSettings: Required[list["NotificationProperties"]] + """The notification settings for the scheduled action. Required.""" + disabled: bool + """Tell if the scheduled action is disabled or not.""" + provisioningState: Union[str, "RecurringScheduledActionsProvisioningState"] + """The status of the last provisioning operation performed on the resource. Known values are: + \"Succeeded\", \"Failed\", \"Canceled\", and \"Deleting\".""" + + +class ScheduledActionResourceInput(TypedDict, total=False): + """Represents the writable fields of a scheduled action resource used in attach and patch + requests. + + :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["NotificationProperties"] + """ + + resourceId: Required[str] + """The ARM Id of the resource. + \"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}\". + Required.""" + notificationSettings: list["NotificationProperties"] + """The desired notification settings for the specified resource.""" + + +class ScheduledActionsSchedule(TypedDict, total=False): + """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: str + :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. If empty, + it means it will run on every week day. + :vartype requested_week_days: list[Union[str, "WeekDay"]] + :ivar requested_months: The months the scheduled action is supposed to run on. If empty, it + means it will run on every month. + :vartype requested_months: list[Union[str, "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. + :vartype requested_days_of_the_month: list[int] + :ivar execution_parameters: The execution parameters the scheduled action is supposed to + follow. + :vartype execution_parameters: "RecurringScheduledActionsExecutionParameters" + :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: Union[str, "RecurringScheduledActionsDeadlineType"] + """ + + scheduledTime: Required[str] + """The time the scheduled action is supposed to run on. Required.""" + timeZone: Required[str] + """The timezone the scheduled time is specified on. Required.""" + requestedWeekDays: list[Union[str, "WeekDay"]] + """The week days the scheduled action is supposed to run on. If empty, it means it will run on + every week day.""" + requestedMonths: list[Union[str, "Month"]] + """The months the scheduled action is supposed to run on. If empty, it means it will run on every + month.""" + requestedDaysOfTheMonth: list[int] + """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.""" + executionParameters: "RecurringScheduledActionsExecutionParameters" + """The execution parameters the scheduled action is supposed to follow.""" + deadlineType: Union[str, "RecurringScheduledActionsDeadlineType"] + """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\".""" + + +class ScheduledActionsScheduleUpdate(TypedDict, total=False): + """Schedule properties for update (PATCH). All properties are optional so individual fields can be + patched (merge semantics); omitting a property preserves the current value. + + :ivar scheduled_time: The time the scheduled action is supposed to run on. + :vartype scheduled_time: str + :ivar time_zone: The timezone the scheduled time is specified on. + :vartype time_zone: str + :ivar requested_week_days: The week days the scheduled action is supposed to run on. If empty, + it means it will run on every week day. + :vartype requested_week_days: list[Union[str, "WeekDay"]] + :ivar requested_months: The months the scheduled action is supposed to run on. If empty, it + means it will run on every month. + :vartype requested_months: list[Union[str, "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. + :vartype requested_days_of_the_month: list[int] + :ivar execution_parameters: The execution parameters the scheduled action is supposed to + follow. + :vartype execution_parameters: "RecurringScheduledActionsExecutionParameters" + :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: Union[str, "RecurringScheduledActionsDeadlineType"] + """ + + scheduledTime: str + """The time the scheduled action is supposed to run on.""" + timeZone: str + """The timezone the scheduled time is specified on.""" + requestedWeekDays: list[Union[str, "WeekDay"]] + """The week days the scheduled action is supposed to run on. If empty, it means it will run on + every week day.""" + requestedMonths: list[Union[str, "Month"]] + """The months the scheduled action is supposed to run on. If empty, it means it will run on every + month.""" + requestedDaysOfTheMonth: list[int] + """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.""" + executionParameters: "RecurringScheduledActionsExecutionParameters" + """The execution parameters the scheduled action is supposed to follow.""" + deadlineType: Union[str, "RecurringScheduledActionsDeadlineType"] + """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\".""" + + +class ScheduledActionUpdate(TypedDict, total=False): + """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: "ScheduledActionUpdateProperties" + """ + + tags: dict[str, str] + """Resource tags.""" + properties: "ScheduledActionUpdateProperties" + """The resource-specific properties for this resource.""" + + +class ScheduledActionUpdateProperties(TypedDict, total=False): + """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: Union[str, "ResourceType"] + :ivar action_type: The action the scheduled action should perform in the resources. Known + values are: "Start", "Deallocate", and "Hibernate". + :vartype action_type: Union[str, "ScheduledActionType"] + :ivar start_time: The time which the scheduled action is supposed to start running. + :vartype start_time: str + :ivar end_time: The time when the scheduled action is supposed to stop scheduling. + :vartype end_time: str + :ivar schedule: The schedule the scheduled action is supposed to follow. + :vartype schedule: "ScheduledActionsScheduleUpdate" + :ivar notification_settings: The notification settings for the scheduled action. + :vartype notification_settings: list["NotificationProperties"] + :ivar disabled: Tell if the scheduled action is disabled or not. + :vartype disabled: bool + """ + + resourceType: Union[str, "ResourceType"] + """The type of resource the scheduled action is targeting. Known values are: \"VirtualMachine\" + and \"VirtualMachineScaleSet\".""" + actionType: Union[str, "ScheduledActionType"] + """The action the scheduled action should perform in the resources. Known values are: \"Start\", + \"Deallocate\", and \"Hibernate\".""" + startTime: str + """The time which the scheduled action is supposed to start running.""" + endTime: str + """The time when the scheduled action is supposed to stop scheduling.""" + schedule: "ScheduledActionsScheduleUpdate" + """The schedule the scheduled action is supposed to follow.""" + notificationSettings: list["NotificationProperties"] + """The notification settings for the scheduled action.""" + disabled: bool + """Tell if the scheduled action is disabled or not.""" + + +class ScheduledEventsAdditionalPublishingTargets(TypedDict, total=False): # 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: "EventGridAndResourceGraph" + """ + + eventGridAndResourceGraph: "EventGridAndResourceGraph" + """The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event + setting.""" + + +class ScheduledEventsPolicy(TypedDict, total=False): + """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: "UserInitiatedRedeploy" + :ivar user_initiated_reboot: The configuration parameters used while creating + userInitiatedReboot scheduled event setting creation. + :vartype user_initiated_reboot: "UserInitiatedReboot" + :ivar scheduled_events_additional_publishing_targets: The configuration parameters used while + publishing scheduledEventsAdditionalPublishingTargets. + :vartype scheduled_events_additional_publishing_targets: + "ScheduledEventsAdditionalPublishingTargets" + :ivar all_instances_down: The configuration parameters used while creating AllInstancesDown + scheduled event setting creation. + :vartype all_instances_down: "AllInstancesDown" + """ + + userInitiatedRedeploy: "UserInitiatedRedeploy" + """The configuration parameters used while creating userInitiatedRedeploy scheduled event setting + creation.""" + userInitiatedReboot: "UserInitiatedReboot" + """The configuration parameters used while creating userInitiatedReboot scheduled event setting + creation.""" + scheduledEventsAdditionalPublishingTargets: "ScheduledEventsAdditionalPublishingTargets" + """The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets.""" + allInstancesDown: "AllInstancesDown" + """The configuration parameters used while creating AllInstancesDown scheduled event setting + creation.""" + + +class ScheduledEventsProfile(TypedDict, total=False): + """Profile for the scheduled events. + + :ivar terminate_notification_profile: Specifies Terminate Scheduled Event related + configurations. + :vartype terminate_notification_profile: "TerminateNotificationProfile" + :ivar os_image_notification_profile: Specifies OS Image Scheduled Event related configurations. + :vartype os_image_notification_profile: "OSImageNotificationProfile" + """ + + terminateNotificationProfile: "TerminateNotificationProfile" + """Specifies Terminate Scheduled Event related configurations.""" + osImageNotificationProfile: "OSImageNotificationProfile" + """Specifies OS Image Scheduled Event related configurations.""" + + +class SecurityProfile(TypedDict, total=False): + """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: "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: Union[str, "SecurityTypes"] + :ivar encryption_identity: Specifies the Managed Identity used by ADE to get access token for + keyvault operations. + :vartype encryption_identity: "EncryptionIdentity" + :ivar proxy_agent_settings: Specifies ProxyAgent settings while creating the virtual machine. + Minimum compute api-version: 2023-09-01. + :vartype proxy_agent_settings: "ProxyAgentSettings" + """ + + uefiSettings: "UefiSettings" + """Specifies the security settings like secure boot and vTPM used while creating the virtual + machine. Minimum compute api-version: 2020-12-01.""" + encryptionAtHost: bool + """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.""" + securityType: Union[str, "SecurityTypes"] + """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\".""" + encryptionIdentity: "EncryptionIdentity" + """Specifies the Managed Identity used by ADE to get access token for keyvault operations.""" + proxyAgentSettings: "ProxyAgentSettings" + """Specifies ProxyAgent settings while creating the virtual machine. Minimum compute api-version: + 2023-09-01.""" + + +class SshConfiguration(TypedDict, total=False): + """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["SshPublicKey"] + """ + + publicKeys: list["SshPublicKey"] + """The list of SSH public keys used to authenticate with linux based VMs.""" + + +class SshPublicKey(TypedDict, total=False): + """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: str + """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.""" + keyData: str + """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 + `_).""" + + +class StorageProfile(TypedDict, total=False): + """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: "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: "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["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: Union[str, "DiskControllerTypes"] + """ + + imageReference: "ImageReference" + """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.""" + osDisk: "OSDisk" + """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 + `_.""" + dataDisks: list["DataDisk"] + """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 + `_.""" + diskControllerType: Union[str, "DiskControllerTypes"] + """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\".""" + + +class SystemData(TypedDict, total=False): + """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: Union[str, "CreatedByType"] + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: str + :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: Union[str, "CreatedByType"] + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: str + """ + + createdBy: str + """The identity that created the resource.""" + createdByType: Union[str, "CreatedByType"] + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + createdAt: str + """The timestamp of resource creation (UTC).""" + lastModifiedBy: str + """The identity that last modified the resource.""" + lastModifiedByType: Union[str, "CreatedByType"] + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + lastModifiedAt: str + """The timestamp of resource last modification (UTC).""" + + +class TerminateNotificationProfile(TypedDict, total=False): + """Profile properties for the Terminate Scheduled event. + + :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 + """ + + notBeforeTimeout: str + """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: bool + """Specifies whether the Terminate Scheduled event is enabled or disabled.""" + + +class UefiSettings(TypedDict, total=False): + """Specifies the security settings like secure boot and vTPM used while creating the virtual + machine. Minimum api-version: 2020-12-01. + + :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 + """ + + secureBootEnabled: bool + """Specifies whether secure boot should be enabled on the virtual machine. Minimum compute + api-version: 2020-12-01.""" + vTpmEnabled: bool + """Specifies whether vTPM should be enabled on the virtual machine. Minimum compute api-version: + 2020-12-01.""" + + +class UserAssignedIdentitiesValue(TypedDict, total=False): + """UserAssignedIdentitiesValue. + + :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 + """ + + principalId: str + """The principal id of user assigned identity.""" + clientId: str + """The client id of user assigned identity.""" + + +class UserAssignedIdentity(TypedDict, total=False): + """User assigned identity properties. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + principalId: str + """The principal ID of the assigned identity.""" + clientId: str + """The client ID of the assigned identity.""" + + +class UserInitiatedReboot(TypedDict, total=False): + """Specifies Reboot related Scheduled Event related configurations. + + :ivar user_initiated_reboot_automatically_approve: Specifies Reboot Scheduled Event related + configurations. + :vartype user_initiated_reboot_automatically_approve: bool + """ + + automaticallyApprove: bool + """Specifies Reboot Scheduled Event related configurations.""" + + +class UserInitiatedRedeploy(TypedDict, total=False): + """Specifies Redeploy related Scheduled Event related configurations. + + :ivar user_initiated_redeploy_automatically_approve: Specifies Redeploy Scheduled Event related + configurations. + :vartype user_initiated_redeploy_automatically_approve: bool + """ + + automaticallyApprove: bool + """Specifies Redeploy Scheduled Event related configurations.""" + + +class VaultCertificate(TypedDict, total=False): + """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 + """ + + certificateUrl: str + """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 + `_.""" + certificateStore: str + """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.""" + + +class VaultSecretGroup(TypedDict, total=False): + """Describes a set of certificates which are all in the same Key Vault. + + :ivar source_vault: The relative URL of the Key Vault containing all of the certificates in + VaultCertificates. + :vartype source_vault: "SubResource" + :ivar vault_certificates: The list of key vault references in SourceVault which contain + certificates. + :vartype vault_certificates: list["VaultCertificate"] + """ + + sourceVault: "SubResource" + """The relative URL of the Key Vault containing all of the certificates in VaultCertificates.""" + vaultCertificates: list["VaultCertificate"] + """The list of key vault references in SourceVault which contain certificates.""" + + +class VirtualHardDisk(TypedDict, total=False): + """Describes the uri of a disk. + + :ivar uri: Specifies the virtual hard disk's uri. + :vartype uri: str + """ + + uri: str + """Specifies the virtual hard disk's uri.""" + + +class VirtualMachineIdentity(TypedDict, total=False): + """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: Union[str, "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, "UserAssignedIdentitiesValue"] + """ + + principalId: str + """The principal id of virtual machine identity. This property will only be provided for a system + assigned identity.""" + tenantId: str + """The tenant id associated with the virtual machine. This property will only be provided for a + system assigned identity.""" + type: Union[str, "ResourceIdentityType"] + """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\".""" + userAssignedIdentities: dict[str, "UserAssignedIdentitiesValue"] + """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}'.""" + + +class VirtualMachineIpTag(TypedDict, total=False): + """Contains the IP tag associated with the public IP address. + + :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 + """ + + ipTagType: str + """IP tag type. Example: FirstPartyUsage.""" + tag: str + """IP tag associated with the public IP. Example: SQL, Storage etc.""" + + +class VirtualMachineNetworkInterfaceConfiguration(TypedDict, total=False): # pylint: disable=name-too-long + """Describes a virtual machine network interface configurations. + + :ivar name: The network interface configuration name. Required. + :vartype name: str + :ivar properties: Describes a virtual machine network profile's IP configuration. + :vartype properties: "VirtualMachineNetworkInterfaceConfigurationProperties" + :ivar tags: Resource tags applied to the networkInterface address created by this + NetworkInterfaceConfiguration. + :vartype tags: dict[str, str] + """ + + name: Required[str] + """The network interface configuration name. Required.""" + properties: "VirtualMachineNetworkInterfaceConfigurationProperties" + """Describes a virtual machine network profile's IP configuration.""" + tags: dict[str, str] + """Resource tags applied to the networkInterface address created by this + NetworkInterfaceConfiguration.""" + + +class VirtualMachineNetworkInterfaceConfigurationProperties(TypedDict, total=False): # 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: Union[str, "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: "SubResource" + :ivar dns_settings: The dns settings to be applied on the network interfaces. + :vartype dns_settings: "VirtualMachineNetworkInterfaceDnsSettingsConfiguration" + :ivar ip_configurations: Specifies the IP configurations of the network interface. Required. + :vartype ip_configurations: list["VirtualMachineNetworkInterfaceIPConfiguration"] + :ivar dscp_configuration: The DSCP configuration for the network interface. + :vartype dscp_configuration: "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: Union[str, "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: Union[str, "NetworkInterfaceAuxiliarySku"] + """ + + primary: bool + """Specifies the primary network interface in case the virtual machine has more than 1 network + interface.""" + deleteOption: Union[str, "DeleteOptions"] + """Specify what happens to the network interface when the VM is deleted. Known values are: + \"Delete\" and \"Detach\".""" + enableAcceleratedNetworking: bool + """Specifies whether the network interface is accelerated networking-enabled.""" + disableTcpStateTracking: bool + """Specifies whether the network interface is disabled for tcp state tracking.""" + enableFpga: bool + """Specifies whether the network interface is FPGA networking-enabled.""" + enableIPForwarding: bool + """Whether IP forwarding enabled on this NIC.""" + networkSecurityGroup: "SubResource" + """The network security group.""" + dnsSettings: "VirtualMachineNetworkInterfaceDnsSettingsConfiguration" + """The dns settings to be applied on the network interfaces.""" + ipConfigurations: Required[list["VirtualMachineNetworkInterfaceIPConfiguration"]] + """Specifies the IP configurations of the network interface. Required.""" + dscpConfiguration: "SubResource" + """The DSCP configuration for the network interface.""" + auxiliaryMode: Union[str, "NetworkInterfaceAuxiliaryMode"] + """Specifies whether the Auxiliary mode is enabled for the Network Interface resource. Known + values are: \"None\", \"AcceleratedConnections\", and \"Floating\".""" + auxiliarySku: Union[str, "NetworkInterfaceAuxiliarySku"] + """Specifies whether the Auxiliary sku is enabled for the Network Interface resource. Known values + are: \"None\", \"A1\", \"A2\", \"A4\", and \"A8\".""" + + +class VirtualMachineNetworkInterfaceDnsSettingsConfiguration(TypedDict, total=False): # pylint: disable=name-too-long + """Describes a virtual machines network configuration's DNS settings. + + :ivar dns_servers: List of DNS servers IP addresses. + :vartype dns_servers: list[str] + """ + + dnsServers: list[str] + """List of DNS servers IP addresses.""" + + +class VirtualMachineNetworkInterfaceIPConfiguration(TypedDict, total=False): # pylint: disable=name-too-long + """Describes a virtual machine network profile's IP configuration. + + :ivar name: The IP configuration name. Required. + :vartype name: str + :ivar properties: Describes a virtual machine network interface IP configuration properties. + :vartype properties: "VirtualMachineNetworkInterfaceIPConfigurationProperties" + """ + + name: Required[str] + """The IP configuration name. Required.""" + properties: "VirtualMachineNetworkInterfaceIPConfigurationProperties" + """Describes a virtual machine network interface IP configuration properties.""" + + +class VirtualMachineNetworkInterfaceIPConfigurationProperties(TypedDict, total=False): # pylint: disable=name-too-long + """Describes a virtual machine network interface IP configuration properties. + + :ivar subnet: Specifies the identifier of the subnet. + :vartype subnet: "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: "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: Union[str, "IPVersions"] + :ivar application_security_groups: Specifies an array of references to application security + group. + :vartype application_security_groups: list["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["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["SubResource"] + """ + + subnet: "SubResource" + """Specifies the identifier of the subnet.""" + primary: bool + """Specifies the primary network interface in case the virtual machine has more than 1 network + interface.""" + publicIPAddressConfiguration: "VirtualMachinePublicIPAddressConfiguration" + """The publicIPAddressConfiguration.""" + privateIPAddressVersion: Union[str, "IPVersions"] + """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\".""" + applicationSecurityGroups: list["SubResource"] + """Specifies an array of references to application security group.""" + applicationGatewayBackendAddressPools: list["SubResource"] + """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.""" + loadBalancerBackendAddressPools: list["SubResource"] + """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].""" + + +class VirtualMachinePublicIPAddressConfiguration(TypedDict, total=False): # pylint: disable=name-too-long + """Describes a virtual machines IP Configuration's PublicIPAddress configuration. + + :ivar name: The publicIP address configuration name. Required. + :vartype name: str + :ivar properties: Describes a virtual machines IP Configuration's PublicIPAddress + configuration. + :vartype properties: "VirtualMachinePublicIPAddressConfigurationProperties" + :ivar sku: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + :vartype sku: "PublicIPAddressSku" + :ivar tags: Resource tags applied to the publicIP address created by this + PublicIPAddressConfiguration. + :vartype tags: dict[str, str] + """ + + name: Required[str] + """The publicIP address configuration name. Required.""" + properties: "VirtualMachinePublicIPAddressConfigurationProperties" + """Describes a virtual machines IP Configuration's PublicIPAddress configuration.""" + sku: "PublicIPAddressSku" + """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.""" + tags: dict[str, str] + """Resource tags applied to the publicIP address created by this PublicIPAddressConfiguration.""" + + +class VirtualMachinePublicIPAddressConfigurationProperties(TypedDict, total=False): # 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: Union[str, "DeleteOptions"] + :ivar dns_settings: The dns settings to be applied on the publicIP addresses . + :vartype dns_settings: "VirtualMachinePublicIPAddressDnsSettingsConfiguration" + :ivar ip_tags: The list of IP tags associated with the public IP address. + :vartype ip_tags: list["VirtualMachineIpTag"] + :ivar public_ip_prefix: The PublicIPPrefix from which to allocate publicIP addresses. + :vartype public_ip_prefix: "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: Union[str, "IPVersions"] + :ivar public_ip_allocation_method: Specify the public IP allocation type. Known values are: + "Dynamic" and "Static". + :vartype public_ip_allocation_method: Union[str, "PublicIPAllocationMethod"] + """ + + idleTimeoutInMinutes: int + """The idle timeout of the public IP address.""" + deleteOption: Union[str, "DeleteOptions"] + """Specify what happens to the public IP address when the VM is deleted. Known values are: + \"Delete\" and \"Detach\".""" + dnsSettings: "VirtualMachinePublicIPAddressDnsSettingsConfiguration" + """The dns settings to be applied on the publicIP addresses .""" + ipTags: list["VirtualMachineIpTag"] + """The list of IP tags associated with the public IP address.""" + publicIPPrefix: "SubResource" + """The PublicIPPrefix from which to allocate publicIP addresses.""" + publicIPAddressVersion: Union[str, "IPVersions"] + """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\".""" + publicIPAllocationMethod: Union[str, "PublicIPAllocationMethod"] + """Specify the public IP allocation type. Known values are: \"Dynamic\" and \"Static\".""" + + +class VirtualMachinePublicIPAddressDnsSettingsConfiguration(TypedDict, total=False): # pylint: disable=name-too-long + """Describes a virtual machines network configuration's DNS settings. + + :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: Union[str, "DomainNameLabelScopeTypes"] + """ + + domainNameLabel: Required[str] + """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.""" + domainNameLabelScope: Union[str, "DomainNameLabelScopeTypes"] + """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\".""" + + +class VirtualMachineReimageParameters(TypedDict, total=False): + """Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be + reimaged. + + :ivar temp_disk: Specifies whether to reimage temp disk. Default value: false. Note: This temp + disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. + :vartype temp_disk: bool + :ivar exact_version: Specifies in decimal number, the version the OS disk should be reimaged + to. If exact version is not provided, the OS disk is reimaged to the existing version of OS + Disk. + :vartype exact_version: str + :ivar os_profile: Specifies information required for reimaging the non-ephemeral OS disk. + :vartype os_profile: "OSProfileProvisioningData" + """ + + tempDisk: bool + """Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage + parameter is only supported for VM/VMSS with Ephemeral OS disk.""" + exactVersion: str + """Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is + not provided, the OS disk is reimaged to the existing version of OS Disk.""" + osProfile: "OSProfileProvisioningData" + """Specifies information required for reimaging the non-ephemeral OS disk.""" + + +class VMAttributeMinMaxDouble(TypedDict, total=False): + """VMAttributes using double values. + + :ivar min: Minimum value. If not specified, no minimum filter is applied. + :vartype min: float + :ivar max: Maximum value. Must be greater than zero. Double.MaxValue(1.7976931348623157E+308). + :vartype max: float + """ + + min: float + """Minimum value. If not specified, no minimum filter is applied.""" + max: float + """Maximum value. Must be greater than zero. Double.MaxValue(1.7976931348623157E+308).""" + + +class VMAttributeMinMaxInteger(TypedDict, total=False): + """While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 + (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes. + + :ivar min: Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified. + :vartype min: int + :ivar max: Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified. + :vartype max: int + """ + + min: int + """Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.""" + max: int + """Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.""" + + +class VMAttributes(TypedDict, total=False): + """VMAttributes that will be used to filter VMSizes which will be used to launch instances. + + :ivar v_cpu_count: The range of vCpuCount specified from Min to Max. Must be specified if + VMAttributes are specified, either Min or Max is required if specified. Required. + :vartype v_cpu_count: "VMAttributeMinMaxInteger" + :ivar memory_in_gi_b: The range of memory specified from Min to Max. Must be specified if + VMAttributes are specified, either Min or Max is required if specified. Required. + :vartype memory_in_gi_b: "VMAttributeMinMaxDouble" + :ivar architecture_types: The VM architecture types specified as a list. Must be specified if + VMAttributes are specified. Must be compatible with image used. Required. + :vartype architecture_types: list[Union[str, "ArchitectureType"]] + :ivar memory_in_gi_b_per_v_cpu: The range of memory in GiB per vCPU specified from min to max. + Optional parameter. Either Min or Max is required if specified. + :vartype memory_in_gi_b_per_v_cpu: "VMAttributeMinMaxDouble" + :ivar local_storage_support: Specifies whether the VMSize supporting local storage should be + used to launch instances or not. Included - Default if not specified as most Azure VMs support + local storage. Known values are: "Excluded", "Included", and "Required". + :vartype local_storage_support: Union[str, "VMAttributeSupport"] + :ivar local_storage_in_gi_b: LocalStorageSupport should be set to "Included" or "Required" to + use this VMAttribute. If localStorageSupport is "Excluded", this VMAttribute can not be used. + :vartype local_storage_in_gi_b: "VMAttributeMinMaxDouble" + :ivar local_storage_disk_types: The local storage disk types specified as a list. + LocalStorageSupport should be set to "Included" or "Required" to use this VMAttribute. If + localStorageSupport is "Excluded", this VMAttribute can not be used. + :vartype local_storage_disk_types: list[Union[str, "LocalStorageDiskType"]] + :ivar data_disk_count: The range of data disk count specified from Min to Max. Optional + parameter. Either Min or Max is required if specified. + :vartype data_disk_count: "VMAttributeMinMaxInteger" + :ivar network_interface_count: The range of network interface count specified from Min to Max. + Optional parameter. Either Min or Max is required if specified. + :vartype network_interface_count: "VMAttributeMinMaxInteger" + :ivar network_bandwidth_in_mbps: The range of network bandwidth in Mbps specified from Min to + Max. Optional parameter. Either Min or Max is required if specified. + :vartype network_bandwidth_in_mbps: "VMAttributeMinMaxDouble" + :ivar rdma_support: Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) + should be used to build launch instances or not. Known values are: "Excluded", "Included", and + "Required". + :vartype rdma_support: Union[str, "VMAttributeSupport"] + :ivar rdma_network_interface_count: The range of RDMA (Remote Direct Memory Access) network + interface count specified from Min to Max. Optional parameter. Either Min or Max is required if + specified. rdmaSupport should be set to "Included" or "Required" to use this VMAttribute. If + rdmaSupport is "Excluded", this VMAttribute can not be used. + :vartype rdma_network_interface_count: "VMAttributeMinMaxInteger" + :ivar accelerator_support: Specifies whether the VMSize supporting accelerator should be used + to launch instances or not. acceleratorSupport should be set to "Included" or "Required" to use + this VMAttribute. If acceleratorSupport is "Excluded", this VMAttribute can not be used. Known + values are: "Excluded", "Included", and "Required". + :vartype accelerator_support: Union[str, "VMAttributeSupport"] + :ivar accelerator_manufacturers: The accelerator manufacturers specified as a list. + acceleratorSupport should be set to "Included" or "Required" to use this VMAttribute. If + acceleratorSupport is "Excluded", this VMAttribute can not be used. + :vartype accelerator_manufacturers: list[Union[str, "AcceleratorManufacturer"]] + :ivar accelerator_types: The accelerator types specified as a list. acceleratorSupport should + be set to "Included" or "Required" to use this VMAttribute. If acceleratorSupport is + "Excluded", this VMAttribute can not be used. + :vartype accelerator_types: list[Union[str, "AcceleratorType"]] + :ivar accelerator_count: The range of accelerator count specified from min to max. Optional + parameter. Either Min or Max is required if specified. acceleratorSupport should be set to + "Included" or "Required" to use this VMAttribute. If acceleratorSupport is "Excluded", this + VMAttribute can not be used. + :vartype accelerator_count: "VMAttributeMinMaxInteger" + :ivar vm_categories: The VM category specified as a list. Optional parameter. + :vartype vm_categories: list[Union[str, "VMCategory"]] + :ivar cpu_manufacturers: The VM CPU manufacturers specified as a list. Optional parameter. + :vartype cpu_manufacturers: list[Union[str, "CpuManufacturer"]] + :ivar hyper_v_generations: The hyperV generations specified as a list. Optional parameter. + :vartype hyper_v_generations: list[Union[str, "HyperVGeneration"]] + :ivar burstable_support: Specifies whether the VMSize supporting burstable capability should be + used to launch instances or not. Known values are: "Excluded", "Included", and "Required". + :vartype burstable_support: Union[str, "VMAttributeSupport"] + :ivar allowed_vm_sizes: Specifies which VMSizes should be allowed while filtering on + VMAttributes. Cannot be specified together with excludedVMSizes. Maximum of 10 VM sizes + allowed. Optional parameter. + :vartype allowed_vm_sizes: list[str] + :ivar excluded_vm_sizes: Specifies which VMSizes should be excluded while filtering on + VMAttributes. Cannot be specified together with allowedVMSizes. Maximum of 10 VM sizes allowed. + Optional parameter. + :vartype excluded_vm_sizes: list[str] + """ + + vCpuCount: Required["VMAttributeMinMaxInteger"] + """The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are + specified, either Min or Max is required if specified. Required.""" + memoryInGiB: Required["VMAttributeMinMaxDouble"] + """The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, + either Min or Max is required if specified. Required.""" + architectureTypes: Required[list[Union[str, "ArchitectureType"]]] + """The VM architecture types specified as a list. Must be specified if VMAttributes are specified. + Must be compatible with image used. Required.""" + memoryInGiBPerVCpu: "VMAttributeMinMaxDouble" + """The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min + or Max is required if specified.""" + localStorageSupport: Union[str, "VMAttributeSupport"] + """Specifies whether the VMSize supporting local storage should be used to launch instances or + not. Included - Default if not specified as most Azure VMs support local storage. Known values + are: \"Excluded\", \"Included\", and \"Required\".""" + localStorageInGiB: "VMAttributeMinMaxDouble" + """LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If + localStorageSupport is \"Excluded\", this VMAttribute can not be used.""" + localStorageDiskTypes: list[Union[str, "LocalStorageDiskType"]] + """The local storage disk types specified as a list. LocalStorageSupport should be set to + \"Included\" or \"Required\" to use this VMAttribute. If localStorageSupport is \"Excluded\", + this VMAttribute can not be used.""" + dataDiskCount: "VMAttributeMinMaxInteger" + """The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max + is required if specified.""" + networkInterfaceCount: "VMAttributeMinMaxInteger" + """The range of network interface count specified from Min to Max. Optional parameter. Either Min + or Max is required if specified.""" + networkBandwidthInMbps: "VMAttributeMinMaxDouble" + """The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either + Min or Max is required if specified.""" + rdmaSupport: Union[str, "VMAttributeSupport"] + """Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to + build launch instances or not. Known values are: \"Excluded\", \"Included\", and \"Required\".""" + rdmaNetworkInterfaceCount: "VMAttributeMinMaxInteger" + """The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to + Max. Optional parameter. Either Min or Max is required if specified. rdmaSupport should be set + to \"Included\" or \"Required\" to use this VMAttribute. If rdmaSupport is \"Excluded\", this + VMAttribute can not be used.""" + acceleratorSupport: Union[str, "VMAttributeSupport"] + """Specifies whether the VMSize supporting accelerator should be used to launch instances or not. + acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. If + acceleratorSupport is \"Excluded\", this VMAttribute can not be used. Known values are: + \"Excluded\", \"Included\", and \"Required\".""" + acceleratorManufacturers: list[Union[str, "AcceleratorManufacturer"]] + """The accelerator manufacturers specified as a list. acceleratorSupport should be set to + \"Included\" or \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", + this VMAttribute can not be used.""" + acceleratorTypes: list[Union[str, "AcceleratorType"]] + """The accelerator types specified as a list. acceleratorSupport should be set to \"Included\" or + \"Required\" to use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute + can not be used.""" + acceleratorCount: "VMAttributeMinMaxInteger" + """The range of accelerator count specified from min to max. Optional parameter. Either Min or Max + is required if specified. acceleratorSupport should be set to \"Included\" or \"Required\" to + use this VMAttribute. If acceleratorSupport is \"Excluded\", this VMAttribute can not be used.""" + vmCategories: list[Union[str, "VMCategory"]] + """The VM category specified as a list. Optional parameter.""" + cpuManufacturers: list[Union[str, "CpuManufacturer"]] + """The VM CPU manufacturers specified as a list. Optional parameter.""" + hyperVGenerations: list[Union[str, "HyperVGeneration"]] + """The hyperV generations specified as a list. Optional parameter.""" + burstableSupport: Union[str, "VMAttributeSupport"] + """Specifies whether the VMSize supporting burstable capability should be used to launch instances + or not. Known values are: \"Excluded\", \"Included\", and \"Required\".""" + allowedVMSizes: list[str] + """Specifies which VMSizes should be allowed while filtering on VMAttributes. Cannot be specified + together with excludedVMSizes. Maximum of 10 VM sizes allowed. Optional parameter.""" + excludedVMSizes: list[str] + """Specifies which VMSizes should be excluded while filtering on VMAttributes. Cannot be specified + together with allowedVMSizes. Maximum of 10 VM sizes allowed. Optional parameter.""" + + +class VMDiskSecurityProfile(TypedDict, total=False): + """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: Union[str, "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: "DiskEncryptionSetParametersContent" + """ + + securityEncryptionType: Union[str, "SecurityEncryptionTypes"] + """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\".""" + diskEncryptionSet: "DiskEncryptionSetParametersContent" + """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.""" + + +class VMGalleryApplication(TypedDict, total=False): + """Specifies the required information to reference a compute gallery application version. + + :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 + """ + + tags: str + """Optional, Specifies a passthrough value for more generic context.""" + order: int + """Optional, Specifies the order in which the packages have to be installed.""" + packageReferenceId: Required[str] + """Specifies the GalleryApplicationVersion resource id on the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. + Required.""" + configurationReference: str + """Optional, Specifies the uri to an azure blob that will replace the default configuration for + the package if provided.""" + treatFailureAsDeploymentFailure: bool + """Optional, If true, any failure for any operation in the VmApplication will fail the deployment.""" + enableAutomaticUpgrade: bool + """If set to true, when a new Gallery Application version is available in PIR/SIG, it will be + automatically updated for the VM/VMSS.""" + + +class VmSizeProfile(TypedDict, total=False): + """A VM size profile with a name and rank for flex VM creation. + + :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. Required. + :vartype rank: int + """ + + name: Required[str] + """The name of the VM size, eg Standard_D2ads_v5. Required.""" + rank: Required[int] + """The rank of this VM size in the priority order. Required.""" + + +class VmSizeProperties(TypedDict, total=False): + """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 + """ + + vCpusAvailable: int + """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 + `_.""" + vCpusPerCore: int + """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.**.""" + + +class WindowsConfiguration(TypedDict, total=False): + """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["AdditionalUnattendContent"] + :ivar patch_settings: [Preview Feature] Specifies settings related to VM Guest Patching on + Windows. + :vartype patch_settings: "PatchSettings" + :ivar win_rm: Specifies the Windows Remote Management listeners. This enables remote Windows + PowerShell. + :vartype win_rm: "WinRMConfiguration" + """ + + provisionVMAgent: bool + """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.""" + enableAutomaticUpdates: bool + """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.""" + timeZone: str + """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 + `_.""" + additionalUnattendContent: list["AdditionalUnattendContent"] + """Specifies additional base-64 encoded XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup.""" + patchSettings: "PatchSettings" + """[Preview Feature] Specifies settings related to VM Guest Patching on Windows.""" + winRM: "WinRMConfiguration" + """Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.""" + + +class WindowsVMGuestPatchAutomaticByPlatformSettings(TypedDict, total=False): # pylint: disable=name-too-long + """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in + Windows 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: Union[str, "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 + """ + + rebootSetting: Union[str, "WindowsVMGuestPatchAutomaticByPlatformRebootSetting"] + """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known + values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\".""" + bypassPlatformSafetyChecksOnUserSchedule: bool + """Enables customer to schedule patching without accidental upgrades.""" + + +class WinRMConfiguration(TypedDict, total=False): + """Describes Windows Remote Management configuration of the VM. + + :ivar listeners: The list of Windows Remote Management listeners. + :vartype listeners: list["WinRMListener"] + """ + + listeners: list["WinRMListener"] + """The list of Windows Remote Management listeners.""" + + +class WinRMListener(TypedDict, total=False): + """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: Union[str, "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 + """ + + protocol: Union[str, "ProtocolTypes"] + """Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. Known + values are: \"Http\" and \"Https\".""" + certificateUrl: str + """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 + `_.""" + + +class ZoneAllocationPolicy(TypedDict, total=False): + """The zone allocation policy for distributing VMs across availability zones. + + :ivar distribution_strategy: The distribution strategy for zone allocation. Known values are: + "BestEffortSingleZone", "Prioritized", "BestEffortBalanced", and "StrictBalanced". + :vartype distribution_strategy: Union[str, "DistributionStrategy"] + :ivar zone_preferences: The zone preferences for allocation priority. + :vartype zone_preferences: list["ZonePreference"] + """ + + distributionStrategy: Union[str, "DistributionStrategy"] + """The distribution strategy for zone allocation. Known values are: \"BestEffortSingleZone\", + \"Prioritized\", \"BestEffortBalanced\", and \"StrictBalanced\".""" + zonePreferences: list["ZonePreference"] + """The zone preferences for allocation priority.""" + + +class ZonePreference(TypedDict, total=False): + """A zone preference with a zone identifier and rank. + + :ivar zone: The zone identifier. Required. + :vartype zone: str + :ivar rank: The rank of this zone in the priority order. Required. + :vartype rank: int + """ + + zone: Required[str] + """The zone identifier. Required.""" + rank: Required[int] + """The rank of this zone in the priority order. Required.""" diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_cancel_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_cancel_maximum_set_gen.py new file mode 100644 index 000000000000..63badac6c303 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_cancel_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python bulk_create_custom_cancel_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.bulk_create_custom.begin_cancel( + resource_group_name="rgBulkactions", + location="eastus", + name="20496756-e4bc-402c-8e7e-8ffed8e00c41", + ).result() + + +# x-ms-original-file: 2026-07-06-preview/BulkCreateCustom_Cancel_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_create_or_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_create_or_update_maximum_set_gen.py new file mode 100644 index 000000000000..1de4f32ae939 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_create_or_update_maximum_set_gen.py @@ -0,0 +1,148 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python bulk_create_custom_create_or_update_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.bulk_create_custom.begin_create_or_update( + resource_group_name="rgBulkactions", + location="eastus", + name="89f31926-145c-410c-a56a-5bc97359274c", + resource={ + "identity": {"type": "SystemAssigned"}, + "properties": { + "capacity": 10, + "capacityType": "VM", + "computeProfile": { + "computeApiVersion": "2024-11-01", + "virtualMachineProfile": { + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "bulkvm-nic", + "properties": { + "deleteOption": "Delete", + "ipConfigurations": [ + { + "name": "bulkvm-ipconfig", + "properties": { + "primary": True, + "subnet": { + "id": "/subscriptions/1FBA3C66-5C9C-4391-B72F-9F52735FC9F2/resourceGroups/rgBulkactions/providers/Microsoft.Network/virtualNetworks/bulkvnet/subnets/default" + }, + }, + } + ], + "primary": True, + }, + } + ], + }, + "osProfile": { + "adminUsername": "azureuser", + "computerName": "bulkvm", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "ssh": { + "publicKeys": [ + { + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDExampleKeyReplaceWithYourOwn azureuser@bulklaunch", + "path": "/home/azureuser/.ssh/authorized_keys", + } + ] + }, + }, + }, + "storageProfile": { + "imageReference": { + "offer": "0001-com-ubuntu-server-jammy", + "publisher": "Canonical", + "sku": "22_04-lts-gen2", + "version": "latest", + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "deleteOption": "Delete", + "managedDisk": {"storageAccountType": "Premium_LRS"}, + "osType": "Linux", + }, + }, + }, + }, + "executionParameters": {"retryPolicy": {"onFailureAction": "Delete", "retryWindowInMinutes": 30}}, + "overridesProfile": { + "overrides": [ + {"tags": {"env": "prod", "workload": "payments"}, "virtualMachineName": "bulkvm-payments-0"}, + {"tags": {"workload": "batch"}}, + ], + "virtualMachineNamePrefix": "bulkvm", + }, + "priorityProfile": { + "allocationStrategy": "LowestPrice", + "evictionPolicy": "Delete", + "maxPricePerVM": 0.2, + "type": "Spot", + }, + "vmSizesProfile": [ + {"name": "Standard_D2s_v5", "rank": 1}, + { + "name": "Standard_D4s_v5", + "override": { + "virtualMachineProfile": { + "storageProfile": { + "imageReference": { + "offer": "0001-com-ubuntu-server-jammy", + "publisher": "Canonical", + "sku": "22_04-lts-arm64", + "version": "latest", + } + } + } + }, + "rank": 2, + }, + ], + "zoneAllocationPolicy": { + "distributionStrategy": "BestEffortBalanced", + "zonePreferences": [{"rank": 1, "zone": "1"}, {"rank": 2, "zone": "2"}], + }, + }, + "tags": {"env": "prod", "workload": "batch-render"}, + "zones": ["1", "2"], + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/BulkCreateCustom_CreateOrUpdate_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_delete_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_delete_maximum_set_gen.py new file mode 100644 index 000000000000..c09ea4eb1722 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_delete_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python bulk_create_custom_delete_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.bulk_create_custom.begin_delete( + resource_group_name="rgBulkactions", + location="eastus", + name="709c2556-6a82-45ee-ba68-b935bb4e8ba0", + ).result() + + +# x-ms-original-file: 2026-07-06-preview/BulkCreateCustom_Delete_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_async_operation_status_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_async_operation_status_maximum_set_gen.py new file mode 100644 index 000000000000..ef0163977764 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_async_operation_status_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python bulk_create_custom_get_async_operation_status_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.bulk_create_custom.get_async_operation_status( + location="eastus", + async_operation_id="f1ac145b-9d8b-417d-8101-9962d03c0904", + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/BulkCreateCustom_GetAsyncOperationStatus_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_maximum_set_gen.py new file mode 100644 index 000000000000..807560414305 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_get_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python bulk_create_custom_get_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.bulk_create_custom.get( + resource_group_name="rgBulkactions", + location="eastus", + name="85c374f7-9857-4fd7-9267-81019219c362", + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/BulkCreateCustom_Get_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_resource_group_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_resource_group_maximum_set_gen.py new file mode 100644 index 000000000000..88d34709d3c2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_resource_group_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python bulk_create_custom_list_by_resource_group_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.bulk_create_custom.list_by_resource_group( + resource_group_name="rgBulkactions", + location="eastus", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/BulkCreateCustom_ListByResourceGroup_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_subscription_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_subscription_maximum_set_gen.py new file mode 100644 index 000000000000..90e501a0e8a0 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/bulk_create_custom_list_by_subscription_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python bulk_create_custom_list_by_subscription_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.bulk_create_custom.list_by_subscription( + location="eastus", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/BulkCreateCustom_ListBySubscription_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_cancel_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_cancel_maximum_set_gen.py new file mode 100644 index 000000000000..4aa893982ef0 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_cancel_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_cancel_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.launch_bulk_instances_operation.begin_cancel( + resource_group_name="rgBulkactions", + location="useast2euap", + name="434d5a2a-167a-4e26-a89c-fbe622dfd0bc", + ).result() + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_Cancel_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_create_or_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_create_or_update_maximum_set_gen.py new file mode 100644 index 000000000000..a11623724087 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_create_or_update_maximum_set_gen.py @@ -0,0 +1,402 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_create_or_update_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.begin_create_or_update( + resource_group_name="rgBulkactions", + location="useast2euap", + name="4ad45156-c829-4cd4-aafa-ecabe28aa029", + resource={ + "identity": {"type": "None", "userAssignedIdentities": {"key9643": {}}}, + "plan": { + "name": "iemasqqkbixbewezyrhnpntjd", + "product": "bguuzrknnuohugjhernflurpx", + "promotionCode": "bxgonranwqoryfkhkfaumdgz", + "publisher": "bvggylbvfstnscuupuithafvvgc", + "version": "uyxetqmmzvqianqv", + }, + "properties": { + "capacity": 21, + "capacityType": "VM", + "computeProfile": { + "computeApiVersion": "qqxldedyfmfmidkvtkixh", + "extensions": [ + { + "name": "jkpmcxwuahpzwkvexgzpypk", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "dockqxgatsfzhctxrncuw", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "provisionAfterExtensions": ["onbtyoeifafiktrkmal"], + "publisher": "qesyfldbfoaexyoywhcxafdtdwcg", + "settings": {}, + "suppressFailures": True, + "type": "ptlmlzpbpbkfbu", + "typeHandlerVersion": "crllsludntz", + }, + } + ], + "virtualMachineProfile": { + "additionalCapabilities": {"hibernationEnabled": True, "ultraSSDEnabled": True}, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "nmfaspclhidtznslsps", + "enableAutomaticUpgrade": True, + "order": 8, + "packageReferenceId": "afrfkjdrtzftmwramfyu", + "tags": "cmygipvpkegyclvpznfu", + "treatFailureAsDeploymentFailure": True, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "lvzxxyypkeqlflftmfn"}}, + "diagnosticsProfile": { + "bootDiagnostics": {"enabled": True, "storageUri": "pxuhtzehlfsqolbdleirgj"} + }, + "extensionsTimeBudget": "dnyqmcijikzkltjav", + "hardwareProfile": { + "vmSize": "szrnjqwbruz", + "vmSizeProperties": {"vCpusAvailable": 24, "vCpusPerCore": 6}, + }, + "licenseType": "ymwuemwuntbignqyvzqflvjpcdus", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "qrkzoctmzjketostzabnra", + "properties": { + "auxiliaryMode": "None", + "auxiliarySku": "None", + "deleteOption": "Delete", + "disableTcpStateTracking": True, + "dnsSettings": {"dnsServers": ["tqcqopnanyyiavfwhqbkarxtrfqbww"]}, + "dscpConfiguration": {"id": "lvzxxyypkeqlflftmfn"}, + "enableAcceleratedNetworking": True, + "enableFpga": True, + "enableIPForwarding": True, + "ipConfigurations": [ + { + "name": "gqymuvgzzfmxqvdadx", + "properties": { + "applicationGatewayBackendAddressPools": [ + {"id": "lvzxxyypkeqlflftmfn"} + ], + "applicationSecurityGroups": [{"id": "lvzxxyypkeqlflftmfn"}], + "loadBalancerBackendAddressPools": [{"id": "lvzxxyypkeqlflftmfn"}], + "primary": True, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "cwxsqjijtwbsyqdwht", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "fampou", + "domainNameLabelScope": "TenantReuse", + }, + "idleTimeoutInMinutes": 17, + "ipTags": [ + { + "ipTagType": "hkjoxhqadudjartwooezaxl", + "tag": "xywunkjglkmmwfpf", + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "sku": {"name": "Basic", "tier": "Regional"}, + "tags": {"key5442": "qhpwpnylvmdthxazhxamnbhdfpf"}, + }, + "subnet": {"id": "lvzxxyypkeqlflftmfn"}, + }, + } + ], + "networkSecurityGroup": {"id": "lvzxxyypkeqlflftmfn"}, + "primary": True, + }, + "tags": {"key9436": "bjbadzbfvpszbsickv"}, + } + ], + "networkInterfaces": [ + {"id": "ymfxctb", "properties": {"deleteOption": "Delete", "primary": True}} + ], + }, + "osProfile": { + "adminPassword": "", + "adminUsername": "fxzbi", + "allowExtensionOperations": True, + "computerName": "bplxnfp", + "customData": "hbdlirohsgnbrahscboc", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "patchMode": "ImageDefault", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [{"keyData": "wfhrknkehgesontscqyrewfmhgwt", "path": "mrdfxnfjazxog"}] + }, + }, + "requireGuestProvisionSignal": True, + "secrets": [ + { + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + "vaultCertificates": [ + {"certificateStore": "hyx", "certificateUrl": "crgbpfdvlohwkupdjp"} + ], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "rguazthnx", + "passName": "OobeSystem", + "settingName": "AutoLogon", + } + ], + "enableAutomaticUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "enableHotpatching": True, + "patchMode": "Manual", + }, + "provisionVMAgent": True, + "timeZone": "t", + "winRM": { + "listeners": [{"certificateUrl": "quhfapfpyeeocwvwtvuggoqqwt", "protocol": "Http"}] + }, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": True}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": True, + "scheduledEventsApiVersion": "lifncbftlkounuyfn", + } + }, + "userInitiatedReboot": {"automaticallyApprove": True}, + "userInitiatedRedeploy": {"automaticallyApprove": True}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": True, + "notBeforeTimeout": "ataqykjdakdvyyzdspaqnhd", + }, + "terminateNotificationProfile": {"enable": True, "notBeforeTimeout": "owbwifqrlsdmm"}, + }, + "securityProfile": { + "encryptionAtHost": True, + "encryptionIdentity": {"userAssignedIdentityResourceId": "tnajlgbwcepmhytzb"}, + "proxyAgentSettings": { + "addProxyAgentExtension": True, + "enabled": True, + "imds": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + "keyIncarnationId": 4, + "mode": "Audit", + "wireServer": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + }, + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskSizeGB": 19, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "lun": 7, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "nbthfzqsxyqvqnbgcljxbwyyoj", + "sourceResource": {"id": "qnukyordmomtjjqabovlsxl"}, + "toBeDetached": True, + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "communityGalleryImageId": "tsfpcq", + "id": "cdbrkpdicibtlliq", + "offer": "uvnqoxhkxefqwbsvjgbswqy", + "publisher": "ojlplghybdamadvsrq", + "sharedGalleryImageId": "fz", + "sku": "hajdxhjmlkx", + "version": "u", + }, + "osDisk": { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": {"option": "Local", "placement": "CacheDisk"}, + "diskSizeGB": 2, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "enabled": True, + "keyEncryptionKey": { + "keyUrl": "mjjkvgpoohatw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + }, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "opogpznvctmraoajgizcyrfvpt", + "osType": "Windows", + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + }, + }, + "userData": "nwjvxe", + "vmExtensions": [ + { + "name": "jkpmcxwuahpzwkvexgzpypk", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "dockqxgatsfzhctxrncuw", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "provisionAfterExtensions": ["onbtyoeifafiktrkmal"], + "publisher": "qesyfldbfoaexyoywhcxafdtdwcg", + "settings": {}, + "suppressFailures": True, + "type": "ptlmlzpbpbkfbu", + "typeHandlerVersion": "crllsludntz", + }, + } + ], + }, + }, + "priorityProfile": { + "allocationStrategy": "LowestPrice", + "evictionPolicy": "Delete", + "maxPricePerVM": 23, + "type": "Regular", + }, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19}, + "vmAttributes": { + "acceleratorCount": {"max": 0, "min": 0}, + "acceleratorManufacturers": ["AMD"], + "acceleratorSupport": "Excluded", + "acceleratorTypes": ["GPU"], + "allowedVMSizes": [ + "dwcsrlrzrzzqleqivkzwpczpf", + "dwcsrlrzrzzqleqivkzwpczpf", + "dwcsrlrzrzzqleqivkzwpczpf", + "dwcsrlrzrzzqleqivkzwpczpf", + "dwcsrlrzrzzqleqivkzwpczpf", + "dwcsrlrzrzzqleqivkzwpczpf", + "dwcsrlrzrzzqleqivkzwpczpf", + ], + "architectureTypes": ["ARM64"], + "burstableSupport": "Excluded", + "cpuManufacturers": ["Intel"], + "dataDiskCount": {"max": 0, "min": 0}, + "excludedVMSizes": [ + "igehpnuaybwy", + "igehpnuaybwy", + "igehpnuaybwy", + "igehpnuaybwy", + "igehpnuaybwy", + "igehpnuaybwy", + "igehpnuaybwy", + ], + "hyperVGenerations": ["Gen1"], + "localStorageDiskTypes": ["HDD"], + "localStorageInGiB": {"max": 0, "min": 0}, + "localStorageSupport": "Excluded", + "memoryInGiB": {"max": 0, "min": 0}, + "memoryInGiBPerVCpu": {"max": 0, "min": 0}, + "networkBandwidthInMbps": {"max": 0, "min": 0}, + "networkInterfaceCount": {"max": 0, "min": 0}, + "rdmaNetworkInterfaceCount": {"max": 0, "min": 0}, + "rdmaSupport": "Excluded", + "vCpuCount": {"max": 0, "min": 0}, + "vmCategories": ["GeneralPurpose"], + }, + "vmSizesProfile": [{"name": "frbnnpdkq", "rank": 7}], + "zoneAllocationPolicy": { + "distributionStrategy": "BestEffortSingleZone", + "zonePreferences": [{"rank": 19, "zone": "ixksjnaxwelhfpsoyjfaezievquqv"}], + }, + }, + "tags": {"key1909": "eaoznrkaglklvv"}, + "zones": ["hzqzrbvpgsudtesi"], + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_CreateOrUpdate_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_delete_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_delete_maximum_set_gen.py new file mode 100644 index 000000000000..6bb5bb07c304 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_delete_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_delete_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.launch_bulk_instances_operation.begin_delete( + resource_group_name="rgBulkactions", + location="useast2euap", + name="8a71b9df-efee-48a9-a381-4e6d60b4304f", + ).result() + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_Delete_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_maximum_set_gen.py new file mode 100644 index 000000000000..2301b4266659 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_get_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.get( + resource_group_name="rgBulkactions", + location="useast2euap", + name="495544ae-8710-4e8b-bca3-49a1dbb1623a", + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_Get_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_operation_status_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_operation_status_maximum_set_gen.py new file mode 100644 index 000000000000..ecda02d03db5 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_get_operation_status_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_get_operation_status_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.get_operation_status( + location="useast2euap", + async_operation_id="8596407e-8834-4a62-8d3c-9231af92d785", + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_GetOperationStatus_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_maximum_set_gen.py new file mode 100644 index 000000000000..39af2ae2321b --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_list_by_resource_group_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.list_by_resource_group( + resource_group_name="rgBulkactions", + location="useast2euap", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_ListByResourceGroup_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_minimum_set_gen.py new file mode 100644 index 000000000000..12c8a52e40e4 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_resource_group_minimum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_list_by_resource_group_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.list_by_resource_group( + resource_group_name="rgBulkactions", + location="useast2euap", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_ListByResourceGroup_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_maximum_set_gen.py new file mode 100644 index 000000000000..e11baad411aa --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_list_by_subscription_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.list_by_subscription( + location="useast2euap", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_ListBySubscription_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_minimum_set_gen.py new file mode 100644 index 000000000000..9b44228211b5 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_by_subscription_minimum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_list_by_subscription_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.list_by_subscription( + location="useast2euap", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_ListBySubscription_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_virtual_machines_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_virtual_machines_maximum_set_gen.py new file mode 100644 index 000000000000..9ae025f46d7d --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/launch_bulk_instances_operation_list_virtual_machines_maximum_set_gen.py @@ -0,0 +1,44 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python launch_bulk_instances_operation_list_virtual_machines_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.launch_bulk_instances_operation.list_virtual_machines( + resource_group_name="rgBulkactions", + location="useast2euap", + name="b038ec94-0860-42a5-b149-f1ce5f144e15", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/LaunchBulkInstancesOperation_ListVirtualMachines_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_set_gen.py new file mode 100644 index 000000000000..2d922183c4c5 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python occurrence_extension_list_occurrence_by_vms_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.occurrence_extension.list_occurrence_by_vms( + resource_uri="subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_cancel_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_cancel_maximum_set_gen.py new file mode 100644 index 000000000000..ec6e43bf5046 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_cancel_maximum_set_gen.py @@ -0,0 +1,49 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python occurrences_cancel_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.occurrences.begin_cancel( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + occurrence_id="CB26D7CB-3E27-465F-99C8-EAF7A4118245", + body={ + "resourceIds": [ + "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + ] + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/Occurrences_Cancel_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_delay_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_delay_maximum_set_gen.py new file mode 100644 index 000000000000..91d498767080 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_delay_maximum_set_gen.py @@ -0,0 +1,50 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python occurrences_delay_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.occurrences.begin_delay( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + occurrence_id="CB26D7CB-3E27-465F-99C8-EAF7A4118245", + body={ + "delay": "2025-05-22T17:00:00.000-07:00", + "resourceIds": [ + "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + ], + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/Occurrences_Delay_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_get_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_get_maximum_set_gen.py new file mode 100644 index 000000000000..4bbb90d3d93a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_get_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python occurrences_get_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.occurrences.get( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + occurrence_id="67b5bada-4772-43fc-8dbb-402476d98a45", + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/Occurrences_Get_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py new file mode 100644 index 000000000000..4da3d4d25976 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python occurrences_list_by_scheduled_action_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.occurrences.list_by_scheduled_action( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_resources_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_resources_maximum_set_gen.py new file mode 100644 index 000000000000..cbac62e6b3b8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/occurrences_list_resources_maximum_set_gen.py @@ -0,0 +1,44 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python occurrences_list_resources_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.occurrences.list_resources( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + occurrence_id="CB26D7CB-3E27-465F-99C8-EAF7A4118245", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/Occurrences_ListResources_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_maximum_set_gen.py index 596fa5200d93..fede33a5906e 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_maximum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-06/Operations_List_MaximumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/Operations_List_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_minimum_set_gen.py index 8496dce8c7c3..74c7b1a14cbd 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/operations_list_minimum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-06/Operations_List_MinimumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/Operations_List_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_extension_list_by_vms_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_extension_list_by_vms_maximum_set_gen.py new file mode 100644 index 000000000000..94e1d75094af --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_extension_list_by_vms_maximum_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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_action_extension_list_by_vms_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_action_extension.list_by_vms( + resource_uri="subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_operation_status_get_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_operation_status_get_maximum_set_gen.py new file mode 100644 index 000000000000..671485e9a363 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_action_operation_status_get_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_action_operation_status_get_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_action_operation_status.get( + location="eastus", + operation_id="00000000-0000-0000-0000-000000000000", + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActionOperationStatus_Get_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py new file mode 100644 index 000000000000..c8b84ce5eca1 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py @@ -0,0 +1,53 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_attach_resources_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.begin_attach_resources( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + body={ + "resources": [ + { + "notificationSettings": [ + {"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", + } + ] + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py new file mode 100644 index 000000000000..ac86bfbb0911 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py @@ -0,0 +1,48 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_cancel_next_occurrence_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.begin_cancel_next_occurrence( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + body={ + "resourceIds": [ + "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + ] + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py new file mode 100644 index 000000000000..f3e837d5627c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py @@ -0,0 +1,68 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_create_or_update_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.begin_create_or_update( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + resource={ + "location": "eastus", + "properties": { + "actionType": "Start", + "disabled": True, + "endTime": "2025-04-17T00:23:55.286Z", + "notificationSettings": [ + {"destination": "admin@contoso.com", "disabled": True, "language": "en-us", "type": "Email"} + ], + "resourceType": "VirtualMachine", + "schedule": { + "deadlineType": "Unknown", + "executionParameters": { + "optimizationPreference": "Cost", + "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + }, + "requestedDaysOfTheMonth": [15], + "requestedMonths": ["January"], + "requestedWeekDays": ["Monday"], + "scheduledTime": "19:00:00", + "timeZone": "America/Los_Angeles", + }, + "startTime": "2025-04-17T00:23:55.281Z", + }, + "tags": {"key2102": "myTagValue"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_delete_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_delete_maximum_set_gen.py new file mode 100644 index 000000000000..dc414dd14a0c --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_delete_maximum_set_gen.py @@ -0,0 +1,41 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_delete_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.scheduled_actions.begin_delete( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + ).result() + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_Delete_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py new file mode 100644 index 000000000000..465f0c6352f3 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py @@ -0,0 +1,48 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_detach_resources_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.begin_detach_resources( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + body={ + "resources": [ + "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + ] + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_disable_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_disable_maximum_set_gen.py new file mode 100644 index 000000000000..314830c00d6f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_disable_maximum_set_gen.py @@ -0,0 +1,41 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_disable_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.scheduled_actions.begin_disable( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + ).result() + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_Disable_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_enable_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_enable_maximum_set_gen.py new file mode 100644 index 000000000000..29169901b038 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_enable_maximum_set_gen.py @@ -0,0 +1,41 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_enable_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.scheduled_actions.begin_enable( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + ).result() + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_Enable_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_get_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_get_maximum_set_gen.py new file mode 100644 index 000000000000..af938f8f0d42 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_get_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_get_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.get( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_Get_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py new file mode 100644 index 000000000000..b3844ce027e2 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_list_by_resource_group_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.list_by_resource_group( + resource_group_name="rgcompute", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py new file mode 100644 index 000000000000..d28910501136 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py @@ -0,0 +1,40 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_list_by_subscription_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.list_by_subscription() + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py new file mode 100644 index 000000000000..7a95dd023151 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_list_resources_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.list_resources( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_ListResources_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py new file mode 100644 index 000000000000..af581aa89a25 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py @@ -0,0 +1,53 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_patch_resources_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.patch_resources( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + body={ + "resources": [ + { + "notificationSettings": [ + {"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", + } + ] + }, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py new file mode 100644 index 000000000000..cc3bf4825df8 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py @@ -0,0 +1,42 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_trigger_manual_occurrence_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.begin_trigger_manual_occurrence( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + ).result() + print(response) + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_update_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_update_maximum_set_gen.py new file mode 100644 index 000000000000..db565f29933e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/scheduled_actions_update_maximum_set_gen.py @@ -0,0 +1,66 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python scheduled_actions_update_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.scheduled_actions.begin_update( + resource_group_name="rgcompute", + scheduled_action_name="myScheduledAction", + properties={ + "properties": { + "actionType": "Start", + "disabled": True, + "endTime": "2025-04-17T00:23:58.149Z", + "notificationSettings": [ + {"destination": "admin@contoso.com", "disabled": True, "language": "en-us", "type": "Email"} + ], + "resourceType": "VirtualMachine", + "schedule": { + "deadlineType": "Unknown", + "executionParameters": { + "optimizationPreference": "Cost", + "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + }, + "requestedDaysOfTheMonth": [15], + "requestedMonths": ["January"], + "requestedWeekDays": ["Monday"], + "scheduledTime": "19:00:00", + "timeZone": "America/Los_Angeles", + }, + "startTime": "2025-04-17T00:23:58.149Z", + }, + "tags": {"key9989": "myTagValue"}, + }, + ).result() + + +# x-ms-original-file: 2026-07-06-preview/ScheduledActions_Update_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_maximum_set_gen.py new file mode 100644 index 000000000000..3eeed8fd8704 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_acknowledge_operation_errors( + resource_group_name="rgBulkactions", + location="useast2euap", + body={"operationIds": ["af449548-8e1a-4079-874e-2caa4ff783cc"]}, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkAcknowledgeOperationErrors_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_minimum_set_gen.py new file mode 100644 index 000000000000..da4aae45b98a --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_minimum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_acknowledge_operation_errors_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_acknowledge_operation_errors( + resource_group_name="rgBulkactions", + location="useast2euap", + body={"operationIds": ["af449548-8e1a-4079-874e-2caa4ff783cc"]}, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkAcknowledgeOperationErrors_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_maximum_set_gen.py index 2ce9c311c4e2..eb1b9258df34 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_maximum_set_gen.py @@ -31,13 +31,13 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_cancel_operations( - resource_group_name="myResourceGroup", - location="eastus2euap", - request_body={"operationIds": ["a1b2c3d4-e5f6-7890-abcd-ef0123456789"]}, + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={"operationIds": ["af449548-8e1a-4079-874e-2caa4ff783cc"]}, ) print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkCancel_MaximumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkCancel_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_minimum_set_gen.py index 55d9a580b194..88cefc75e4a6 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_cancel_minimum_set_gen.py @@ -31,13 +31,13 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_cancel_operations( - resource_group_name="myResourceGroup", - location="eastus2euap", - request_body={"operationIds": ["a1b2c3d4-e5f6-7890-abcd-ef0123456789"]}, + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={"operationIds": ["af449548-8e1a-4079-874e-2caa4ff783cc"]}, ) print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkCancel_MinimumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkCancel_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_maximum_set_gen.py new file mode 100644 index 000000000000..e40191d65365 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_maximum_set_gen.py @@ -0,0 +1,633 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_create_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_create_operation( + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={ + "executionParameters": { + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19} + }, + "resourceConfigParameters": { + "baseProfile": { + "computeApiVersion": "axcvphjtsdjzcwqczcglmq", + "extendedLocation": {"name": "gbnxzymbdkxhwjpqkur", "type": "EdgeZone"}, + "identity": {"type": "SystemAssigned", "userAssignedIdentities": {"key7": {}}}, + "name": "dbozdvegpdvqxltqipvmqsfgunpe", + "placement": { + "excludeZones": ["pvvwrhuhdpvbacwmesblpgwzk"], + "includeZones": ["inagtbtedobdea"], + "zonePlacementPolicy": "Any", + }, + "plan": { + "name": "iemasqqkbixbewezyrhnpntjd", + "product": "bguuzrknnuohugjhernflurpx", + "promotionCode": "bxgonranwqoryfkhkfaumdgz", + "publisher": "bvggylbvfstnscuupuithafvvgc", + "version": "uyxetqmmzvqianqv", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": True, "ultraSSDEnabled": True}, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "nmfaspclhidtznslsps", + "enableAutomaticUpgrade": True, + "order": 8, + "packageReferenceId": "afrfkjdrtzftmwramfyu", + "tags": "cmygipvpkegyclvpznfu", + "treatFailureAsDeploymentFailure": True, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "lvzxxyypkeqlflftmfn"}}, + "diagnosticsProfile": { + "bootDiagnostics": {"enabled": True, "storageUri": "pxuhtzehlfsqolbdleirgj"} + }, + "extensionsTimeBudget": "dnyqmcijikzkltjav", + "hardwareProfile": { + "vmSize": "szrnjqwbruz", + "vmSizeProperties": {"vCpusAvailable": 24, "vCpusPerCore": 6}, + }, + "licenseType": "ymwuemwuntbignqyvzqflvjpcdus", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "qrkzoctmzjketostzabnra", + "properties": { + "auxiliaryMode": "None", + "auxiliarySku": "None", + "deleteOption": "Delete", + "disableTcpStateTracking": True, + "dnsSettings": {"dnsServers": ["tqcqopnanyyiavfwhqbkarxtrfqbww"]}, + "dscpConfiguration": {"id": "lvzxxyypkeqlflftmfn"}, + "enableAcceleratedNetworking": True, + "enableFpga": True, + "enableIPForwarding": True, + "ipConfigurations": [ + { + "name": "gqymuvgzzfmxqvdadx", + "properties": { + "applicationGatewayBackendAddressPools": [ + {"id": "lvzxxyypkeqlflftmfn"} + ], + "applicationSecurityGroups": [{"id": "lvzxxyypkeqlflftmfn"}], + "loadBalancerBackendAddressPools": [{"id": "lvzxxyypkeqlflftmfn"}], + "primary": True, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "cwxsqjijtwbsyqdwht", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "fampou", + "domainNameLabelScope": "TenantReuse", + }, + "idleTimeoutInMinutes": 17, + "ipTags": [ + { + "ipTagType": "hkjoxhqadudjartwooezaxl", + "tag": "xywunkjglkmmwfpf", + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "sku": {"name": "Basic", "tier": "Regional"}, + "tags": {"key5442": "qhpwpnylvmdthxazhxamnbhdfpf"}, + }, + "subnet": {"id": "lvzxxyypkeqlflftmfn"}, + }, + } + ], + "networkSecurityGroup": {"id": "lvzxxyypkeqlflftmfn"}, + "primary": True, + }, + "tags": {"key9436": "bjbadzbfvpszbsickv"}, + } + ], + "networkInterfaces": [ + {"id": "ymfxctb", "properties": {"deleteOption": "Delete", "primary": True}} + ], + }, + "osProfile": { + "adminPassword": "", + "adminUsername": "fxzbi", + "allowExtensionOperations": True, + "computerName": "bplxnfp", + "customData": "hbdlirohsgnbrahscboc", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "patchMode": "ImageDefault", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [{"keyData": "wfhrknkehgesontscqyrewfmhgwt", "path": "mrdfxnfjazxog"}] + }, + }, + "requireGuestProvisionSignal": True, + "secrets": [ + { + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + "vaultCertificates": [ + {"certificateStore": "hyx", "certificateUrl": "crgbpfdvlohwkupdjp"} + ], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "rguazthnx", + "passName": "OobeSystem", + "settingName": "AutoLogon", + } + ], + "enableAutomaticUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "enableHotpatching": True, + "patchMode": "Manual", + }, + "provisionVMAgent": True, + "timeZone": "t", + "winRM": { + "listeners": [{"certificateUrl": "quhfapfpyeeocwvwtvuggoqqwt", "protocol": "Http"}] + }, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": True}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": True, + "scheduledEventsApiVersion": "lifncbftlkounuyfn", + } + }, + "userInitiatedReboot": {"automaticallyApprove": True}, + "userInitiatedRedeploy": {"automaticallyApprove": True}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": True, + "notBeforeTimeout": "ataqykjdakdvyyzdspaqnhd", + }, + "terminateNotificationProfile": {"enable": True, "notBeforeTimeout": "owbwifqrlsdmm"}, + }, + "securityProfile": { + "encryptionAtHost": True, + "encryptionIdentity": {"userAssignedIdentityResourceId": "tnajlgbwcepmhytzb"}, + "proxyAgentSettings": { + "addProxyAgentExtension": True, + "enabled": True, + "imds": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + "keyIncarnationId": 4, + "mode": "Audit", + "wireServer": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + }, + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskSizeGB": 19, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "lun": 7, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "nbthfzqsxyqvqnbgcljxbwyyoj", + "sourceResource": {"id": "qnukyordmomtjjqabovlsxl"}, + "toBeDetached": True, + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "communityGalleryImageId": "tsfpcq", + "id": "cdbrkpdicibtlliq", + "offer": "uvnqoxhkxefqwbsvjgbswqy", + "publisher": "ojlplghybdamadvsrq", + "sharedGalleryImageId": "fz", + "sku": "hajdxhjmlkx", + "version": "u", + }, + "osDisk": { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": {"option": "Local", "placement": "CacheDisk"}, + "diskSizeGB": 2, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "enabled": True, + "keyEncryptionKey": { + "keyUrl": "mjjkvgpoohatw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + }, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "opogpznvctmraoajgizcyrfvpt", + "osType": "Windows", + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + }, + }, + "userData": "nwjvxe", + "vmExtensions": [ + { + "name": "jkpmcxwuahpzwkvexgzpypk", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "dockqxgatsfzhctxrncuw", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "provisionAfterExtensions": ["onbtyoeifafiktrkmal"], + "publisher": "qesyfldbfoaexyoywhcxafdtdwcg", + "settings": {}, + "suppressFailures": True, + "type": "ptlmlzpbpbkfbu", + "typeHandlerVersion": "crllsludntz", + }, + } + ], + }, + "tags": {"key6824": "cefndldgkx"}, + "zones": ["wczj"], + }, + "resourceCount": 23, + "resourceOverrides": [ + { + "computeApiVersion": "axcvphjtsdjzcwqczcglmq", + "extendedLocation": {"name": "gbnxzymbdkxhwjpqkur", "type": "EdgeZone"}, + "identity": {"type": "SystemAssigned", "userAssignedIdentities": {"key7": {}}}, + "name": "dbozdvegpdvqxltqipvmqsfgunpe", + "placement": { + "excludeZones": ["pvvwrhuhdpvbacwmesblpgwzk"], + "includeZones": ["inagtbtedobdea"], + "zonePlacementPolicy": "Any", + }, + "plan": { + "name": "iemasqqkbixbewezyrhnpntjd", + "product": "bguuzrknnuohugjhernflurpx", + "promotionCode": "bxgonranwqoryfkhkfaumdgz", + "publisher": "bvggylbvfstnscuupuithafvvgc", + "version": "uyxetqmmzvqianqv", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": True, "ultraSSDEnabled": True}, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "nmfaspclhidtznslsps", + "enableAutomaticUpgrade": True, + "order": 8, + "packageReferenceId": "afrfkjdrtzftmwramfyu", + "tags": "cmygipvpkegyclvpznfu", + "treatFailureAsDeploymentFailure": True, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "lvzxxyypkeqlflftmfn"}}, + "diagnosticsProfile": { + "bootDiagnostics": {"enabled": True, "storageUri": "pxuhtzehlfsqolbdleirgj"} + }, + "extensionsTimeBudget": "dnyqmcijikzkltjav", + "hardwareProfile": { + "vmSize": "szrnjqwbruz", + "vmSizeProperties": {"vCpusAvailable": 24, "vCpusPerCore": 6}, + }, + "licenseType": "ymwuemwuntbignqyvzqflvjpcdus", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "qrkzoctmzjketostzabnra", + "properties": { + "auxiliaryMode": "None", + "auxiliarySku": "None", + "deleteOption": "Delete", + "disableTcpStateTracking": True, + "dnsSettings": {"dnsServers": ["tqcqopnanyyiavfwhqbkarxtrfqbww"]}, + "dscpConfiguration": {"id": "lvzxxyypkeqlflftmfn"}, + "enableAcceleratedNetworking": True, + "enableFpga": True, + "enableIPForwarding": True, + "ipConfigurations": [ + { + "name": "gqymuvgzzfmxqvdadx", + "properties": { + "applicationGatewayBackendAddressPools": [ + {"id": "lvzxxyypkeqlflftmfn"} + ], + "applicationSecurityGroups": [{"id": "lvzxxyypkeqlflftmfn"}], + "loadBalancerBackendAddressPools": [ + {"id": "lvzxxyypkeqlflftmfn"} + ], + "primary": True, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "cwxsqjijtwbsyqdwht", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "fampou", + "domainNameLabelScope": "TenantReuse", + }, + "idleTimeoutInMinutes": 17, + "ipTags": [ + { + "ipTagType": "hkjoxhqadudjartwooezaxl", + "tag": "xywunkjglkmmwfpf", + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "sku": {"name": "Basic", "tier": "Regional"}, + "tags": {"key5442": "qhpwpnylvmdthxazhxamnbhdfpf"}, + }, + "subnet": {"id": "lvzxxyypkeqlflftmfn"}, + }, + } + ], + "networkSecurityGroup": {"id": "lvzxxyypkeqlflftmfn"}, + "primary": True, + }, + "tags": {"key9436": "bjbadzbfvpszbsickv"}, + } + ], + "networkInterfaces": [ + {"id": "ymfxctb", "properties": {"deleteOption": "Delete", "primary": True}} + ], + }, + "osProfile": { + "adminPassword": "", + "adminUsername": "fxzbi", + "allowExtensionOperations": True, + "computerName": "bplxnfp", + "customData": "hbdlirohsgnbrahscboc", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "patchMode": "ImageDefault", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [ + {"keyData": "wfhrknkehgesontscqyrewfmhgwt", "path": "mrdfxnfjazxog"} + ] + }, + }, + "requireGuestProvisionSignal": True, + "secrets": [ + { + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + "vaultCertificates": [ + {"certificateStore": "hyx", "certificateUrl": "crgbpfdvlohwkupdjp"} + ], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "rguazthnx", + "passName": "OobeSystem", + "settingName": "AutoLogon", + } + ], + "enableAutomaticUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "enableHotpatching": True, + "patchMode": "Manual", + }, + "provisionVMAgent": True, + "timeZone": "t", + "winRM": { + "listeners": [ + {"certificateUrl": "quhfapfpyeeocwvwtvuggoqqwt", "protocol": "Http"} + ] + }, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": True}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": True, + "scheduledEventsApiVersion": "lifncbftlkounuyfn", + } + }, + "userInitiatedReboot": {"automaticallyApprove": True}, + "userInitiatedRedeploy": {"automaticallyApprove": True}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": True, + "notBeforeTimeout": "ataqykjdakdvyyzdspaqnhd", + }, + "terminateNotificationProfile": {"enable": True, "notBeforeTimeout": "owbwifqrlsdmm"}, + }, + "securityProfile": { + "encryptionAtHost": True, + "encryptionIdentity": {"userAssignedIdentityResourceId": "tnajlgbwcepmhytzb"}, + "proxyAgentSettings": { + "addProxyAgentExtension": True, + "enabled": True, + "imds": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + "keyIncarnationId": 4, + "mode": "Audit", + "wireServer": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + }, + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskSizeGB": 19, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "lun": 7, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "nbthfzqsxyqvqnbgcljxbwyyoj", + "sourceResource": {"id": "qnukyordmomtjjqabovlsxl"}, + "toBeDetached": True, + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "communityGalleryImageId": "tsfpcq", + "id": "cdbrkpdicibtlliq", + "offer": "uvnqoxhkxefqwbsvjgbswqy", + "publisher": "ojlplghybdamadvsrq", + "sharedGalleryImageId": "fz", + "sku": "hajdxhjmlkx", + "version": "u", + }, + "osDisk": { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": {"option": "Local", "placement": "CacheDisk"}, + "diskSizeGB": 2, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "enabled": True, + "keyEncryptionKey": { + "keyUrl": "mjjkvgpoohatw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + }, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "opogpznvctmraoajgizcyrfvpt", + "osType": "Windows", + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + }, + }, + "userData": "nwjvxe", + "vmExtensions": [ + { + "name": "jkpmcxwuahpzwkvexgzpypk", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "dockqxgatsfzhctxrncuw", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "provisionAfterExtensions": ["onbtyoeifafiktrkmal"], + "publisher": "qesyfldbfoaexyoywhcxafdtdwcg", + "settings": {}, + "suppressFailures": True, + "type": "ptlmlzpbpbkfbu", + "typeHandlerVersion": "crllsludntz", + }, + } + ], + }, + "tags": {"key6824": "cefndldgkx"}, + "zones": ["wczj"], + } + ], + "resourcePrefix": "flivkboavfhjuiucwdjof", + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkCreate_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_minimum_set_gen.py new file mode 100644 index 000000000000..cf1269282494 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_create_minimum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_create_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_create_operation( + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={"executionParameters": {}, "resourceConfigParameters": {"resourceCount": 23}}, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkCreate_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_maximum_set_gen.py index b037cb6d3a21..b3eefb940f9a 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_maximum_set_gen.py @@ -32,11 +32,11 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_deallocate_operation( - resource_group_name="myResourceGroup", - location="eastus2euap", + resource_group_name="rgBulkactions", + location="useast2euap", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 20} + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19} }, "resources": { "ids": [ @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkDeallocate_MaximumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkDeallocate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_minimum_set_gen.py index d9c7f34ba68f..c4769f6ea67b 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_deallocate_minimum_set_gen.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkDeallocate_MinimumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkDeallocate_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_maximum_set_gen.py index db7606803f86..4247ea236710 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_maximum_set_gen.py @@ -32,11 +32,11 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_delete_operation( - resource_group_name="myResourceGroup", - location="eastus2euap", + resource_group_name="rgBulkactions", + location="useast2euap", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 20} + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19} }, "forceDeletion": True, "resources": { @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkDelete_MaximumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkDelete_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_minimum_set_gen.py index 3dc6855ab88c..832b3ef70de9 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_delete_minimum_set_gen.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkDelete_MinimumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkDelete_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_maximum_set_gen.py index 5ac59b8eb42d..5fd7a83f8deb 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_maximum_set_gen.py @@ -31,13 +31,13 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_get_operations_status( - resource_group_name="myResourceGroup", - location="eastus2euap", - request_body={"operationIds": ["a1b2c3d4-e5f6-7890-abcd-ef0123456789"]}, + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={"operationIds": ["406e7856-f94b-48ae-93ee-b062afee54e5"]}, ) print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkGetOperationsStatus_MaximumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkGetOperationsStatus_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_minimum_set_gen.py index e6ab9e80cc19..eeedc4b030a4 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_get_operations_status_minimum_set_gen.py @@ -31,13 +31,13 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_get_operations_status( - resource_group_name="myResourceGroup", - location="eastus2euap", - request_body={"operationIds": ["a1b2c3d4-e5f6-7890-abcd-ef0123456789"]}, + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={"operationIds": ["406e7856-f94b-48ae-93ee-b062afee54e5"]}, ) print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkGetOperationsStatus_MinimumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkGetOperationsStatus_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_maximum_set_gen.py index 1e91226f7a9b..55f9bcd33304 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_maximum_set_gen.py @@ -32,15 +32,18 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_hibernate_operation( - resource_group_name="myResourceGroup", - location="eastus2euap", + resource_group_name="rgBulkactions", + location="useast2euap", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 20} + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19} }, - "resources": { - "ids": [ - "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + "resourcesWithContext": { + "resources": [ + { + "resourceContext": "hibernateContext", + "resourceId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + } ] }, }, @@ -48,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkHibernate_MaximumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkHibernate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_minimum_set_gen.py index 4f5f67c3b6a2..baf08e8cbaef 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_hibernate_minimum_set_gen.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkHibernate_MinimumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkHibernate_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_maximum_set_gen.py new file mode 100644 index 000000000000..70d66d08b98e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_maximum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_list_operation_errors_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_list_operation_errors( + resource_group_name="rgBulkactions", + location="useast2euap", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkListOperationErrors_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_minimum_set_gen.py new file mode 100644 index 000000000000..a1866d230825 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_list_operation_errors_minimum_set_gen.py @@ -0,0 +1,43 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_list_operation_errors_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_list_operation_errors( + resource_group_name="rgBulkactions", + location="useast2euap", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkListOperationErrors_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_reimage_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_reimage_maximum_set_gen.py new file mode 100644 index 000000000000..cd3fac891a06 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_reimage_maximum_set_gen.py @@ -0,0 +1,73 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_reimage_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_reimage_operation( + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={ + "executionParameters": { + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19} + }, + "reimageParameters": { + "baseProfile": { + "exactVersion": "zjmkrnqjmzs", + "osProfile": {"adminPassword": "", "customData": "teyngslcznlxihiitqbul"}, + "tempDisk": True, + }, + "resourceOverrides": [ + { + "profile": { + "exactVersion": "zjmkrnqjmzs", + "osProfile": { + "adminPassword": "", + "customData": "teyngslcznlxihiitqbul", + }, + "tempDisk": True, + }, + "resourceId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + } + ], + }, + "resources": { + "ids": [ + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + ] + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkReimage_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_maximum_set_gen.py index 1b505c20880b..7eb365e58a5c 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_maximum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_maximum_set_gen.py @@ -32,15 +32,18 @@ def main(): ) response = client.virtual_machine_bulk_operations.bulk_start_operation( - resource_group_name="myResourceGroup", - location="eastus2euap", + resource_group_name="rgBulkactions", + location="useast2euap", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 20} + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19} }, - "resources": { - "ids": [ - "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + "resourcesWithContext": { + "resources": [ + { + "resourceContext": "startContext", + "resourceId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + } ] }, }, @@ -48,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkStart_MaximumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkStart_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_minimum_set_gen.py index 6e454f60fed0..7c346fc72808 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_minimum_set_gen.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_start_minimum_set_gen.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-06/VirtualMachineBulkOperations_BulkStart_MinimumSet_Gen.json +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkStart_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_maximum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_maximum_set_gen.py new file mode 100644 index 000000000000..a842928f9cab --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_maximum_set_gen.py @@ -0,0 +1,648 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_vdi_flex_create_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_vdi_flex_create_operation( + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={ + "executionParameters": { + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 2, "retryWindowInMinutes": 19} + }, + "resourceConfigParameters": { + "baseProfile": { + "computeApiVersion": "axcvphjtsdjzcwqczcglmq", + "extendedLocation": {"name": "gbnxzymbdkxhwjpqkur", "type": "EdgeZone"}, + "identity": {"type": "SystemAssigned", "userAssignedIdentities": {"key7": {}}}, + "name": "dbozdvegpdvqxltqipvmqsfgunpe", + "placement": { + "excludeZones": ["pvvwrhuhdpvbacwmesblpgwzk"], + "includeZones": ["inagtbtedobdea"], + "zonePlacementPolicy": "Any", + }, + "plan": { + "name": "iemasqqkbixbewezyrhnpntjd", + "product": "bguuzrknnuohugjhernflurpx", + "promotionCode": "bxgonranwqoryfkhkfaumdgz", + "publisher": "bvggylbvfstnscuupuithafvvgc", + "version": "uyxetqmmzvqianqv", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": True, "ultraSSDEnabled": True}, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "nmfaspclhidtznslsps", + "enableAutomaticUpgrade": True, + "order": 8, + "packageReferenceId": "afrfkjdrtzftmwramfyu", + "tags": "cmygipvpkegyclvpznfu", + "treatFailureAsDeploymentFailure": True, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "lvzxxyypkeqlflftmfn"}}, + "diagnosticsProfile": { + "bootDiagnostics": {"enabled": True, "storageUri": "pxuhtzehlfsqolbdleirgj"} + }, + "extensionsTimeBudget": "dnyqmcijikzkltjav", + "hardwareProfile": { + "vmSize": "szrnjqwbruz", + "vmSizeProperties": {"vCpusAvailable": 24, "vCpusPerCore": 6}, + }, + "licenseType": "ymwuemwuntbignqyvzqflvjpcdus", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "qrkzoctmzjketostzabnra", + "properties": { + "auxiliaryMode": "None", + "auxiliarySku": "None", + "deleteOption": "Delete", + "disableTcpStateTracking": True, + "dnsSettings": {"dnsServers": ["tqcqopnanyyiavfwhqbkarxtrfqbww"]}, + "dscpConfiguration": {"id": "lvzxxyypkeqlflftmfn"}, + "enableAcceleratedNetworking": True, + "enableFpga": True, + "enableIPForwarding": True, + "ipConfigurations": [ + { + "name": "gqymuvgzzfmxqvdadx", + "properties": { + "applicationGatewayBackendAddressPools": [ + {"id": "lvzxxyypkeqlflftmfn"} + ], + "applicationSecurityGroups": [{"id": "lvzxxyypkeqlflftmfn"}], + "loadBalancerBackendAddressPools": [{"id": "lvzxxyypkeqlflftmfn"}], + "primary": True, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "cwxsqjijtwbsyqdwht", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "fampou", + "domainNameLabelScope": "TenantReuse", + }, + "idleTimeoutInMinutes": 17, + "ipTags": [ + { + "ipTagType": "hkjoxhqadudjartwooezaxl", + "tag": "xywunkjglkmmwfpf", + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "sku": {"name": "Basic", "tier": "Regional"}, + "tags": {"key5442": "qhpwpnylvmdthxazhxamnbhdfpf"}, + }, + "subnet": {"id": "lvzxxyypkeqlflftmfn"}, + }, + } + ], + "networkSecurityGroup": {"id": "lvzxxyypkeqlflftmfn"}, + "primary": True, + }, + "tags": {"key9436": "bjbadzbfvpszbsickv"}, + } + ], + "networkInterfaces": [ + {"id": "ymfxctb", "properties": {"deleteOption": "Delete", "primary": True}} + ], + }, + "osProfile": { + "adminPassword": "", + "adminUsername": "fxzbi", + "allowExtensionOperations": True, + "computerName": "bplxnfp", + "customData": "hbdlirohsgnbrahscboc", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "patchMode": "ImageDefault", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [{"keyData": "wfhrknkehgesontscqyrewfmhgwt", "path": "mrdfxnfjazxog"}] + }, + }, + "requireGuestProvisionSignal": True, + "secrets": [ + { + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + "vaultCertificates": [ + {"certificateStore": "hyx", "certificateUrl": "crgbpfdvlohwkupdjp"} + ], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "rguazthnx", + "passName": "OobeSystem", + "settingName": "AutoLogon", + } + ], + "enableAutomaticUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "enableHotpatching": True, + "patchMode": "Manual", + }, + "provisionVMAgent": True, + "timeZone": "t", + "winRM": { + "listeners": [{"certificateUrl": "quhfapfpyeeocwvwtvuggoqqwt", "protocol": "Http"}] + }, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": True}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": True, + "scheduledEventsApiVersion": "lifncbftlkounuyfn", + } + }, + "userInitiatedReboot": {"automaticallyApprove": True}, + "userInitiatedRedeploy": {"automaticallyApprove": True}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": True, + "notBeforeTimeout": "ataqykjdakdvyyzdspaqnhd", + }, + "terminateNotificationProfile": {"enable": True, "notBeforeTimeout": "owbwifqrlsdmm"}, + }, + "securityProfile": { + "encryptionAtHost": True, + "encryptionIdentity": {"userAssignedIdentityResourceId": "tnajlgbwcepmhytzb"}, + "proxyAgentSettings": { + "addProxyAgentExtension": True, + "enabled": True, + "imds": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + "keyIncarnationId": 4, + "mode": "Audit", + "wireServer": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + }, + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskSizeGB": 19, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "lun": 7, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "nbthfzqsxyqvqnbgcljxbwyyoj", + "sourceResource": {"id": "qnukyordmomtjjqabovlsxl"}, + "toBeDetached": True, + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "communityGalleryImageId": "tsfpcq", + "id": "cdbrkpdicibtlliq", + "offer": "uvnqoxhkxefqwbsvjgbswqy", + "publisher": "ojlplghybdamadvsrq", + "sharedGalleryImageId": "fz", + "sku": "hajdxhjmlkx", + "version": "u", + }, + "osDisk": { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": {"option": "Local", "placement": "CacheDisk"}, + "diskSizeGB": 2, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "enabled": True, + "keyEncryptionKey": { + "keyUrl": "mjjkvgpoohatw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + }, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "opogpznvctmraoajgizcyrfvpt", + "osType": "Windows", + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + }, + }, + "userData": "nwjvxe", + "vmExtensions": [ + { + "name": "jkpmcxwuahpzwkvexgzpypk", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "dockqxgatsfzhctxrncuw", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "provisionAfterExtensions": ["onbtyoeifafiktrkmal"], + "publisher": "qesyfldbfoaexyoywhcxafdtdwcg", + "settings": {}, + "suppressFailures": True, + "type": "ptlmlzpbpbkfbu", + "typeHandlerVersion": "crllsludntz", + }, + } + ], + }, + "tags": {"key6824": "cefndldgkx"}, + "zones": ["wczj"], + }, + "flexProperties": { + "minCapacity": 5, + "osType": "Windows", + "priorityProfile": { + "allocationStrategy": "LowestPrice", + "evictionPolicy": "Delete", + "maxPricePerVM": 23, + "type": "Regular", + }, + "vmSizeProfiles": [{"name": "frbnnpdkq", "rank": 7}], + "zoneAllocationPolicy": { + "distributionStrategy": "BestEffortSingleZone", + "zonePreferences": [{"rank": 19, "zone": "ixksjnaxwelhfpsoyjfaezievquqv"}], + }, + }, + "resourceCount": 10, + "resourceOverrides": [ + { + "computeApiVersion": "axcvphjtsdjzcwqczcglmq", + "extendedLocation": {"name": "gbnxzymbdkxhwjpqkur", "type": "EdgeZone"}, + "identity": {"type": "SystemAssigned", "userAssignedIdentities": {"key7": {}}}, + "name": "dbozdvegpdvqxltqipvmqsfgunpe", + "placement": { + "excludeZones": ["pvvwrhuhdpvbacwmesblpgwzk"], + "includeZones": ["inagtbtedobdea"], + "zonePlacementPolicy": "Any", + }, + "plan": { + "name": "iemasqqkbixbewezyrhnpntjd", + "product": "bguuzrknnuohugjhernflurpx", + "promotionCode": "bxgonranwqoryfkhkfaumdgz", + "publisher": "bvggylbvfstnscuupuithafvvgc", + "version": "uyxetqmmzvqianqv", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": True, "ultraSSDEnabled": True}, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "nmfaspclhidtznslsps", + "enableAutomaticUpgrade": True, + "order": 8, + "packageReferenceId": "afrfkjdrtzftmwramfyu", + "tags": "cmygipvpkegyclvpznfu", + "treatFailureAsDeploymentFailure": True, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "lvzxxyypkeqlflftmfn"}}, + "diagnosticsProfile": { + "bootDiagnostics": {"enabled": True, "storageUri": "pxuhtzehlfsqolbdleirgj"} + }, + "extensionsTimeBudget": "dnyqmcijikzkltjav", + "hardwareProfile": { + "vmSize": "szrnjqwbruz", + "vmSizeProperties": {"vCpusAvailable": 24, "vCpusPerCore": 6}, + }, + "licenseType": "ymwuemwuntbignqyvzqflvjpcdus", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "qrkzoctmzjketostzabnra", + "properties": { + "auxiliaryMode": "None", + "auxiliarySku": "None", + "deleteOption": "Delete", + "disableTcpStateTracking": True, + "dnsSettings": {"dnsServers": ["tqcqopnanyyiavfwhqbkarxtrfqbww"]}, + "dscpConfiguration": {"id": "lvzxxyypkeqlflftmfn"}, + "enableAcceleratedNetworking": True, + "enableFpga": True, + "enableIPForwarding": True, + "ipConfigurations": [ + { + "name": "gqymuvgzzfmxqvdadx", + "properties": { + "applicationGatewayBackendAddressPools": [ + {"id": "lvzxxyypkeqlflftmfn"} + ], + "applicationSecurityGroups": [{"id": "lvzxxyypkeqlflftmfn"}], + "loadBalancerBackendAddressPools": [ + {"id": "lvzxxyypkeqlflftmfn"} + ], + "primary": True, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "cwxsqjijtwbsyqdwht", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "fampou", + "domainNameLabelScope": "TenantReuse", + }, + "idleTimeoutInMinutes": 17, + "ipTags": [ + { + "ipTagType": "hkjoxhqadudjartwooezaxl", + "tag": "xywunkjglkmmwfpf", + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "sku": {"name": "Basic", "tier": "Regional"}, + "tags": {"key5442": "qhpwpnylvmdthxazhxamnbhdfpf"}, + }, + "subnet": {"id": "lvzxxyypkeqlflftmfn"}, + }, + } + ], + "networkSecurityGroup": {"id": "lvzxxyypkeqlflftmfn"}, + "primary": True, + }, + "tags": {"key9436": "bjbadzbfvpszbsickv"}, + } + ], + "networkInterfaces": [ + {"id": "ymfxctb", "properties": {"deleteOption": "Delete", "primary": True}} + ], + }, + "osProfile": { + "adminPassword": "", + "adminUsername": "fxzbi", + "allowExtensionOperations": True, + "computerName": "bplxnfp", + "customData": "hbdlirohsgnbrahscboc", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "enableVMAgentPlatformUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "patchMode": "ImageDefault", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [ + {"keyData": "wfhrknkehgesontscqyrewfmhgwt", "path": "mrdfxnfjazxog"} + ] + }, + }, + "requireGuestProvisionSignal": True, + "secrets": [ + { + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + "vaultCertificates": [ + {"certificateStore": "hyx", "certificateUrl": "crgbpfdvlohwkupdjp"} + ], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "rguazthnx", + "passName": "OobeSystem", + "settingName": "AutoLogon", + } + ], + "enableAutomaticUpdates": True, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": True, + "rebootSetting": "Unknown", + }, + "enableHotpatching": True, + "patchMode": "Manual", + }, + "provisionVMAgent": True, + "timeZone": "t", + "winRM": { + "listeners": [ + {"certificateUrl": "quhfapfpyeeocwvwtvuggoqqwt", "protocol": "Http"} + ] + }, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": True}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": True, + "scheduledEventsApiVersion": "lifncbftlkounuyfn", + } + }, + "userInitiatedReboot": {"automaticallyApprove": True}, + "userInitiatedRedeploy": {"automaticallyApprove": True}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": True, + "notBeforeTimeout": "ataqykjdakdvyyzdspaqnhd", + }, + "terminateNotificationProfile": {"enable": True, "notBeforeTimeout": "owbwifqrlsdmm"}, + }, + "securityProfile": { + "encryptionAtHost": True, + "encryptionIdentity": {"userAssignedIdentityResourceId": "tnajlgbwcepmhytzb"}, + "proxyAgentSettings": { + "addProxyAgentExtension": True, + "enabled": True, + "imds": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + "keyIncarnationId": 4, + "mode": "Audit", + "wireServer": {"inVMAccessControlProfileReferenceId": "xvlzroy", "mode": "Audit"}, + }, + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskSizeGB": 19, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "lun": 7, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "nbthfzqsxyqvqnbgcljxbwyyoj", + "sourceResource": {"id": "qnukyordmomtjjqabovlsxl"}, + "toBeDetached": True, + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "communityGalleryImageId": "tsfpcq", + "id": "cdbrkpdicibtlliq", + "offer": "uvnqoxhkxefqwbsvjgbswqy", + "publisher": "ojlplghybdamadvsrq", + "sharedGalleryImageId": "fz", + "sku": "hajdxhjmlkx", + "version": "u", + }, + "osDisk": { + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": {"option": "Local", "placement": "CacheDisk"}, + "diskSizeGB": 2, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "enabled": True, + "keyEncryptionKey": { + "keyUrl": "mjjkvgpoohatw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + }, + "image": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "managedDisk": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "id": "numddbqmkxuu", + "securityProfile": { + "diskEncryptionSet": {"id": "magvkzhdmzhktjlqkkk"}, + "securityEncryptionType": "VMGuestStateOnly", + }, + "storageAccountType": "Standard_LRS", + }, + "name": "opogpznvctmraoajgizcyrfvpt", + "osType": "Windows", + "vhd": {"uri": "elpzggtxubepzgjqvdbjmbu"}, + "writeAcceleratorEnabled": True, + }, + }, + "userData": "nwjvxe", + "vmExtensions": [ + { + "name": "jkpmcxwuahpzwkvexgzpypk", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "forceUpdateTag": "dockqxgatsfzhctxrncuw", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "vzkogocyw", + "sourceVault": {"id": "lvzxxyypkeqlflftmfn"}, + }, + "provisionAfterExtensions": ["onbtyoeifafiktrkmal"], + "publisher": "qesyfldbfoaexyoywhcxafdtdwcg", + "settings": {}, + "suppressFailures": True, + "type": "ptlmlzpbpbkfbu", + "typeHandlerVersion": "crllsludntz", + }, + } + ], + }, + "tags": {"key6824": "cefndldgkx"}, + "zones": ["wczj"], + } + ], + "resourcePrefix": "mwbopevxbjcunljvruov", + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkVdiFlexCreate_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_minimum_set_gen.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_minimum_set_gen.py new file mode 100644 index 000000000000..a446185e5689 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_samples/virtual_machine_bulk_operations_bulk_vdi_flex_create_minimum_set_gen.py @@ -0,0 +1,53 @@ +# 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.compute.bulkaction import ComputeBulkActionsMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-compute-bulkaction +# USAGE + python virtual_machine_bulk_operations_bulk_vdi_flex_create_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 = ComputeBulkActionsMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.virtual_machine_bulk_operations.bulk_vdi_flex_create_operation( + resource_group_name="rgBulkactions", + location="useast2euap", + request_body={ + "executionParameters": {}, + "resourceConfigParameters": { + "flexProperties": { + "osType": "Windows", + "priorityProfile": {}, + "vmSizeProfiles": [{"name": "Standard_D2ads_v5", "rank": 7}], + }, + "resourceCount": 10, + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-07-06-preview/VirtualMachineBulkOperations_BulkVdiFlexCreate_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations.py new file mode 100644 index 000000000000..5b274d1c9262 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations.py @@ -0,0 +1,983 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtBulkCreateCustomOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bulk_create_custom_get(self, resource_group): + response = self.client.bulk_create_custom.get( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bulk_create_custom_get_async_operation_status(self, resource_group): + response = self.client.bulk_create_custom.get_async_operation_status( + location="str", + async_operation_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bulk_create_custom_begin_create_or_update(self, resource_group): + response = self.client.bulk_create_custom.begin_create_or_update( + resource_group_name=resource_group.name, + location="str", + name="str", + resource={ + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "plan": {"name": "str", "product": "str", "publisher": "str", "promotionCode": "str", "version": "str"}, + "properties": { + "capacity": 0, + "computeProfile": { + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + "computeApiVersion": "str", + "extensions": [ + { + "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", + }, + } + ], + }, + "priorityProfile": { + "allocationStrategy": "str", + "evictionPolicy": "str", + "maxPricePerVM": 0.0, + "type": "str", + }, + "capacityType": "str", + "createdTime": "2020-02-20 00:00:00", + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "overridesProfile": { + "overrides": [ + { + "extensions": [ + { + "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", + }, + } + ], + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "tags": {"str": "str"}, + "virtualMachineName": "str", + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + } + ], + "virtualMachineNamePrefix": "str", + }, + "provisioningState": "str", + "vmSizesProfile": [ + { + "name": "str", + "rank": 0, + "override": { + "extensions": [ + { + "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", + }, + } + ], + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "tags": {"str": "str"}, + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + }, + } + ], + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"rank": 0, "zone": "str"}], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "zones": ["str"], + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bulk_create_custom_begin_delete(self, resource_group): + response = self.client.bulk_create_custom.begin_delete( + resource_group_name=resource_group.name, + location="str", + name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bulk_create_custom_begin_cancel(self, resource_group): + response = self.client.bulk_create_custom.begin_cancel( + resource_group_name=resource_group.name, + location="str", + name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bulk_create_custom_list_by_resource_group(self, resource_group): + response = self.client.bulk_create_custom.list_by_resource_group( + resource_group_name=resource_group.name, + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bulk_create_custom_list_by_subscription(self, resource_group): + response = self.client.bulk_create_custom.list_by_subscription( + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations_async.py new file mode 100644 index 000000000000..4276d05cbd71 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_bulk_create_custom_operations_async.py @@ -0,0 +1,1023 @@ +# pylint: disable=too-many-lines +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction.aio import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtBulkCreateCustomOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bulk_create_custom_get(self, resource_group): + response = await self.client.bulk_create_custom.get( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bulk_create_custom_get_async_operation_status(self, resource_group): + response = await self.client.bulk_create_custom.get_async_operation_status( + location="str", + async_operation_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bulk_create_custom_begin_create_or_update(self, resource_group): + response = await ( + await self.client.bulk_create_custom.begin_create_or_update( + resource_group_name=resource_group.name, + location="str", + name="str", + resource={ + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "capacity": 0, + "computeProfile": { + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + "computeApiVersion": "str", + "extensions": [ + { + "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", + }, + } + ], + }, + "priorityProfile": { + "allocationStrategy": "str", + "evictionPolicy": "str", + "maxPricePerVM": 0.0, + "type": "str", + }, + "capacityType": "str", + "createdTime": "2020-02-20 00:00:00", + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "overridesProfile": { + "overrides": [ + { + "extensions": [ + { + "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", + }, + } + ], + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "tags": {"str": "str"}, + "virtualMachineName": "str", + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + } + ], + "virtualMachineNamePrefix": "str", + }, + "provisioningState": "str", + "vmSizesProfile": [ + { + "name": "str", + "rank": 0, + "override": { + "extensions": [ + { + "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", + }, + } + ], + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "tags": {"str": "str"}, + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + }, + } + ], + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"rank": 0, "zone": "str"}], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "zones": ["str"], + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bulk_create_custom_begin_delete(self, resource_group): + response = await ( + await self.client.bulk_create_custom.begin_delete( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bulk_create_custom_begin_cancel(self, resource_group): + response = await ( + await self.client.bulk_create_custom.begin_cancel( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bulk_create_custom_list_by_resource_group(self, resource_group): + response = self.client.bulk_create_custom.list_by_resource_group( + resource_group_name=resource_group.name, + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bulk_create_custom_list_by_subscription(self, resource_group): + response = self.client.bulk_create_custom.list_by_subscription( + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations.py new file mode 100644 index 000000000000..1952cae4ede3 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations.py @@ -0,0 +1,436 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtLaunchBulkInstancesOperationOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_get(self, resource_group): + response = self.client.launch_bulk_instances_operation.get( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_get_operation_status(self, resource_group): + response = self.client.launch_bulk_instances_operation.get_operation_status( + location="str", + async_operation_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_begin_create_or_update(self, resource_group): + response = self.client.launch_bulk_instances_operation.begin_create_or_update( + resource_group_name=resource_group.name, + location="str", + name="str", + resource={ + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "plan": {"name": "str", "product": "str", "publisher": "str", "promotionCode": "str", "version": "str"}, + "properties": { + "capacity": 0, + "computeProfile": { + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + "computeApiVersion": "str", + "extensions": [ + { + "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", + }, + } + ], + }, + "priorityProfile": { + "allocationStrategy": "str", + "evictionPolicy": "str", + "maxPricePerVM": 0.0, + "type": "str", + }, + "capacityType": "str", + "createdTime": "2020-02-20 00:00:00", + "provisioningState": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "vmAttributes": { + "architectureTypes": ["str"], + "memoryInGiB": {"max": 0.0, "min": 0.0}, + "vCpuCount": {"max": 0, "min": 0}, + "acceleratorCount": {"max": 0, "min": 0}, + "acceleratorManufacturers": ["str"], + "acceleratorSupport": "str", + "acceleratorTypes": ["str"], + "allowedVMSizes": ["str"], + "burstableSupport": "str", + "cpuManufacturers": ["str"], + "dataDiskCount": {"max": 0, "min": 0}, + "excludedVMSizes": ["str"], + "hyperVGenerations": ["str"], + "localStorageDiskTypes": ["str"], + "localStorageInGiB": {"max": 0.0, "min": 0.0}, + "localStorageSupport": "str", + "memoryInGiBPerVCpu": {"max": 0.0, "min": 0.0}, + "networkBandwidthInMbps": {"max": 0.0, "min": 0.0}, + "networkInterfaceCount": {"max": 0, "min": 0}, + "rdmaNetworkInterfaceCount": {"max": 0, "min": 0}, + "rdmaSupport": "str", + "vmCategories": ["str"], + }, + "vmSizesProfile": [{"name": "str", "rank": 0}], + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"rank": 0, "zone": "str"}], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "zones": ["str"], + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_begin_delete(self, resource_group): + response = self.client.launch_bulk_instances_operation.begin_delete( + resource_group_name=resource_group.name, + location="str", + name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_begin_cancel(self, resource_group): + response = self.client.launch_bulk_instances_operation.begin_cancel( + resource_group_name=resource_group.name, + location="str", + name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_list_by_resource_group(self, resource_group): + response = self.client.launch_bulk_instances_operation.list_by_resource_group( + resource_group_name=resource_group.name, + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_list_by_subscription(self, resource_group): + response = self.client.launch_bulk_instances_operation.list_by_subscription( + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_launch_bulk_instances_operation_list_virtual_machines(self, resource_group): + response = self.client.launch_bulk_instances_operation.list_virtual_machines( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations_async.py new file mode 100644 index 000000000000..0d633e81b614 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_launch_bulk_instances_operation_operations_async.py @@ -0,0 +1,455 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction.aio import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtLaunchBulkInstancesOperationOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_get(self, resource_group): + response = await self.client.launch_bulk_instances_operation.get( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_get_operation_status(self, resource_group): + response = await self.client.launch_bulk_instances_operation.get_operation_status( + location="str", + async_operation_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_begin_create_or_update(self, resource_group): + response = await ( + await self.client.launch_bulk_instances_operation.begin_create_or_update( + resource_group_name=resource_group.name, + location="str", + name="str", + resource={ + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "capacity": 0, + "computeProfile": { + "virtualMachineProfile": { + "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", + "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", + }, + } + ], + }, + "computeApiVersion": "str", + "extensions": [ + { + "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", + }, + } + ], + }, + "priorityProfile": { + "allocationStrategy": "str", + "evictionPolicy": "str", + "maxPricePerVM": 0.0, + "type": "str", + }, + "capacityType": "str", + "createdTime": "2020-02-20 00:00:00", + "provisioningState": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "vmAttributes": { + "architectureTypes": ["str"], + "memoryInGiB": {"max": 0.0, "min": 0.0}, + "vCpuCount": {"max": 0, "min": 0}, + "acceleratorCount": {"max": 0, "min": 0}, + "acceleratorManufacturers": ["str"], + "acceleratorSupport": "str", + "acceleratorTypes": ["str"], + "allowedVMSizes": ["str"], + "burstableSupport": "str", + "cpuManufacturers": ["str"], + "dataDiskCount": {"max": 0, "min": 0}, + "excludedVMSizes": ["str"], + "hyperVGenerations": ["str"], + "localStorageDiskTypes": ["str"], + "localStorageInGiB": {"max": 0.0, "min": 0.0}, + "localStorageSupport": "str", + "memoryInGiBPerVCpu": {"max": 0.0, "min": 0.0}, + "networkBandwidthInMbps": {"max": 0.0, "min": 0.0}, + "networkInterfaceCount": {"max": 0, "min": 0}, + "rdmaNetworkInterfaceCount": {"max": 0, "min": 0}, + "rdmaSupport": "str", + "vmCategories": ["str"], + }, + "vmSizesProfile": [{"name": "str", "rank": 0}], + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"rank": 0, "zone": "str"}], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "zones": ["str"], + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_begin_delete(self, resource_group): + response = await ( + await self.client.launch_bulk_instances_operation.begin_delete( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_begin_cancel(self, resource_group): + response = await ( + await self.client.launch_bulk_instances_operation.begin_cancel( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_list_by_resource_group(self, resource_group): + response = self.client.launch_bulk_instances_operation.list_by_resource_group( + resource_group_name=resource_group.name, + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_list_by_subscription(self, resource_group): + response = self.client.launch_bulk_instances_operation.list_by_subscription( + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_launch_bulk_instances_operation_list_virtual_machines(self, resource_group): + response = self.client.launch_bulk_instances_operation.list_virtual_machines( + resource_group_name=resource_group.name, + location="str", + name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations.py new file mode 100644 index 000000000000..a4634a8858e3 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations.py @@ -0,0 +1,29 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtOccurrenceExtensionOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_occurrence_extension_list_occurrence_by_vms(self, resource_group): + response = self.client.occurrence_extension.list_occurrence_by_vms( + resource_uri="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations_async.py new file mode 100644 index 000000000000..7b3fdfa02293 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrence_extension_operations_async.py @@ -0,0 +1,30 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction.aio import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtOccurrenceExtensionOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_occurrence_extension_list_occurrence_by_vms(self, resource_group): + response = self.client.occurrence_extension.list_occurrence_by_vms( + resource_uri="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations.py new file mode 100644 index 000000000000..f22500ede60e --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations.py @@ -0,0 +1,80 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtOccurrencesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_occurrences_get(self, resource_group): + response = self.client.occurrences.get( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_occurrences_list_by_scheduled_action(self, resource_group): + response = self.client.occurrences.list_by_scheduled_action( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_occurrences_list_resources(self, resource_group): + response = self.client.occurrences.list_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_occurrences_begin_cancel(self, resource_group): + response = self.client.occurrences.begin_cancel( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + body={"resourceIds": ["str"]}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_occurrences_begin_delay(self, resource_group): + response = self.client.occurrences.begin_delay( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + body={"delay": "2020-02-20 00:00:00", "resourceIds": ["str"]}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations_async.py new file mode 100644 index 000000000000..5c6966af3b78 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_occurrences_operations_async.py @@ -0,0 +1,85 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction.aio import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtOccurrencesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_occurrences_get(self, resource_group): + response = await self.client.occurrences.get( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_occurrences_list_by_scheduled_action(self, resource_group): + response = self.client.occurrences.list_by_scheduled_action( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_occurrences_list_resources(self, resource_group): + response = self.client.occurrences.list_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_occurrences_begin_cancel(self, resource_group): + response = await ( + await self.client.occurrences.begin_cancel( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + body={"resourceIds": ["str"]}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_occurrences_begin_delay(self, resource_group): + response = await ( + await self.client.occurrences.begin_delay( + resource_group_name=resource_group.name, + scheduled_action_name="str", + occurrence_id="str", + body={"delay": "2020-02-20 00:00:00", "resourceIds": ["str"]}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations.py new file mode 100644 index 000000000000..19ec3b681003 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations.py @@ -0,0 +1,29 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtScheduledActionExtensionOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_action_extension_list_by_vms(self, resource_group): + response = self.client.scheduled_action_extension.list_by_vms( + resource_uri="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations_async.py new file mode 100644 index 000000000000..44cd5a944195 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_extension_operations_async.py @@ -0,0 +1,30 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction.aio import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtScheduledActionExtensionOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_action_extension_list_by_vms(self, resource_group): + response = self.client.scheduled_action_extension.list_by_vms( + resource_uri="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations.py new file mode 100644 index 000000000000..9fe9a5a0193f --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations.py @@ -0,0 +1,30 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtScheduledActionOperationStatusOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_action_operation_status_get(self, resource_group): + response = self.client.scheduled_action_operation_status.get( + location="str", + operation_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations_async.py new file mode 100644 index 000000000000..1a6bcf67ad62 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_action_operation_status_operations_async.py @@ -0,0 +1,31 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction.aio import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtScheduledActionOperationStatusOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_action_operation_status_get(self, resource_group): + response = await self.client.scheduled_action_operation_status.get( + location="str", + operation_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations.py new file mode 100644 index 000000000000..d89af7435b89 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations.py @@ -0,0 +1,254 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtScheduledActionsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_get(self, resource_group): + response = self.client.scheduled_actions.get( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_create_or_update(self, resource_group): + response = self.client.scheduled_actions.begin_create_or_update( + resource_group_name=resource_group.name, + scheduled_action_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "actionType": "str", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + "resourceType": "str", + "schedule": { + "scheduledTime": "12:30:00", + "timeZone": "str", + "deadlineType": "str", + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + }, + "requestedDaysOfTheMonth": [0], + "requestedMonths": ["str"], + "requestedWeekDays": ["str"], + }, + "startTime": "2020-02-20 00:00:00", + "disabled": bool, + "endTime": "2020-02-20 00:00:00", + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_update(self, resource_group): + response = self.client.scheduled_actions.begin_update( + resource_group_name=resource_group.name, + scheduled_action_name="str", + properties={ + "properties": { + "actionType": "str", + "disabled": bool, + "endTime": "2020-02-20 00:00:00", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + "resourceType": "str", + "schedule": { + "deadlineType": "str", + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + }, + "requestedDaysOfTheMonth": [0], + "requestedMonths": ["str"], + "requestedWeekDays": ["str"], + "scheduledTime": "12:30:00", + "timeZone": "str", + }, + "startTime": "2020-02-20 00:00:00", + }, + "tags": {"str": "str"}, + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_delete(self, resource_group): + response = self.client.scheduled_actions.begin_delete( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_list_by_resource_group(self, resource_group): + response = self.client.scheduled_actions.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_list_by_subscription(self, resource_group): + response = self.client.scheduled_actions.list_by_subscription() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_list_resources(self, resource_group): + response = self.client.scheduled_actions.list_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_attach_resources(self, resource_group): + response = self.client.scheduled_actions.begin_attach_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={ + "resources": [ + { + "resourceId": "str", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + } + ] + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_detach_resources(self, resource_group): + response = self.client.scheduled_actions.begin_detach_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={"resources": ["str"]}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_patch_resources(self, resource_group): + response = self.client.scheduled_actions.patch_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={ + "resources": [ + { + "resourceId": "str", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + } + ] + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_disable(self, resource_group): + response = self.client.scheduled_actions.begin_disable( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_enable(self, resource_group): + response = self.client.scheduled_actions.begin_enable( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_cancel_next_occurrence(self, resource_group): + response = self.client.scheduled_actions.begin_cancel_next_occurrence( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={"resourceIds": ["str"]}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_begin_trigger_manual_occurrence(self, resource_group): + response = self.client.scheduled_actions.begin_trigger_manual_occurrence( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations_async.py new file mode 100644 index 000000000000..2c6857496442 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_scheduled_actions_operations_async.py @@ -0,0 +1,273 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.compute.bulkaction.aio import ComputeBulkActionsMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestComputeBulkActionsMgmtScheduledActionsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ComputeBulkActionsMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_get(self, resource_group): + response = await self.client.scheduled_actions.get( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_create_or_update(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_create_or_update( + resource_group_name=resource_group.name, + scheduled_action_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "actionType": "str", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + "resourceType": "str", + "schedule": { + "scheduledTime": "12:30:00", + "timeZone": "str", + "deadlineType": "str", + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + }, + "requestedDaysOfTheMonth": [0], + "requestedMonths": ["str"], + "requestedWeekDays": ["str"], + }, + "startTime": "2020-02-20 00:00:00", + "disabled": bool, + "endTime": "2020-02-20 00:00:00", + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_update(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_update( + resource_group_name=resource_group.name, + scheduled_action_name="str", + properties={ + "properties": { + "actionType": "str", + "disabled": bool, + "endTime": "2020-02-20 00:00:00", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + "resourceType": "str", + "schedule": { + "deadlineType": "str", + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + }, + "requestedDaysOfTheMonth": [0], + "requestedMonths": ["str"], + "requestedWeekDays": ["str"], + "scheduledTime": "12:30:00", + "timeZone": "str", + }, + "startTime": "2020-02-20 00:00:00", + }, + "tags": {"str": "str"}, + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_delete(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_delete( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_list_by_resource_group(self, resource_group): + response = self.client.scheduled_actions.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_list_by_subscription(self, resource_group): + response = self.client.scheduled_actions.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_list_resources(self, resource_group): + response = self.client.scheduled_actions.list_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_attach_resources(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_attach_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={ + "resources": [ + { + "resourceId": "str", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + } + ] + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_detach_resources(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_detach_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={"resources": ["str"]}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_patch_resources(self, resource_group): + response = await self.client.scheduled_actions.patch_resources( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={ + "resources": [ + { + "resourceId": "str", + "notificationSettings": [ + {"destination": "str", "language": "str", "type": "str", "disabled": bool} + ], + } + ] + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_disable(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_disable( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_enable(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_enable( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_cancel_next_occurrence(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_cancel_next_occurrence( + resource_group_name=resource_group.name, + scheduled_action_name="str", + body={"resourceIds": ["str"]}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_begin_trigger_manual_occurrence(self, resource_group): + response = await ( + await self.client.scheduled_actions.begin_trigger_manual_occurrence( + resource_group_name=resource_group.name, + scheduled_action_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations.py index 7b67f227334b..96076c3c1bec 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations.py @@ -26,9 +26,12 @@ def test_virtual_machine_bulk_operations_bulk_deallocate_operation(self, resourc location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, }, ) @@ -43,9 +46,12 @@ def test_virtual_machine_bulk_operations_bulk_hibernate_operation(self, resource location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, }, ) @@ -60,9 +66,75 @@ def test_virtual_machine_bulk_operations_bulk_start_operation(self, resource_gro location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_machine_bulk_operations_bulk_create_operation(self, resource_group): + response = self.client.virtual_machine_bulk_operations.bulk_create_operation( + resource_group_name=resource_group.name, + location="str", + request_body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "resourceConfigParameters": { + "resourceCount": 0, + "baseProfile": {"str": {}}, + "resourceOverrides": [{"str": {}}], + "resourcePrefix": "str", + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_machine_bulk_operations_bulk_vdi_flex_create_operation(self, resource_group): + response = self.client.virtual_machine_bulk_operations.bulk_vdi_flex_create_operation( + resource_group_name=resource_group.name, + location="str", + request_body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "resourceConfigParameters": { + "flexProperties": { + "osType": "str", + "priorityProfile": { + "allocationStrategy": "str", + "evictionPolicy": "str", + "maxPricePerVM": 0.0, + "type": "str", + }, + "vmSizeProfiles": [{"name": "str", "rank": 0}], + "minCapacity": 0, + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"rank": 0, "zone": "str"}], + }, + }, + "resourceCount": 0, + "baseProfile": {"str": {}}, + "resourceOverrides": [{"str": {}}], + "resourcePrefix": "str", + }, }, ) @@ -77,10 +149,13 @@ def test_virtual_machine_bulk_operations_bulk_delete_operation(self, resource_gr location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, - "resources": {"ids": ["str"]}, "forceDeletion": bool, + "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, }, ) @@ -110,3 +185,63 @@ def test_virtual_machine_bulk_operations_bulk_cancel_operations(self, resource_g # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_machine_bulk_operations_bulk_reimage_operation(self, resource_group): + response = self.client.virtual_machine_bulk_operations.bulk_reimage_operation( + resource_group_name=resource_group.name, + location="str", + request_body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "reimageParameters": { + "baseProfile": { + "exactVersion": "str", + "osProfile": {"adminPassword": "str", "customData": "str"}, + "tempDisk": bool, + }, + "resourceOverrides": [ + { + "profile": { + "exactVersion": "str", + "osProfile": {"adminPassword": "str", "customData": "str"}, + "tempDisk": bool, + }, + "resourceId": "str", + } + ], + }, + "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_machine_bulk_operations_bulk_list_operation_errors(self, resource_group): + response = self.client.virtual_machine_bulk_operations.bulk_list_operation_errors( + resource_group_name=resource_group.name, + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_virtual_machine_bulk_operations_bulk_acknowledge_operation_errors(self, resource_group): + response = self.client.virtual_machine_bulk_operations.bulk_acknowledge_operation_errors( + resource_group_name=resource_group.name, + location="str", + body={"operationIds": ["str"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations_async.py b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations_async.py index 7400da9c7876..0d1e1072eacb 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations_async.py +++ b/sdk/compute/azure-mgmt-compute-bulkaction/generated_tests/test_compute_bulk_actions_mgmt_virtual_machine_bulk_operations_operations_async.py @@ -27,9 +27,12 @@ async def test_virtual_machine_bulk_operations_bulk_deallocate_operation(self, r location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, }, ) @@ -44,9 +47,12 @@ async def test_virtual_machine_bulk_operations_bulk_hibernate_operation(self, re location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, }, ) @@ -61,9 +67,75 @@ async def test_virtual_machine_bulk_operations_bulk_start_operation(self, resour location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_machine_bulk_operations_bulk_create_operation(self, resource_group): + response = await self.client.virtual_machine_bulk_operations.bulk_create_operation( + resource_group_name=resource_group.name, + location="str", + request_body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "resourceConfigParameters": { + "resourceCount": 0, + "baseProfile": {"str": {}}, + "resourceOverrides": [{"str": {}}], + "resourcePrefix": "str", + }, + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_machine_bulk_operations_bulk_vdi_flex_create_operation(self, resource_group): + response = await self.client.virtual_machine_bulk_operations.bulk_vdi_flex_create_operation( + resource_group_name=resource_group.name, + location="str", + request_body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "resourceConfigParameters": { + "flexProperties": { + "osType": "str", + "priorityProfile": { + "allocationStrategy": "str", + "evictionPolicy": "str", + "maxPricePerVM": 0.0, + "type": "str", + }, + "vmSizeProfiles": [{"name": "str", "rank": 0}], + "minCapacity": 0, + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"rank": 0, "zone": "str"}], + }, + }, + "resourceCount": 0, + "baseProfile": {"str": {}}, + "resourceOverrides": [{"str": {}}], + "resourcePrefix": "str", + }, }, ) @@ -78,10 +150,13 @@ async def test_virtual_machine_bulk_operations_bulk_delete_operation(self, resou location="str", request_body={ "executionParameters": { - "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0} + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, }, - "resources": {"ids": ["str"]}, "forceDeletion": bool, + "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, }, ) @@ -111,3 +186,63 @@ async def test_virtual_machine_bulk_operations_bulk_cancel_operations(self, reso # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_machine_bulk_operations_bulk_reimage_operation(self, resource_group): + response = await self.client.virtual_machine_bulk_operations.bulk_reimage_operation( + resource_group_name=resource_group.name, + location="str", + request_body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + "verifyVmAgentHealth": bool, + }, + "reimageParameters": { + "baseProfile": { + "exactVersion": "str", + "osProfile": {"adminPassword": "str", "customData": "str"}, + "tempDisk": bool, + }, + "resourceOverrides": [ + { + "profile": { + "exactVersion": "str", + "osProfile": {"adminPassword": "str", "customData": "str"}, + "tempDisk": bool, + }, + "resourceId": "str", + } + ], + }, + "resources": {"ids": ["str"]}, + "resourcesWithContext": {"resources": [{"resourceContext": "str", "resourceId": "str"}]}, + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_machine_bulk_operations_bulk_list_operation_errors(self, resource_group): + response = self.client.virtual_machine_bulk_operations.bulk_list_operation_errors( + resource_group_name=resource_group.name, + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_virtual_machine_bulk_operations_bulk_acknowledge_operation_errors(self, resource_group): + response = await self.client.virtual_machine_bulk_operations.bulk_acknowledge_operation_errors( + resource_group_name=resource_group.name, + location="str", + body={"operationIds": ["str"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/compute/azure-mgmt-compute-bulkaction/tsp-location.yaml b/sdk/compute/azure-mgmt-compute-bulkaction/tsp-location.yaml index 1d1fe890f468..6bac4685ab10 100644 --- a/sdk/compute/azure-mgmt-compute-bulkaction/tsp-location.yaml +++ b/sdk/compute/azure-mgmt-compute-bulkaction/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/compute/resource-manager/Microsoft.Compute/Bulkactions -commit: 33edaba41251144ab48a9ba923a61697f81b1aa8 +commit: 73e39fb58efdac318be1f603997bb57ec9831408 repo: Azure/azure-rest-api-specs additionalDirectories: