From 6f266c3528a06fbbde90cecedb93502903654c89 Mon Sep 17 00:00:00 2001 From: Sayan Naskar Date: Tue, 8 Aug 2023 11:41:47 +0530 Subject: [PATCH] [vmware] Use the New Resource Model for VM operations (#6578) --- src/connectedvmware/HISTORY.rst | 11 + src/connectedvmware/README.md | 2 +- .../azext_connectedvmware/_client_factory.py | 53 +- .../azext_connectedvmware/_params.py | 13 +- .../azext_connectedvmware/commands.py | 19 +- .../azext_connectedvmware/custom.py | 526 ++- .../recordings/test_connectedvmware.yaml | 2136 +++++----- .../latest/test_connectedvmware_scenario.py | 53 +- .../vendored_sdks/__init__.py | 11 +- .../vendored_sdks/connectedvmware/__init__.py | 18 + ...azure_arc_vmware_management_service_api.py | 50 +- .../{ => connectedvmware}/_configuration.py | 4 +- .../{ => connectedvmware}/_patch.py | 0 .../{ => connectedvmware}/_vendor.py | 0 .../{ => connectedvmware}/_version.py | 0 .../{ => connectedvmware}/aio/__init__.py | 0 ...azure_arc_vmware_management_service_api.py | 51 +- .../aio/_configuration.py | 4 +- .../{ => connectedvmware}/aio/_patch.py | 0 .../aio/operations/__init__.py | 8 + ...mware_management_service_api_operations.py | 142 + .../aio/operations/_clusters_operations.py | 33 +- .../aio/operations/_datastores_operations.py | 33 +- .../operations/_guest_agents_operations.py | 35 +- .../aio/operations/_hosts_operations.py | 35 +- .../_hybrid_identity_metadata_operations.py | 30 +- .../operations/_inventory_items_operations.py | 18 +- .../_machine_extensions_operations.py | 105 +- .../aio/operations/_operations.py | 6 +- .../operations/_resource_pools_operations.py | 33 +- .../aio/operations/_vcenters_operations.py | 33 +- .../_virtual_machine_instances_operations.py | 839 ++++ .../_virtual_machine_templates_operations.py | 32 +- .../_virtual_machines_operations.py | 150 +- .../_virtual_networks_operations.py | 33 +- .../_vm_instance_guest_agents_operations.py | 411 ++ ...nce_hybrid_identity_metadata_operations.py | 183 + .../{ => connectedvmware}/models/__init__.py | 36 +- ...arc_vmware_management_service_api_enums.py | 0 .../{ => connectedvmware}/models/_models.py | 1280 ++++-- .../models/_models_py3.py | 1332 ++++-- .../operations/__init__.py | 8 + ...mware_management_service_api_operations.py | 193 + .../operations/_clusters_operations.py | 46 +- .../operations/_datastores_operations.py | 47 +- .../operations/_guest_agents_operations.py | 44 +- .../operations/_hosts_operations.py | 44 +- .../_hybrid_identity_metadata_operations.py | 38 +- .../operations/_inventory_items_operations.py | 27 +- .../_machine_extensions_operations.py | 145 +- .../operations/_operations.py | 9 +- .../operations/_resource_pools_operations.py | 47 +- .../operations/_vcenters_operations.py | 46 +- .../_virtual_machine_instances_operations.py | 1141 +++++ .../_virtual_machine_templates_operations.py | 44 +- .../_virtual_machines_operations.py | 196 +- .../_virtual_networks_operations.py | 47 +- .../_vm_instance_guest_agents_operations.py | 559 +++ ...nce_hybrid_identity_metadata_operations.py | 259 ++ .../{ => connectedvmware}/py.typed | 0 .../vendored_sdks/hybridcompute/__init__.py | 18 + .../hybridcompute/_configuration.py | 76 + .../_hybrid_compute_management_client.py | 134 + .../vendored_sdks/hybridcompute/_patch.py | 31 + .../vendored_sdks/hybridcompute/_vendor.py | 27 + .../vendored_sdks/hybridcompute/_version.py | 9 + .../hybridcompute/aio/__init__.py | 15 + .../hybridcompute/aio/_configuration.py | 72 + .../aio/_hybrid_compute_management_client.py | 131 + .../vendored_sdks/hybridcompute/aio/_patch.py | 31 + .../hybridcompute/aio/operations/__init__.py | 35 + .../operations/_agent_version_operations.py | 157 + .../_extension_metadata_operations.py | 202 + ...id_compute_management_client_operations.py | 148 + .../_hybrid_identity_metadata_operations.py | 197 + .../_machine_extensions_operations.py | 586 +++ .../_machine_run_commands_operations.py | 593 +++ .../aio/operations/_machines_operations.py | 703 +++ .../operations/_network_profile_operations.py | 103 + .../aio/operations/_operations.py | 116 + ...private_endpoint_connections_operations.py | 444 ++ .../_private_link_resources_operations.py | 193 + .../_private_link_scopes_operations.py | 630 +++ .../hybridcompute/models/__init__.py | 274 ++ ..._hybrid_compute_management_client_enums.py | 166 + .../hybridcompute/models/_models.py | 3529 ++++++++++++++++ .../hybridcompute/models/_models_py3.py | 3757 +++++++++++++++++ .../hybridcompute/operations/__init__.py | 35 + .../operations/_agent_version_operations.py | 236 ++ .../_extension_metadata_operations.py | 291 ++ ...id_compute_management_client_operations.py | 199 + .../_hybrid_identity_metadata_operations.py | 283 ++ .../_machine_extensions_operations.py | 804 ++++ .../_machine_run_commands_operations.py | 811 ++++ .../operations/_machines_operations.py | 1021 +++++ .../operations/_network_profile_operations.py | 150 + .../hybridcompute/operations/_operations.py | 152 + ...private_endpoint_connections_operations.py | 615 +++ .../_private_link_resources_operations.py | 279 ++ .../_private_link_scopes_operations.py | 943 +++++ .../vendored_sdks/hybridcompute/py.typed | 1 + .../azext_connectedvmware/vmware_constants.py | 8 +- 102 files changed, 26313 insertions(+), 2590 deletions(-) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/__init__.py rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/_azure_arc_vmware_management_service_api.py (66%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/_configuration.py (97%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/_patch.py (100%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/_vendor.py (100%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/_version.py (100%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/__init__.py (100%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/_azure_arc_vmware_management_service_api.py (66%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/_configuration.py (97%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/_patch.py (100%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/__init__.py (74%) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_azure_arc_vmware_management_service_api_operations.py rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_clusters_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_datastores_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_guest_agents_operations.py (93%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_hosts_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_hybrid_identity_metadata_operations.py (92%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_inventory_items_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_machine_extensions_operations.py (86%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_resource_pools_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_vcenters_operations.py (95%) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machine_instances_operations.py rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_virtual_machine_templates_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_virtual_machines_operations.py (90%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/aio/operations/_virtual_networks_operations.py (95%) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_guest_agents_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_hybrid_identity_metadata_operations.py rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/models/__init__.py (88%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/models/_azure_arc_vmware_management_service_api_enums.py (100%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/models/_models.py (77%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/models/_models_py3.py (77%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/__init__.py (74%) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_azure_arc_vmware_management_service_api_operations.py rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_clusters_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_datastores_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_guest_agents_operations.py (94%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_hosts_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_hybrid_identity_metadata_operations.py (93%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_inventory_items_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_machine_extensions_operations.py (85%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_operations.py (94%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_resource_pools_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_vcenters_operations.py (95%) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machine_instances_operations.py rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_virtual_machine_templates_operations.py (95%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_virtual_machines_operations.py (91%) rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/operations/_virtual_networks_operations.py (95%) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_guest_agents_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_hybrid_identity_metadata_operations.py rename src/connectedvmware/azext_connectedvmware/vendored_sdks/{ => connectedvmware}/py.typed (100%) create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/__init__.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_configuration.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_hybrid_compute_management_client.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_patch.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_vendor.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_version.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/__init__.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_configuration.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_hybrid_compute_management_client.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_patch.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/__init__.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_agent_version_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_extension_metadata_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_compute_management_client_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_identity_metadata_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_extensions_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_run_commands_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machines_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_network_profile_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_endpoint_connections_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_resources_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_scopes_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/__init__.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_hybrid_compute_management_client_enums.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models_py3.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/__init__.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_agent_version_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_extension_metadata_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_compute_management_client_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_identity_metadata_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_extensions_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_run_commands_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machines_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_network_profile_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_endpoint_connections_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_resources_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_scopes_operations.py create mode 100644 src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/py.typed diff --git a/src/connectedvmware/HISTORY.rst b/src/connectedvmware/HISTORY.rst index f55a3a0a31b..52d36797363 100644 --- a/src/connectedvmware/HISTORY.rst +++ b/src/connectedvmware/HISTORY.rst @@ -3,6 +3,17 @@ Release History =============== +0.2.0 +++++++ +* Using New Resource Model for all VM operations: + * `vm` command : Create, Update, Delete, Show, Start, Stop, Restart VirtualMachineInstance + * `vm guest-agent` command : Enable, Show VMInstanceGuestAgent + * `vm extension` command : Create, Update, Delete, Show, List MachineExtensions +* If underlying machine is not present, it gets created during vm create +* Added delete-from-host flag for `vm delete` +* Deprecated VM List option as VM Instance is a child resource of Machines. +* Updated tests and helps accordingly. + 0.1.12 ++++++ * Fixed VM extension issue. diff --git a/src/connectedvmware/README.md b/src/connectedvmware/README.md index 04230307fcd..dc85f38cd65 100644 --- a/src/connectedvmware/README.md +++ b/src/connectedvmware/README.md @@ -105,7 +105,7 @@ az connectedvmware virtual-network create \ --name resourceName ``` -##### Create Virtual Machine Resource +##### Create Virtual Machine Instance Resource ``` az connectedvmware vm create \ diff --git a/src/connectedvmware/azext_connectedvmware/_client_factory.py b/src/connectedvmware/azext_connectedvmware/_client_factory.py index e7205c64c66..704a1ad3c7d 100644 --- a/src/connectedvmware/azext_connectedvmware/_client_factory.py +++ b/src/connectedvmware/azext_connectedvmware/_client_factory.py @@ -4,83 +4,106 @@ # -------------------------------------------------------------------------------------------- from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core import AzCli # Client factory for vmware clients. -from .vendored_sdks import AzureArcVMwareManagementServiceAPI +from .vendored_sdks.connectedvmware import AzureArcVMwareManagementServiceAPI +from .vendored_sdks.hybridcompute import HybridComputeManagementClient -def cf_connectedvmware(cli_ctx, *_): +def cf_connectedvmware(cli_ctx: AzCli, *_) -> AzureArcVMwareManagementServiceAPI: return get_mgmt_service_client(cli_ctx, AzureArcVMwareManagementServiceAPI) -def cf_vcenter(cli_ctx, *_): +def cf_hybridcompute(cli_ctx: AzCli, *_) -> HybridComputeManagementClient: + return get_mgmt_service_client(cli_ctx, HybridComputeManagementClient) + + +def cf_vcenter(cli_ctx: AzCli, *_): """ Client factory for vcenters. """ return cf_connectedvmware(cli_ctx).vcenters -def cf_resource_pool(cli_ctx, *_): +def cf_resource_pool(cli_ctx: AzCli, *_): """ Client factory for resourcepools. """ return cf_connectedvmware(cli_ctx).resource_pools -def cf_cluster(cli_ctx, *_): +def cf_cluster(cli_ctx: AzCli, *_): """ Client factory for clusters. """ return cf_connectedvmware(cli_ctx).clusters -def cf_datastore(cli_ctx, *_): +def cf_datastore(cli_ctx: AzCli, *_): """ Client factory for datastores. """ return cf_connectedvmware(cli_ctx).datastores -def cf_host(cli_ctx, *_): +def cf_host(cli_ctx: AzCli, *_): """ Client factory for hosts. """ return cf_connectedvmware(cli_ctx).hosts -def cf_virtual_network(cli_ctx, *_): +def cf_virtual_network(cli_ctx: AzCli, *_): """ Client factory for virtual networks. """ return cf_connectedvmware(cli_ctx).virtual_networks -def cf_virtual_machine_template(cli_ctx, *_): +def cf_virtual_machine_template(cli_ctx: AzCli, *_): """ Client factory for vm templates. """ return cf_connectedvmware(cli_ctx).virtual_machine_templates -def cf_virtual_machine(cli_ctx, *_): +def cf_virtual_machine(cli_ctx: AzCli, *_): """ Client factory for virtual machines. """ return cf_connectedvmware(cli_ctx).virtual_machines -def cf_inventory_item(cli_ctx, *_): +def cf_virtual_machine_instance(cli_ctx: AzCli, *_): + """ + Client factory for virtual machine instances. + """ + return cf_connectedvmware(cli_ctx).virtual_machine_instances + + +def cf_inventory_item(cli_ctx: AzCli, *_): """ Client factory for inventory items. """ return cf_connectedvmware(cli_ctx).inventory_items -def cf_guest_agent(cli_ctx, *_): +def cf_vminstance_guest_agent(cli_ctx: AzCli, *_): """ Client factory for guest agent. """ - return cf_connectedvmware(cli_ctx).guest_agents + return cf_connectedvmware(cli_ctx).vm_instance_guest_agents -def cf_machine_extension(cli_ctx, *_): - return cf_connectedvmware(cli_ctx).machine_extensions +def cf_machine(cli_ctx: AzCli, *_): + """ + Client factory for machines. + """ + return cf_hybridcompute(cli_ctx).machines + + +def cf_machine_extension(cli_ctx: AzCli, *_): + """ + Client factory for machines. + """ + return cf_hybridcompute(cli_ctx).machine_extensions diff --git a/src/connectedvmware/azext_connectedvmware/_params.py b/src/connectedvmware/azext_connectedvmware/_params.py index 3de5e810c70..05b693137b4 100644 --- a/src/connectedvmware/azext_connectedvmware/_params.py +++ b/src/connectedvmware/azext_connectedvmware/_params.py @@ -200,10 +200,21 @@ def load_arguments(self, _): with self.argument_context('connectedvmware vm delete') as c: c.argument('force', action='store_true', help="Whether force delete or not.") + c.argument( + 'delete_from_host', + action='store_true', + help='Delete the VM from the VMware host.', + ) + c.argument( + 'delete_machine', + action='store_true', + help='Delete the parent Microsoft.HybridCompute Machine resource', + ) c.argument( 'retain', action='store_true', - help='Disable the VM from azure; delete the ARM resource but retain the VM in VMware.', + help='Retain the VM in the VMWare host', + deprecate_info=c.deprecate(hide=True), ) with self.argument_context('connectedvmware vm stop') as c: diff --git a/src/connectedvmware/azext_connectedvmware/commands.py b/src/connectedvmware/azext_connectedvmware/commands.py index f6a067f14e4..42aef8595e3 100644 --- a/src/connectedvmware/azext_connectedvmware/commands.py +++ b/src/connectedvmware/azext_connectedvmware/commands.py @@ -4,14 +4,15 @@ # -------------------------------------------------------------------------------------------- # pylint: disable=line-too-long, disable=too-many-statements +from azure.cli.core import AzCommandsLoader from ._client_factory import ( cf_vcenter, cf_resource_pool, cf_virtual_network, cf_virtual_machine_template, - cf_virtual_machine, + cf_virtual_machine_instance, cf_inventory_item, - cf_guest_agent, + cf_vminstance_guest_agent, cf_cluster, cf_datastore, cf_host, @@ -19,7 +20,7 @@ ) -def load_command_table(self, _): +def load_command_table(self: AzCommandsLoader, _): with self.command_group('connectedvmware vcenter', client_factory=cf_vcenter) as g: g.custom_command('connect', 'connect_vcenter', supports_no_wait=True) @@ -82,19 +83,21 @@ def load_command_table(self, _): g.custom_command('list', 'list_vm_template') with self.command_group( - 'connectedvmware vm', client_factory=cf_virtual_machine + 'connectedvmware vm', client_factory=cf_virtual_machine_instance ) as g: g.custom_command('create', 'create_vm', supports_no_wait=True) g.custom_command('delete', 'delete_vm', supports_no_wait=True, confirmation=True) g.custom_command('update', 'update_vm', supports_no_wait=True) g.custom_show_command('show', 'show_vm') - g.custom_command('list', 'list_vm') + # g.custom_command('list', 'list_vm') + g.custom_command('list', 'list_vm', + deprecate_info=g.deprecate(redirect='az connectedvmware vm show', hide=True)) g.custom_command('start', 'start_vm', supports_no_wait=True) g.custom_command('stop', 'stop_vm', supports_no_wait=True) g.custom_command('restart', 'restart_vm', supports_no_wait=True) with self.command_group( - 'connectedvmware vm nic', client_factory=cf_virtual_machine + 'connectedvmware vm nic', client_factory=cf_virtual_machine_instance ) as g: g.custom_command('add', 'add_nic', supports_no_wait=True) g.custom_command('update', 'update_nic', supports_no_wait=True) @@ -103,7 +106,7 @@ def load_command_table(self, _): g.custom_command('list', 'list_nics') with self.command_group( - 'connectedvmware vm disk', client_factory=cf_virtual_machine + 'connectedvmware vm disk', client_factory=cf_virtual_machine_instance ) as g: g.custom_command('add', 'add_disk', supports_no_wait=True) g.custom_command('update', 'update_disk', supports_no_wait=True) @@ -112,7 +115,7 @@ def load_command_table(self, _): g.custom_command('list', 'list_disks') with self.command_group( - 'connectedvmware vm guest-agent', client_factory=cf_guest_agent + 'connectedvmware vm guest-agent', client_factory=cf_vminstance_guest_agent ) as g: g.custom_command('enable', 'enable_guest_agent', supports_no_wait=True) g.custom_show_command('show', 'show_guest_agent') diff --git a/src/connectedvmware/azext_connectedvmware/custom.py b/src/connectedvmware/azext_connectedvmware/custom.py index 7c1204ecbc3..6a8235127e0 100644 --- a/src/connectedvmware/azext_connectedvmware/custom.py +++ b/src/connectedvmware/azext_connectedvmware/custom.py @@ -5,11 +5,17 @@ # pylint: disable= too-many-lines, too-many-locals, unused-argument, too-many-branches, too-many-statements # pylint: disable= consider-using-dict-items, consider-using-f-string -from knack.util import CLIError +from azure.cli.command_modules.acs._client_factory import get_resources_client from azure.cli.core.util import sdk_no_wait -from azext_connectedvmware.pwinput import pwinput -from azext_connectedvmware.vmware_utils import get_resource_id +from azure.core.exceptions import ResourceNotFoundError # type: ignore +from knack.util import CLIError +from msrestazure.tools import is_valid_resource_id + +from .pwinput import pwinput +from .vmware_utils import get_resource_id from .vmware_constants import ( + VCENTER_KIND_GET_API_VERSION, + MACHINES_RESOURCE_TYPE, VMWARE_NAMESPACE, VCENTER_RESOURCE_TYPE, RESOURCEPOOL_RESOURCE_TYPE, @@ -36,16 +42,16 @@ DISK_MODE, CONTROLLER_KEY, UNIT_NUMBER, - VIRTUALMACHINE_RESOURCE_TYPE, VM_SYSTEM_ASSIGNED_INDENTITY_TYPE, - DEFAULT_GUEST_AGENT_NAME, GUEST_AGENT_PROVISIONING_ACTION_INSTALL, - MACHINE_RESOURCE_TYPE, + EXTENSIONS_RESOURCE_TYPE, + HCRP_NAMESPACE, ) -from .vendored_sdks.models import ( +from .vendored_sdks.connectedvmware.models import ( DiskMode, HardwareProfile, + InfrastructureProfile, IPAddressAllocationMethod, NetworkInterface, NetworkInterfaceUpdate, @@ -53,7 +59,7 @@ NetworkProfileUpdate, NicIPSettings, NICType, - OsProfile, + OsProfileForVMInstance, PowerOnBootOption, ResourcePool, Cluster, @@ -65,21 +71,27 @@ VICredential, VirtualDisk, VirtualDiskUpdate, - VirtualMachine, + VirtualMachineInstance, + VirtualMachineInstanceUpdate, VirtualMachineTemplate, - VirtualMachineUpdate, VirtualNetwork, ExtendedLocation, StopVirtualMachineOptions, - Identity, GuestAgent, GuestCredential, PlacementProfile, HttpProxyConfiguration, +) + +from .vendored_sdks.hybridcompute.models import ( + Identity, + Machine, MachineExtension, + MachineExtensionUpdate, + MachineUpdate, ) -from .vendored_sdks.operations import ( +from .vendored_sdks.connectedvmware.operations import ( VCentersOperations, ResourcePoolsOperations, ClustersOperations, @@ -87,14 +99,19 @@ HostsOperations, VirtualNetworksOperations, VirtualMachineTemplatesOperations, - VirtualMachinesOperations, + VirtualMachineInstancesOperations, + VMInstanceGuestAgentsOperations, InventoryItemsOperations, - GuestAgentsOperations, +) + +from .vendored_sdks.hybridcompute.operations import ( + MachinesOperations, MachineExtensionsOperations, ) from ._client_factory import ( - cf_virtual_machine, + cf_machine, + cf_virtual_machine_instance, ) # region VCenters @@ -147,6 +164,7 @@ def connect_vcenter( creds_ok = True elif res != 'n': print('Please type y/n or leave empty.') + assert fqdn username_creds = VICredential(username=username, password=password) @@ -709,14 +727,27 @@ def list_vm_template( # region VirtualMachines +def get_hcrp_machine_id( + cmd, + resource_group_name, + resource_name, +): + return get_resource_id( + cmd, + resource_group_name, + HCRP_NAMESPACE, + MACHINES_RESOURCE_TYPE, + resource_name, + ) + def create_vm( cmd, - client: VirtualMachinesOperations, + client: VirtualMachineInstancesOperations, resource_group_name, resource_name, custom_location, - location, + location=None, vcenter=None, vm_template=None, resource_pool=None, @@ -734,7 +765,6 @@ def create_vm( tags=None, no_wait=False, ): - if not any([vm_template, inventory_item, datastore]): raise CLIError( "either vm_template, inventory_item id or datastore must be provided." @@ -762,6 +792,12 @@ def create_vm( "Placement input cannot be provided together with inventory_item." ) + if not is_valid_resource_id(inventory_item) and not vcenter: + raise CLIError( + "Cannot determine inventory item ID. " + + "vCenter name or ID is required when inventory item name is specified." + ) + hardware_profile = None os_profile = None network_profile = None @@ -775,7 +811,7 @@ def create_vm( ) if admin_password is not None: - os_profile = OsProfile( + os_profile = OsProfileForVMInstance( admin_username=admin_username, admin_password=admin_password ) @@ -803,15 +839,20 @@ def create_vm( type=EXTENDED_LOCATION_TYPE, name=custom_location_id ) + vm = None + + # infrastructure profile parametes + infrastructure_profile = None inventory_item_id = None vcenter_id = None - vm = None vm_template_id = None + + # placement profile parameters + placement_profile = None resource_pool_id = None cluster_id = None host_id = None datastore_id = None - placement_profile = None if inventory_item is not None: inventory_item_id = get_resource_id( @@ -824,13 +865,9 @@ def create_vm( inventory_item, ) - vm = VirtualMachine( - location=location, - extended_location=extended_location, - hardware_profile=hardware_profile, - os_profile=os_profile, - network_profile=network_profile, - storage_profile=storage_profile, + vcenter_id = "/".join(inventory_item_id.rstrip("/").split("/")[:-2]) + + infrastructure_profile = InfrastructureProfile( inventory_item_id=inventory_item_id, ) else: @@ -893,39 +930,70 @@ def create_vm( datastore_id=datastore_id, ) - if vm_template is not None: - vm = VirtualMachine( - location=location, - extended_location=extended_location, - v_center_id=vcenter_id, - template_id=vm_template_id, - placement_profile=placement_profile, - hardware_profile=hardware_profile, - os_profile=os_profile, - network_profile=network_profile, - storage_profile=storage_profile, - tags=tags + infrastructure_profile = InfrastructureProfile( + v_center_id=vcenter_id, + template_id=vm_template_id, + ) + + vm = VirtualMachineInstance( + extended_location=extended_location, + placement_profile=placement_profile, + hardware_profile=hardware_profile, + os_profile=os_profile, + network_profile=network_profile, + storage_profile=storage_profile, + infrastructure_profile=infrastructure_profile, + ) + + # The subscription of the vCenter can be different from the machine resource. + # There was no straightforward way to change the subscription for vcenter client factory. + # Hence using the generic get client. + vcenter_sub = vcenter_id.split("/")[2] + resources_client = get_resources_client(cmd.cli_ctx, vcenter_sub) + vcenter = resources_client.get_by_id(vcenter_id, VCENTER_KIND_GET_API_VERSION) + + machine_client = cf_machine(cmd.cli_ctx) + machine = None + try: + machine = machine_client.get(resource_group_name, resource_name) + if machine.kind != vcenter.kind: + raise CLIError( + "The existing Machine resource is not of the same kind as the vCenter. " + + f"Machine kind: {machine.kind}, vCenter kind: {vcenter.kind}" ) - else: - vm = VirtualMachine( - location=location, - extended_location=extended_location, - v_center_id=vcenter_id, - placement_profile=placement_profile, - hardware_profile=hardware_profile, - os_profile=os_profile, - network_profile=network_profile, - storage_profile=storage_profile, - tags=tags + if location is not None and machine.location != location: + raise CLIError( + "The location of the existing Machine cannot be updated. " + + "Either specify the existing location or keep the location unspecified. " + + f"Existing location: {machine.location}, Provided location: {location}" ) + if tags is not None: + m = MachineUpdate( + tags=tags, + ) + machine = machine_client.update(resource_group_name, resource_name, m) + except ResourceNotFoundError as e: + if location is None: + raise CLIError( + "The parent Machine resource does not exist, " + + "location is required while creating a new machine." + ) from e + m = Machine( + location=location, + kind=vcenter.kind, + tags=tags, + ) + machine = machine_client.create_or_update(resource_group_name, resource_name, m) + assert machine.id is not None return sdk_no_wait( - no_wait, client.begin_create, resource_group_name, resource_name, vm + no_wait, client.begin_create_or_update, machine.id, vm ) def update_vm( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, resource_name, num_CPUs=None, @@ -935,6 +1003,19 @@ def update_vm( no_wait=False, ): + machine_client = cf_machine(cmd.cli_ctx) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + resource_name, + ) + + if tags is not None: + m = MachineUpdate( + tags=tags, + ) + machine_client.update(resource_group_name, resource_name, m) + hardware_profile = None if ( @@ -956,83 +1037,143 @@ def update_vm( num_cores_per_socket=num_cores_per_socket, ) - vm_update = VirtualMachineUpdate( + vm_update = VirtualMachineInstanceUpdate( hardware_profile=hardware_profile, - tags=tags ) return sdk_no_wait( no_wait, client.begin_update, - resource_group_name, - resource_name, + machine_id, vm_update ) def delete_vm( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, resource_name, - force=False, + force=None, + delete_from_host=None, + delete_machine=None, retain=None, no_wait=False, ): - return sdk_no_wait( - no_wait, client.begin_delete, resource_group_name, resource_name, force, retain, + if retain and delete_from_host: + raise CLIError( + "Arguments --retain and --delete-from-host cannot be used together." + + "VM is retained in VMWare by default, it is deleted when --delete-from-host is provided." + ) + + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + resource_name, ) + machine_client = cf_machine(cmd.cli_ctx) -def show_vm(client: VirtualMachinesOperations, resource_group_name, resource_name): + if no_wait and delete_machine: + if delete_from_host: + raise CLIError( + "Cannot delete VMWare VM from host when --no-wait and --delete-machine is provided." + ) + machine_client.delete(resource_group_name, resource_name) + return - return client.get(resource_group_name, resource_name) + try: + op = sdk_no_wait( + no_wait, client.begin_delete, machine_id, delete_from_host, force, + ) + except ResourceNotFoundError: + # Nothing to delete if the parent machine does not exist. + return + op.result() + if delete_machine: + # Wait for the VM to be deleted from the host. + machine_client.delete(resource_group_name, resource_name) -def list_vm(client: VirtualMachinesOperations, resource_group_name=None): - if resource_group_name: - return client.list_by_resource_group(resource_group_name) - return client.list() +def show_vm( + cmd, + client: VirtualMachineInstancesOperations, + resource_group_name, + resource_name, +): + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + resource_name, + ) + return client.get(machine_id) + + +def list_vm( + cmd, + resource_group_name=None, +): + resources_filter = "resourceType eq 'Microsoft.ConnectedVMwarevSphere/VirtualMachineInstances'" + resources_client = get_resources_client(cmd.cli_ctx) + if resource_group_name is not None: + return list(resources_client.list_by_resource_group(resource_group_name, filter=resources_filter)) + return list(resources_client.list(filter=resources_filter)) def start_vm( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, resource_name, no_wait=False, ): - - return sdk_no_wait(no_wait, client.begin_start, resource_group_name, resource_name) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + resource_name, + ) + return sdk_no_wait(no_wait, client.begin_start, machine_id) def stop_vm( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, resource_name, skip_shutdown=False, no_wait=False, ): + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + resource_name, + ) body = StopVirtualMachineOptions(skip_shutdown=skip_shutdown) return sdk_no_wait( no_wait, client.begin_stop, - resource_group_name, - resource_name, + machine_id, body ) def restart_vm( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, resource_name, no_wait=False, ): - + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + resource_name, + ) return sdk_no_wait( - no_wait, client.begin_restart, resource_group_name, resource_name + no_wait, client.begin_restart, machine_id, ) @@ -1123,7 +1264,7 @@ def get_disks(input_disks): def add_nic( cmd, - client: VirtualMachinesOperations, + client: VirtualMachineInstancesOperations, resource_group_name, vm_name, nic_name, @@ -1151,8 +1292,14 @@ def add_nic( nic_type=nic_type, ) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + nics_update = [] - vm = client.get(resource_group_name, vm_name) + vm = client.get(machine_id) if ( vm.network_profile is not None and vm.network_profile.network_interfaces is not None @@ -1169,16 +1316,16 @@ def add_nic( nics_update.append(nic_to_add) network_profile = NetworkProfileUpdate(network_interfaces=nics_update) - vm_update = VirtualMachineUpdate(network_profile=network_profile) + vm_update = VirtualMachineInstanceUpdate(network_profile=network_profile) return sdk_no_wait( - no_wait, client.begin_update, resource_group_name, vm_name, vm_update + no_wait, client.begin_update, machine_id, vm_update ) def update_nic( cmd, - client: VirtualMachinesOperations, + client: VirtualMachineInstancesOperations, resource_group_name, vm_name, nic_name=None, @@ -1206,9 +1353,15 @@ def update_nic( network, ) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + nics_update = [] nic_found = False - vm = client.get(resource_group_name, vm_name) + vm = client.get(machine_id) if ( vm.network_profile is not None and vm.network_profile.network_interfaces is not None @@ -1236,7 +1389,7 @@ def update_nic( raise CLIError( "Incorrect nic-name and device-key combination, Expected " + "nic-name: " + - nic.name + + str(nic.name) + ", device-key: " + str(nic.device_key) + "." @@ -1256,30 +1409,53 @@ def update_nic( raise CLIError("Given nic is not present in the virtual machine.") network_profile = NetworkProfileUpdate(network_interfaces=nics_update) - vm_update = VirtualMachineUpdate(network_profile=network_profile) + vm_update = VirtualMachineInstanceUpdate(network_profile=network_profile) return sdk_no_wait( - no_wait, client.begin_update, resource_group_name, vm_name, vm_update + no_wait, client.begin_update, machine_id, vm_update ) -def list_nics(client: VirtualMachinesOperations, resource_group_name, vm_name): +def list_nics( + cmd, + client: VirtualMachineInstancesOperations, + resource_group_name, + vm_name, +): """ List details of a virtual machine nics. """ - vm = client.get(resource_group_name, vm_name) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + + vm = client.get(machine_id) if vm.network_profile is not None: return vm.network_profile.network_interfaces return None -def show_nic(client: VirtualMachinesOperations, resource_group_name, vm_name, nic_name): +def show_nic( + cmd, + client: VirtualMachineInstancesOperations, + resource_group_name, + vm_name, + nic_name, +): """ Get the details of a virtual machine nic. """ - vm = client.get(resource_group_name, vm_name) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + + vm = client.get(machine_id) if ( vm.network_profile is not None and vm.network_profile.network_interfaces is not None @@ -1291,7 +1467,8 @@ def show_nic(client: VirtualMachinesOperations, resource_group_name, vm_name, ni def delete_nics( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, vm_name, nic_names, @@ -1301,13 +1478,19 @@ def delete_nics( Delete virtual network interfaces from virtual machine. """ + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + # Dictionary to maintain the nics to delete. nics_to_delete = {} for nic_name in nic_names: nics_to_delete[nic_name] = True nics_update = [] - vm = client.get(resource_group_name, vm_name) + vm = client.get(machine_id) if ( vm.network_profile is not None and vm.network_profile.network_interfaces is not None @@ -1337,10 +1520,10 @@ def delete_nics( ) network_profile = NetworkProfileUpdate(network_interfaces=nics_update) - vm_update = VirtualMachineUpdate(network_profile=network_profile) + vm_update = VirtualMachineInstanceUpdate(network_profile=network_profile) return sdk_no_wait( - no_wait, client.begin_update, resource_group_name, vm_name, vm_update + no_wait, client.begin_update, machine_id, vm_update ) @@ -1350,7 +1533,8 @@ def delete_nics( def add_disk( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, vm_name, disk_name, @@ -1372,8 +1556,14 @@ def add_disk( unit_number=unit_number, ) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + disks_update = [] - vm = client.get(resource_group_name, vm_name) + vm = client.get(machine_id) if vm.storage_profile is not None and vm.storage_profile.disks is not None: for disk in vm.storage_profile.disks: disk_update = VirtualDiskUpdate( @@ -1388,15 +1578,16 @@ def add_disk( disks_update.append(disk_to_add) storage_profile = StorageProfileUpdate(disks=disks_update) - vm_update = VirtualMachineUpdate(storage_profile=storage_profile) + vm_update = VirtualMachineInstanceUpdate(storage_profile=storage_profile) return sdk_no_wait( - no_wait, client.begin_update, resource_group_name, vm_name, vm_update + no_wait, client.begin_update, machine_id, vm_update ) def update_disk( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, vm_name, disk_name=None, @@ -1416,9 +1607,15 @@ def update_disk( "Either disk name or device key must be specified to update the disk." ) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + disks_update = [] disk_found = False - vm = client.get(resource_group_name, vm_name) + vm = client.get(machine_id) if vm.storage_profile is not None and vm.storage_profile.disks is not None: for disk in vm.storage_profile.disks: disk_update = VirtualDiskUpdate( @@ -1444,7 +1641,7 @@ def update_disk( raise CLIError( "Incorrect disk-name and device-key combination, Expected " "disk-name: " + - disk.name + + str(disk.name) + ", device-key: " + str(disk.device_key) + "." @@ -1465,35 +1662,56 @@ def update_disk( disks_update.append(disk_update) if not disk_found: - raise CLIError("Given disk is not present in the virtual machine.") + raise CLIError("The provided disk is not present in the virtual machine.") storage_profile = StorageProfileUpdate(disks=disks_update) - vm_update = VirtualMachineUpdate(storage_profile=storage_profile) + vm_update = VirtualMachineInstanceUpdate(storage_profile=storage_profile) return sdk_no_wait( - no_wait, client.begin_update, resource_group_name, vm_name, vm_update + no_wait, client.begin_update, machine_id, vm_update ) -def list_disks(client: VirtualMachinesOperations, resource_group_name, vm_name): +def list_disks( + cmd, + client: VirtualMachineInstancesOperations, + resource_group_name, + vm_name, +): """ List details of a virtual machine disks. """ - vm = client.get(resource_group_name, vm_name) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + + vm = client.get(machine_id) if vm.storage_profile is not None: return vm.storage_profile.disks return None def show_disk( - client: VirtualMachinesOperations, resource_group_name, vm_name, disk_name + cmd, + client: VirtualMachineInstancesOperations, + resource_group_name, + vm_name, + disk_name, ): """ Get the details of a virtual machine disk. """ - vm = client.get(resource_group_name, vm_name) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + + vm = client.get(machine_id) if vm.storage_profile is not None and vm.storage_profile.disks is not None: for disk in vm.storage_profile.disks: if disk.name == disk_name: @@ -1502,7 +1720,8 @@ def show_disk( def delete_disks( - client: VirtualMachinesOperations, + cmd, + client: VirtualMachineInstancesOperations, resource_group_name, vm_name, disk_names, @@ -1517,15 +1736,21 @@ def delete_disks( for disk_name in disk_names: disks_to_delete[disk_name] = True + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + disks_update = [] - vm = client.get(resource_group_name, vm_name) + vm = client.get(machine_id) if vm.storage_profile is not None and vm.storage_profile.disks is not None: for disk in vm.storage_profile.disks: if disk.name in disks_to_delete: disks_to_delete[disk.name] = False continue disk_update = VirtualDiskUpdate( - name=disk.disk_name, + name=disk.name, disk_size_gb=disk.disk_size_gb, disk_mode=disk.disk_mode, controller_key=disk.controller_key, @@ -1546,10 +1771,10 @@ def delete_disks( ) storage_profile = StorageProfileUpdate(disks=disks_update) - vm_update = VirtualMachineUpdate(storage_profile=storage_profile) + vm_update = VirtualMachineInstanceUpdate(storage_profile=storage_profile) return sdk_no_wait( - no_wait, client.begin_update, resource_group_name, vm_name, vm_update + no_wait, client.begin_update, machine_id, vm_update ) @@ -1558,45 +1783,34 @@ def delete_disks( # region GuestAgent -def is_system_identity_enabled( - client: VirtualMachinesOperations, - resource_group_name, - vm_name, -): +def is_system_identity_enabled(machine: Machine): """ Check whether system identity is enable or not on this vm. """ - vm = client.get(resource_group_name, vm_name) - - if vm.identity is not None and vm.identity.type == VM_SYSTEM_ASSIGNED_INDENTITY_TYPE: + if machine.identity is not None and machine.identity.type == VM_SYSTEM_ASSIGNED_INDENTITY_TYPE: return True return False def enable_system_identity( - client: VirtualMachinesOperations, + client: MachinesOperations, resource_group_name, vm_name, - no_wait=False, ): """ Enable system assigned identity on this vm. """ system_identity = Identity(type=VM_SYSTEM_ASSIGNED_INDENTITY_TYPE) - - vm_update = VirtualMachineUpdate(identity=system_identity) - - return sdk_no_wait( - no_wait, client.begin_update, resource_group_name, vm_name, vm_update - ) + vm_update = MachineUpdate(identity=system_identity) + return client.update(resource_group_name, vm_name, vm_update) def enable_guest_agent( cmd, - client: GuestAgentsOperations, + client: VMInstanceGuestAgentsOperations, resource_group_name, vm_name, username, @@ -1608,41 +1822,41 @@ def enable_guest_agent( Enable guest agent on the given virtual machine. """ - vm_client = cf_virtual_machine(cmd.cli_ctx) + machine_client = cf_machine(cmd.cli_ctx) + machine = machine_client.get(resource_group_name, vm_name) + assert machine.id is not None - if is_system_identity_enabled(vm_client, resource_group_name, vm_name) is False: - enable_system_identity(vm_client, resource_group_name, vm_name, False).result() + # To ensure that the VirtualMachineInstance resource is present + # before patching identity to SystemAssigned. + vm_client = cf_virtual_machine_instance(cmd.cli_ctx) + vm_client.get(machine.id) - vm_creds = GuestCredential(username=username, password=password) + if not is_system_identity_enabled(machine): + machine = enable_system_identity(machine_client, resource_group_name, vm_name) - resource_id = get_resource_id(cmd, resource_group_name, VMWARE_NAMESPACE, VIRTUALMACHINE_RESOURCE_TYPE, vm_name) + vm_creds = GuestCredential(username=username, password=password) https_proxy_config = None - if https_proxy: https_proxy_config = HttpProxyConfiguration(https_proxy=https_proxy) guest_agent = GuestAgent( - id=resource_id, - type=VIRTUALMACHINE_RESOURCE_TYPE, - name=DEFAULT_GUEST_AGENT_NAME, credentials=vm_creds, - provisioning_action=GUEST_AGENT_PROVISIONING_ACTION_INSTALL, http_proxy_config=https_proxy_config, + provisioning_action=GUEST_AGENT_PROVISIONING_ACTION_INSTALL, ) return sdk_no_wait( no_wait, client.begin_create, - resource_group_name, - vm_name, - DEFAULT_GUEST_AGENT_NAME, + machine.id, guest_agent ) def show_guest_agent( - client: GuestAgentsOperations, + cmd, + client: VMInstanceGuestAgentsOperations, resource_group_name, vm_name, ): @@ -1650,7 +1864,13 @@ def show_guest_agent( Show the guest agent of the given vm and guest agent. """ - return client.get(resource_group_name, vm_name, DEFAULT_GUEST_AGENT_NAME) + machine_id = get_hcrp_machine_id( + cmd, + resource_group_name, + vm_name, + ) + + return client.get(machine_id) # endregion @@ -1669,7 +1889,7 @@ def connectedvmware_extension_list( """ return client.list(resource_group_name=resource_group_name, - name=vm_name, + machine_name=vm_name, expand=expand) @@ -1684,7 +1904,7 @@ def connectedvmware_extension_show( """ return client.get(resource_group_name=resource_group_name, - name=vm_name, + machine_name=vm_name, extension_name=name) @@ -1713,10 +1933,10 @@ def connectedvmware_extension_create( resource_id = get_resource_id( cmd, resource_group_name, - VMWARE_NAMESPACE, - VIRTUALMACHINE_RESOURCE_TYPE, + HCRP_NAMESPACE, + MACHINES_RESOURCE_TYPE, vm_name, - MACHINE_RESOURCE_TYPE, + EXTENSIONS_RESOURCE_TYPE, name ) @@ -1738,7 +1958,7 @@ def connectedvmware_extension_create( return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name=resource_group_name, - name=vm_name, + machine_name=vm_name, extension_name=name, extension_parameters=machine_extension) @@ -1763,7 +1983,7 @@ def connectedvmware_extension_update( Update the vm extension of a given vm. """ - machine_extension = MachineExtension( + machine_extension = MachineExtensionUpdate( tags=tags, force_update_tag=force_update_tag, publisher=publisher, @@ -1778,7 +1998,7 @@ def connectedvmware_extension_update( return sdk_no_wait(no_wait, client.begin_update, resource_group_name=resource_group_name, - name=vm_name, + machine_name=vm_name, extension_name=name, extension_parameters=machine_extension) @@ -1797,7 +2017,7 @@ def connectedvmware_extension_delete( return sdk_no_wait(no_wait, client.begin_delete, resource_group_name=resource_group_name, - name=vm_name, + machine_name=vm_name, extension_name=name) diff --git a/src/connectedvmware/azext_connectedvmware/tests/latest/recordings/test_connectedvmware.yaml b/src/connectedvmware/azext_connectedvmware/tests/latest/recordings/test_connectedvmware.yaml index 74efd30e38c..c45da8f4a6e 100644 --- a/src/connectedvmware/azext_connectedvmware/tests/latest/recordings/test_connectedvmware.yaml +++ b/src/connectedvmware/azext_connectedvmware/tests/latest/recordings/test_connectedvmware.yaml @@ -13,23 +13,23 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc","name":"azcli-test-vc","type":"microsoft.connectedvmwarevsphere/vcenters","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azcli-test-rg/providers/microsoft.extendedlocation/customlocations/azcli-test-cl"},"tags":{},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-16T15:53:39.9929387Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-16T15:53:39.9929387Z"},"properties":{"credentials":{"username":"arcvmware"},"fqdn":"idclab-vcen67.fareast.corp.microsoft.com","port":443,"provisioningState":"Succeeded","uuid":"e6048b2a-ba86-4334-adff-ba3d617d12ef","statuses":[{"status":"True","type":"Connected","lastUpdatedAt":"2023-02-16T15:54:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-16T15:54:08.0421592Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-16T15:54:08.0421592Z"}],"customResourceName":"e6048b2a-ba86-4334-adff-ba3d617d12ef","version":"6.7.0","instanceUuid":"db73f8f2-624c-4a0f-905b-8c6f34442cbc","connectionStatus":"Connected"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc","name":"azcli-test-vc","type":"microsoft.connectedvmwarevsphere/vcenters","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azcli-test-rg/providers/microsoft.extendedlocation/customlocations/azcli-test-cl"},"tags":{},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-16T15:53:39.9929387Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-08-06T23:44:21.1344414Z"},"properties":{"credentials":{"username":"arcvmware"},"uuid":"e6048b2a-ba86-4334-adff-ba3d617d12ef","fqdn":"idclab-vcen67.fareast.corp.microsoft.com","port":443,"version":"6.7.0","instanceUuid":"db73f8f2-624c-4a0f-905b-8c6f34442cbc","customResourceName":"e6048b2a-ba86-4334-adff-ba3d617d12ef","connectionStatus":"Connected","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Connected","lastUpdatedAt":"2023-08-06T23:44:15Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"}]}}' headers: cache-control: - no-cache content-length: - - '1319' + - '1339' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:54:39 GMT + - Mon, 07 Aug 2023 13:57:48 GMT etag: - - '"09001347-0000-0100-0000-63ee51a00000"' + - '"1600d91b-0000-0100-0000-64d030550000"' expires: - '-1' pragma: @@ -61,21 +61,21 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc","name":"azcli-test-vc","type":"microsoft.connectedvmwarevsphere/vcenters","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azcli-test-rg/providers/microsoft.extendedlocation/customlocations/azcli-test-cl"},"tags":{},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-16T15:53:39.9929387Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-16T15:53:39.9929387Z"},"properties":{"credentials":{"username":"arcvmware"},"fqdn":"idclab-vcen67.fareast.corp.microsoft.com","port":443,"provisioningState":"Succeeded","uuid":"e6048b2a-ba86-4334-adff-ba3d617d12ef","statuses":[{"status":"True","type":"Connected","lastUpdatedAt":"2023-02-16T15:54:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-16T15:54:08.0421592Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-16T15:54:08.0421592Z"}],"customResourceName":"e6048b2a-ba86-4334-adff-ba3d617d12ef","version":"6.7.0","instanceUuid":"db73f8f2-624c-4a0f-905b-8c6f34442cbc","connectionStatus":"Connected"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc","name":"azcli-test-vc","type":"microsoft.connectedvmwarevsphere/vcenters","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azcli-test-rg/providers/microsoft.extendedlocation/customlocations/azcli-test-cl"},"tags":{},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-16T15:53:39.9929387Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-08-06T23:44:21.1344414Z"},"properties":{"credentials":{"username":"arcvmware"},"uuid":"e6048b2a-ba86-4334-adff-ba3d617d12ef","fqdn":"idclab-vcen67.fareast.corp.microsoft.com","port":443,"version":"6.7.0","instanceUuid":"db73f8f2-624c-4a0f-905b-8c6f34442cbc","customResourceName":"e6048b2a-ba86-4334-adff-ba3d617d12ef","connectionStatus":"Connected","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Connected","lastUpdatedAt":"2023-08-06T23:44:15Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"}]}}]}' headers: cache-control: - no-cache content-length: - - '1331' + - '1351' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:54:40 GMT + - Mon, 07 Aug 2023 13:57:49 GMT expires: - '-1' pragma: @@ -87,13 +87,19 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 2d2628bd-07b1-4fc4-9c54-2a9678b7bd21 - - c8abf2b2-4ffd-4004-89af-5b2af76aed13 - - 431efe6a-7479-40bc-91db-d8856a9de438 - - f0affe74-5ffb-4316-bd6c-ff4c89b9189a - - 09077d9a-0425-4266-9795-94cb777d06e1 - - 6e5ca19b-6b8f-4b36-9099-1e61b12995fe - - b95c54c8-7c74-411d-838d-d6c6bda429f6 + - 8db73dbf-55a0-4f92-926c-e4073c5961a5 + - 7f467427-6b6b-48a9-ad4e-216e0176f45c + - 076a1cc1-3e16-41a4-b9b7-ae5413ec7b58 + - 4d40d4a9-505b-4e1e-b6f4-2c47130a9334 + - b128bfe3-2760-4b94-ab19-f8f5b9daaef0 + - 4d8e3771-5f59-40af-9fd6-bb6ad3d1d8ba + - 64dccb87-492b-49f0-b9a1-6b6bc9f180c6 + - f440c01e-1ab0-4676-aaf3-27adfe501edd + - b23d1363-62cf-4942-9811-e49bbad83fa9 + - c0b99172-9757-4025-bb86-65de0ad4ecb9 + - b038646c-aedc-4945-abbc-7e66925e0061 + - e7a1c836-0f43-41e5-9e9d-eb634b036ca6 + - bfb3d3ee-c006-45b5-9072-58189514c7fa status: code: 200 message: OK @@ -117,27 +123,27 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:54:49.6180687Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:54:49.6180687Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:26:04.3778436Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:57:51.4718897Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","memOverallUsageGB":14,"memCapacityGB":460,"uuid":"c47f5a55-a805-45a4-a241-0fd3600bfd59","moRefId":"resgroup-724471","moName":"azcli-test-rp","customResourceName":"c47f5a55-a805-45a4-a241-0fd3600bfd59","cpuSharesLevel":"normal","cpuLimitMHz":-1,"memSharesLevel":"normal","memLimitMB":-1,"provisioningState":"Accepted","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-05T10:43:50.0673346Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-05T10:43:50.0673346Z"}]}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/43a2e27c-975c-44a9-9045-7edf1a8df71c*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2d70b2bf-da86-4861-8b1e-89b2483bd3cd*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '1126' + - '1962' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:54:53 GMT + - Mon, 07 Aug 2023 13:57:51 GMT etag: - - '"3c003e2e-0000-0100-0000-63f27e8c0000"' + - '"600007c0-0000-0100-0000-64d0f8600000"' expires: - '-1' location: @@ -151,7 +157,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -169,23 +175,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/43a2e27c-975c-44a9-9045-7edf1a8df71c*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2d70b2bf-da86-4861-8b1e-89b2483bd3cd*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/43a2e27c-975c-44a9-9045-7edf1a8df71c*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","name":"43a2e27c-975c-44a9-9045-7edf1a8df71c*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","status":"Succeeded","startTime":"2023-02-19T19:54:52.7008139Z","endTime":"2023-02-19T19:55:10.6770831Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2d70b2bf-da86-4861-8b1e-89b2483bd3cd*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","name":"2d70b2bf-da86-4861-8b1e-89b2483bd3cd*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","status":"Succeeded","startTime":"2023-08-07T13:57:52.020663Z","endTime":"2023-08-07T13:58:14.1801034Z","properties":null}' headers: cache-control: - no-cache content-length: - - '601' + - '600' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:55:24 GMT + - Mon, 07 Aug 2023 13:58:22 GMT etag: - - '"240010d0-0000-0100-0000-63f27e9e0000"' + - '"7200fef0-0000-0100-0000-64d0f8760000"' expires: - '-1' pragma: @@ -215,23 +221,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:54:49.6180687Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:54:49.6180687Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"736b210c-2d71-4f68-b8b9-440a7c17d3de","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:55:10.3512258Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:55:10.3512258Z"}],"moRefId":"resgroup-724471","customResourceName":"736b210c-2d71-4f68-b8b9-440a7c17d3de","moName":"azcli-test-rp","cpuSharesLevel":"normal","cpuLimitMHz":-1,"memSharesLevel":"normal","memLimitMB":-1}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:26:04.3778436Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:57:51.4718897Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","memOverallUsageGB":14,"memCapacityGB":460,"uuid":"c47f5a55-a805-45a4-a241-0fd3600bfd59","moRefId":"resgroup-724471","moName":"azcli-test-rp","customResourceName":"c47f5a55-a805-45a4-a241-0fd3600bfd59","cpuSharesLevel":"normal","cpuLimitMHz":-1,"memSharesLevel":"normal","memLimitMB":-1,"provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:58:13.8427978Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:58:13.8427978Z"}]}}' headers: cache-control: - no-cache content-length: - - '1543' + - '1963' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:55:25 GMT + - Mon, 07 Aug 2023 13:58:23 GMT etag: - - '"3c006a2e-0000-0100-0000-63f27e9e0000"' + - '"600076c3-0000-0100-0000-64d0f8760000"' expires: - '-1' pragma: @@ -263,23 +269,23 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:54:49.6180687Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:54:49.6180687Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"736b210c-2d71-4f68-b8b9-440a7c17d3de","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:55:10.3512258Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:55:10.3512258Z"}],"moRefId":"resgroup-724471","customResourceName":"736b210c-2d71-4f68-b8b9-440a7c17d3de","moName":"azcli-test-rp","cpuSharesLevel":"normal","cpuLimitMHz":-1,"memSharesLevel":"normal","memLimitMB":-1}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:26:04.3778436Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:57:51.4718897Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","memOverallUsageGB":14,"memCapacityGB":460,"uuid":"c47f5a55-a805-45a4-a241-0fd3600bfd59","moRefId":"resgroup-724471","moName":"azcli-test-rp","customResourceName":"c47f5a55-a805-45a4-a241-0fd3600bfd59","cpuSharesLevel":"normal","cpuLimitMHz":-1,"memSharesLevel":"normal","memLimitMB":-1,"provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:58:13.8427978Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:58:13.8427978Z"}]}}' headers: cache-control: - no-cache content-length: - - '1543' + - '1963' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:55:27 GMT + - Mon, 07 Aug 2023 13:58:25 GMT etag: - - '"3c006a2e-0000-0100-0000-63f27e9e0000"' + - '"600076c3-0000-0100-0000-64d0f8760000"' expires: - '-1' pragma: @@ -311,21 +317,21 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:54:49.6180687Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:54:49.6180687Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"736b210c-2d71-4f68-b8b9-440a7c17d3de","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:55:10.3512258Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:55:10.3512258Z"}],"moRefId":"resgroup-724471","customResourceName":"736b210c-2d71-4f68-b8b9-440a7c17d3de","moName":"azcli-test-rp","cpuSharesLevel":"normal","cpuLimitMHz":-1,"memSharesLevel":"normal","memLimitMB":-1}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","name":"azcli-test-resource-pool","type":"microsoft.connectedvmwarevsphere/resourcepools","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:26:04.3778436Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:57:51.4718897Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/resgroup-724471","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","memOverallUsageGB":14,"memCapacityGB":460,"uuid":"c47f5a55-a805-45a4-a241-0fd3600bfd59","moRefId":"resgroup-724471","moName":"azcli-test-rp","customResourceName":"c47f5a55-a805-45a4-a241-0fd3600bfd59","cpuSharesLevel":"normal","cpuLimitMHz":-1,"memSharesLevel":"normal","memLimitMB":-1,"provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:58:13.8427978Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:58:13.8427978Z"}]}}]}' headers: cache-control: - no-cache content-length: - - '1555' + - '1975' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:55:29 GMT + - Mon, 07 Aug 2023 13:58:27 GMT expires: - '-1' pragma: @@ -337,13 +343,19 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 84dea95e-eccc-459c-811f-8172c01cd0fc - - 35cc8f90-40aa-4ca6-8427-1785c6a8b652 - - 8cedb322-3817-4760-8cf3-a7a599d909ad - - 8130dcca-7bc6-4036-924c-eaa39ea09039 - - 5aa6fbb9-7675-48d2-8984-f67b52f8e6c2 - - e9859692-dfea-48dd-a4e1-4e1407eb3da6 - - 8d9446d1-b392-4c91-8ca5-5c510f96c5cb + - 54254123-e40b-47b5-9dca-671a3780a888 + - 7f5638cf-1cff-466b-89bb-2fdf34da65cc + - 02729f19-e775-4f4e-905d-6c36673df8de + - e8d3e4d8-eb68-41ef-b5fc-6a8cfd7c2961 + - 74680f1a-267a-43a7-9c9c-85fd208cf216 + - 42237f42-342a-4ead-bdd9-943879a535ba + - 9d3713e8-77f2-4d5c-8a16-7d385a763eb6 + - 0e1b0e63-5558-413c-b042-8e08e4aff767 + - 1574e813-7b9a-4b1c-a1af-ba4e8d43a6fc + - 83731a88-49bb-4ba0-96bb-1c21b8756180 + - 3f2429bb-77fc-43cc-b729-b05741fa997c + - 73abe826-a860-458a-913f-ec4a1136ba2c + - 19d75f76-29b3-4b30-a1ce-ab3cc035ba90 status: code: 200 message: OK @@ -367,27 +379,27 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:55:38.8813578Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:55:38.8813578Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:27:13.7730754Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:58:28.06192Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","usedMemoryGB":461,"totalMemoryGB":510,"usedCPUMHz":38900,"totalCPUMHz":315936,"uuid":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","customResourceName":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","moRefId":"domain-c649660","moName":"Cluster1","provisioningState":"Accepted","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-05T10:44:28.9920525Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-05T10:44:28.9920525Z"}]}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/c170953b-cdf9-4145-9375-997655132d8b*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/eee69afa-76d3-498d-a248-f38d1e68bd5f*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '1103' + - '1882' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:55:43 GMT + - Mon, 07 Aug 2023 13:58:29 GMT etag: - - '"940021c3-0000-0100-0000-63f27ebe0000"' + - '"2c00d963-0000-0100-0000-64d0f8850000"' expires: - '-1' location: @@ -401,7 +413,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -419,12 +431,12 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/c170953b-cdf9-4145-9375-997655132d8b*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/eee69afa-76d3-498d-a248-f38d1e68bd5f*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/c170953b-cdf9-4145-9375-997655132d8b*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","name":"c170953b-cdf9-4145-9375-997655132d8b*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","status":"Succeeded","startTime":"2023-02-19T19:55:42.1656092Z","endTime":"2023-02-19T19:55:50.7058726Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/eee69afa-76d3-498d-a248-f38d1e68bd5f*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","name":"eee69afa-76d3-498d-a248-f38d1e68bd5f*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","status":"Succeeded","startTime":"2023-08-07T13:58:29.4612226Z","endTime":"2023-08-07T13:58:41.9530535Z","properties":null}' headers: cache-control: - no-cache @@ -433,9 +445,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:56:13 GMT + - Mon, 07 Aug 2023 13:58:59 GMT etag: - - '"240045d0-0000-0100-0000-63f27ec60000"' + - '"720066fb-0000-0100-0000-64d0f8910000"' expires: - '-1' pragma: @@ -465,23 +477,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:55:38.8813578Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:55:38.8813578Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"720c2c49-1754-432a-99ba-e18f0a42f86d","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:55:50.3999924Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:55:50.3999924Z"}],"customResourceName":"720c2c49-1754-432a-99ba-e18f0a42f86d","moRefId":"domain-c649660","datastoreIds":[],"networkIds":[],"moName":"Cluster1"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:27:13.7730754Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:58:28.06192Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","usedMemoryGB":473849,"totalMemoryGB":510,"usedCPUMHz":42010,"totalCPUMHz":315936,"uuid":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","customResourceName":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","moRefId":"domain-c649660","moName":"Cluster1","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:58:41.5944453Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:58:41.5944453Z"}]}}' headers: cache-control: - no-cache content-length: - - '1463' + - '1886' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:56:14 GMT + - Mon, 07 Aug 2023 13:59:00 GMT etag: - - '"940047c3-0000-0100-0000-63f27ec60000"' + - '"2c00c167-0000-0100-0000-64d0f8910000"' expires: - '-1' pragma: @@ -513,23 +525,23 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:55:38.8813578Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:55:38.8813578Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"720c2c49-1754-432a-99ba-e18f0a42f86d","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:55:50.3999924Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:55:50.3999924Z"}],"customResourceName":"720c2c49-1754-432a-99ba-e18f0a42f86d","moRefId":"domain-c649660","datastoreIds":[],"networkIds":[],"moName":"Cluster1"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:27:13.7730754Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:58:28.06192Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","usedMemoryGB":473849,"totalMemoryGB":510,"usedCPUMHz":42010,"totalCPUMHz":315936,"uuid":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","customResourceName":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","moRefId":"domain-c649660","moName":"Cluster1","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:58:41.5944453Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:58:41.5944453Z"}]}}' headers: cache-control: - no-cache content-length: - - '1463' + - '1886' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:56:18 GMT + - Mon, 07 Aug 2023 13:59:01 GMT etag: - - '"940047c3-0000-0100-0000-63f27ec60000"' + - '"2c00c167-0000-0100-0000-64d0f8910000"' expires: - '-1' pragma: @@ -561,21 +573,21 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:55:38.8813578Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:55:38.8813578Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"720c2c49-1754-432a-99ba-e18f0a42f86d","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:55:50.3999924Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:55:50.3999924Z"}],"customResourceName":"720c2c49-1754-432a-99ba-e18f0a42f86d","moRefId":"domain-c649660","datastoreIds":[],"networkIds":[],"moName":"Cluster1"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","name":"azcli-test-cluster","type":"microsoft.connectedvmwarevsphere/clusters","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:27:13.7730754Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:58:28.06192Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/domain-c649660","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","usedMemoryGB":473849,"totalMemoryGB":510,"usedCPUMHz":42010,"totalCPUMHz":315936,"uuid":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","customResourceName":"5c3f319f-e838-4db8-af7e-6e0cf32f4b94","moRefId":"domain-c649660","moName":"Cluster1","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:58:41.5944453Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:58:41.5944453Z"}]}}]}' headers: cache-control: - no-cache content-length: - - '1475' + - '1898' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:56:20 GMT + - Mon, 07 Aug 2023 13:59:03 GMT expires: - '-1' pragma: @@ -587,13 +599,19 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 56744f79-413e-43e5-b459-19544ed0dc64 - - a1195ccf-2e50-4d47-86aa-7bc0053327dc - - 1856f80a-8e98-461e-9d2e-d6bbfb8606f5 - - 94ba7d0f-79b4-4153-b58b-81ad7860cb63 - - 628b0efb-1273-4ebb-aa35-083af5345863 - - 507e7f11-9875-42fa-ae61-8404b0c639d2 - - 7473d71b-58f3-40c0-9470-fc29232e763a + - 00fecbdf-8064-4fce-b8fc-54dd45225aa8 + - a11f9af8-2688-4114-a0eb-47ba729e1e51 + - a40c57aa-0585-4aac-82bf-086e8e9c58c7 + - 73b6784b-ba92-4213-9bdb-8a6fa28a7dcb + - ae86aba2-a51f-4bb0-85c2-a24069f8f2ed + - 20aac360-b9d3-4f09-b1ca-4e69f73f6043 + - b098cfec-58d7-40c0-b927-e1c1bed5a586 + - b47d69ad-a5f5-4805-8d4d-4d4ae171d7cb + - 449b1925-585f-4200-b275-5231493b7d18 + - 456f5202-3814-4ad5-8c06-e28dfa3468bc + - e2dd7734-bc93-494a-b9db-0cb6d7dcf409 + - 8213764c-413d-4af3-a820-09b762c1104f + - eab0c98a-070a-447e-a6c2-6cd5f575b791 status: code: 200 message: OK @@ -617,27 +635,28 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:56:28.6177443Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:56:28.6177443Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:28:23.7364826Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:04.2425713Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"4895186e-c6a7-44c3-8f95-7633844d803d","customResourceName":"4895186e-c6a7-44c3-8f95-7633844d803d","moRefId":"datastore-563660","moName":"Shared + 15TB","capacityGB":46079,"freeSpaceGB":16886,"provisioningState":"Accepted","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-05T10:45:30.9184613Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-05T10:45:30.9184613Z"}]}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/5fe798d9-8fc4-4140-8c10-406b35e541a8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8bd38402-b324-4c14-87d7-a8b029edb0cf*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '1113' + - '1500' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:56:32 GMT + - Mon, 07 Aug 2023 13:59:04 GMT etag: - - '"33005b1a-0000-0100-0000-63f27eee0000"' + - '"160034ce-0000-0100-0000-64d0f8a80000"' expires: - '-1' location: @@ -651,7 +670,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 201 message: Created @@ -669,23 +688,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/5fe798d9-8fc4-4140-8c10-406b35e541a8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8bd38402-b324-4c14-87d7-a8b029edb0cf*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/5fe798d9-8fc4-4140-8c10-406b35e541a8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","name":"5fe798d9-8fc4-4140-8c10-406b35e541a8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","status":"Succeeded","startTime":"2023-02-19T19:56:30.5323178Z","endTime":"2023-02-19T19:56:44.2198246Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8bd38402-b324-4c14-87d7-a8b029edb0cf*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","name":"8bd38402-b324-4c14-87d7-a8b029edb0cf*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","status":"Succeeded","startTime":"2023-08-07T13:59:04.579417Z","endTime":"2023-08-07T13:59:27.9310667Z","properties":null}' headers: cache-control: - no-cache content-length: - - '594' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:02 GMT + - Mon, 07 Aug 2023 13:59:35 GMT etag: - - '"240093d0-0000-0100-0000-63f27efc0000"' + - '"7300620c-0000-0100-0000-64d0f8bf0000"' expires: - '-1' pragma: @@ -715,24 +734,24 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:56:28.6177443Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:56:28.6177443Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"31062f66-d204-460b-b2b1-bab3b7ef0dfa","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:56:43.8984648Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:56:43.8984648Z"}],"customResourceName":"31062f66-d204-460b-b2b1-bab3b7ef0dfa","moRefId":"datastore-563660","moName":"Shared - 15TB"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:28:23.7364826Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:04.2425713Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"4895186e-c6a7-44c3-8f95-7633844d803d","customResourceName":"4895186e-c6a7-44c3-8f95-7633844d803d","moRefId":"datastore-563660","moName":"Shared + 15TB","capacityGB":46079,"freeSpaceGB":16886,"provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:59:27.6462701Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:59:27.6462701Z"}]}}' headers: cache-control: - no-cache content-length: - - '1444' + - '1501' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:02 GMT + - Mon, 07 Aug 2023 13:59:35 GMT etag: - - '"3300871a-0000-0100-0000-63f27efc0000"' + - '"16006bd2-0000-0100-0000-64d0f8bf0000"' expires: - '-1' pragma: @@ -764,24 +783,24 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:56:28.6177443Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:56:28.6177443Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"31062f66-d204-460b-b2b1-bab3b7ef0dfa","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:56:43.8984648Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:56:43.8984648Z"}],"customResourceName":"31062f66-d204-460b-b2b1-bab3b7ef0dfa","moRefId":"datastore-563660","moName":"Shared - 15TB"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:28:23.7364826Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:04.2425713Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"4895186e-c6a7-44c3-8f95-7633844d803d","customResourceName":"4895186e-c6a7-44c3-8f95-7633844d803d","moRefId":"datastore-563660","moName":"Shared + 15TB","capacityGB":46079,"freeSpaceGB":16886,"provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:59:27.6462701Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:59:27.6462701Z"}]}}' headers: cache-control: - no-cache content-length: - - '1444' + - '1501' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:05 GMT + - Mon, 07 Aug 2023 13:59:36 GMT etag: - - '"3300871a-0000-0100-0000-63f27efc0000"' + - '"16006bd2-0000-0100-0000-64d0f8bf0000"' expires: - '-1' pragma: @@ -813,22 +832,22 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:56:28.6177443Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:56:28.6177443Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"31062f66-d204-460b-b2b1-bab3b7ef0dfa","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:56:43.8984648Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:56:43.8984648Z"}],"customResourceName":"31062f66-d204-460b-b2b1-bab3b7ef0dfa","moRefId":"datastore-563660","moName":"Shared - 15TB"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","name":"azcli-test-datastore","type":"microsoft.connectedvmwarevsphere/datastores","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:28:23.7364826Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:04.2425713Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/datastore-563660","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"4895186e-c6a7-44c3-8f95-7633844d803d","customResourceName":"4895186e-c6a7-44c3-8f95-7633844d803d","moRefId":"datastore-563660","moName":"Shared + 15TB","capacityGB":46079,"freeSpaceGB":16886,"provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:59:27.6462701Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:59:27.6462701Z"}]}}]}' headers: cache-control: - no-cache content-length: - - '1456' + - '1513' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:07 GMT + - Mon, 07 Aug 2023 13:59:38 GMT expires: - '-1' pragma: @@ -840,13 +859,19 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 96468b0d-5854-4bd2-ab68-929ced297280 - - 9ef11c0b-9e51-45e7-b409-e6eb51f8b3d0 - - a2686b8a-3d77-42fa-a502-36fcd069c04e - - 35dd8602-7eb5-49ed-8a10-692cff6ad213 - - ea15d518-d33c-4c2d-afb1-ff9cea92834d - - e70aca50-fa6c-47c1-99e7-9a35eadd0c72 - - 51babfb6-c532-4c54-898f-faa8a8a33a52 + - 70c01776-5657-4b96-b658-e0178a59d4b0 + - da50a7cc-2670-46d5-8165-1336464d5cc8 + - f12c51fd-dd63-465c-887c-0c2114a2303f + - 3a42680c-912c-47e7-9836-1c541c9e31ba + - b4510cca-5ef7-42f5-8d5e-eb46d0c2d250 + - cbee9fc5-dc21-445a-b7ab-5b22ca6c89ea + - f5150ccd-1142-46ec-896d-e31f3c7c3c4f + - 3e84e4a3-8f68-4841-af92-0241a980b995 + - b5a4c6e3-6134-42a3-ad0d-67fcce19b439 + - 3e4dc3fd-3513-4e1b-ad9d-815d8435d188 + - 22fee620-6ab3-404e-8950-dbc28282daf1 + - 300b26ba-84b9-4f82-a328-511ce2f402b5 + - d3091b80-e097-4050-ac45-6c5e78aa5542 status: code: 200 message: OK @@ -870,27 +895,27 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:13.0919993Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:13.0919993Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:29:02.1553261Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:39.7977899Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","overallMemoryUsageGB":238,"memorySizeGB":255,"overallCPUUsageMHz":21115,"uuid":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","customResourceName":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","moRefId":"host-1147546","moName":"10.150.180.239","provisioningState":"Accepted","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-05T10:46:19.182959Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-05T10:46:19.182959Z"}]}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/71c54a80-3426-4ccc-ba0a-62f1374a4003*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/7fcc3794-3d20-4926-9b1a-c5624acf8abd*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '1089' + - '1866' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:16 GMT + - Mon, 07 Aug 2023 13:59:40 GMT etag: - - '"280109aa-0000-0100-0000-63f27f1b0000"' + - '"2e003623-0000-0100-0000-64d0f8cd0000"' expires: - '-1' location: @@ -922,12 +947,12 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/71c54a80-3426-4ccc-ba0a-62f1374a4003*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/7fcc3794-3d20-4926-9b1a-c5624acf8abd*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/71c54a80-3426-4ccc-ba0a-62f1374a4003*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","name":"71c54a80-3426-4ccc-ba0a-62f1374a4003*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","status":"Succeeded","startTime":"2023-02-19T19:57:14.9879908Z","endTime":"2023-02-19T19:57:23.3796071Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/7fcc3794-3d20-4926-9b1a-c5624acf8abd*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","name":"7fcc3794-3d20-4926-9b1a-c5624acf8abd*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","status":"Succeeded","startTime":"2023-08-07T13:59:41.1423883Z","endTime":"2023-08-07T13:59:55.4491541Z","properties":null}' headers: cache-control: - no-cache @@ -936,9 +961,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:46 GMT + - Mon, 07 Aug 2023 14:00:11 GMT etag: - - '"2400dad0-0000-0100-0000-63f27f230000"' + - '"7300ef16-0000-0100-0000-64d0f8db0000"' expires: - '-1' pragma: @@ -968,23 +993,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:13.0919993Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:13.0919993Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"4c2805d7-ed1f-4578-93a6-a4709d3fc3fe","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:57:23.1261136Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:57:23.1261136Z"}],"customResourceName":"4c2805d7-ed1f-4578-93a6-a4709d3fc3fe","moRefId":"host-1147546","moName":"10.150.180.239"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:29:02.1553261Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:39.7977899Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","overallMemoryUsageGB":238,"memorySizeGB":255,"overallCPUUsageMHz":22159,"uuid":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","customResourceName":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","moRefId":"host-1147546","moName":"10.150.180.239","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:59:55.1447267Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:59:55.1447267Z"}]}}' headers: cache-control: - no-cache content-length: - - '1419' + - '1869' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:47 GMT + - Mon, 07 Aug 2023 14:00:12 GMT etag: - - '"2801dfab-0000-0100-0000-63f27f230000"' + - '"2e004f26-0000-0100-0000-64d0f8db0000"' expires: - '-1' pragma: @@ -1016,23 +1041,23 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:13.0919993Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:13.0919993Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"4c2805d7-ed1f-4578-93a6-a4709d3fc3fe","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:57:23.1261136Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:57:23.1261136Z"}],"customResourceName":"4c2805d7-ed1f-4578-93a6-a4709d3fc3fe","moRefId":"host-1147546","moName":"10.150.180.239"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:29:02.1553261Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:39.7977899Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","overallMemoryUsageGB":238,"memorySizeGB":255,"overallCPUUsageMHz":22159,"uuid":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","customResourceName":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","moRefId":"host-1147546","moName":"10.150.180.239","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:59:55.1447267Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:59:55.1447267Z"}]}}' headers: cache-control: - no-cache content-length: - - '1419' + - '1869' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:50 GMT + - Mon, 07 Aug 2023 14:00:14 GMT etag: - - '"2801dfab-0000-0100-0000-63f27f230000"' + - '"2e004f26-0000-0100-0000-64d0f8db0000"' expires: - '-1' pragma: @@ -1064,21 +1089,21 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:13.0919993Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:13.0919993Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"4c2805d7-ed1f-4578-93a6-a4709d3fc3fe","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:57:23.1261136Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:57:23.1261136Z"}],"customResourceName":"4c2805d7-ed1f-4578-93a6-a4709d3fc3fe","moRefId":"host-1147546","moName":"10.150.180.239"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","name":"azcli-test-host","type":"microsoft.connectedvmwarevsphere/hosts","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:29:02.1553261Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T13:59:39.7977899Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/host-1147546","datastoreIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Datastores/azcli-test-datastore"],"networkIds":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network"],"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","overallMemoryUsageGB":238,"memorySizeGB":255,"overallCPUUsageMHz":22159,"uuid":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","customResourceName":"e5d1bb47-5f8f-4cb6-9fd5-79d445c1caa2","moRefId":"host-1147546","moName":"10.150.180.239","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T13:59:55.1447267Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T13:59:55.1447267Z"}]}}]}' headers: cache-control: - no-cache content-length: - - '1431' + - '1881' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:57:52 GMT + - Mon, 07 Aug 2023 14:00:16 GMT expires: - '-1' pragma: @@ -1090,13 +1115,19 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - e7a9736e-6d55-4289-9082-9376436d68cf - - 612db504-8056-4e20-8578-f2981a409e4f - - 2890d9c6-3236-46b3-9f3c-440efedc9276 - - e50c018e-b03c-4692-bbc1-6190bda1979b - - 98629d7a-b6b7-4d52-95c9-4545a34de37d - - 8d025471-78b7-4dac-aac3-1d19be404dc3 - - 0fd5449f-fb5c-434c-b75e-e878baf1f965 + - 1b79e274-4d74-474c-b017-52150ffab9dd + - fd3e38fd-c318-4a7e-96f0-73a7c95ecd2d + - 60c29e70-eeba-4f12-b663-2b7b94e4112c + - 50341ae9-8386-40e0-82a7-16dc4e8ee050 + - 98ac7798-7292-4afa-b2d3-5b199bd4feb1 + - b1e801bc-a3e1-49b2-9e46-0c41d36525f8 + - 2d49d355-177a-4bd8-8ded-c8ecd04b9c3b + - 259f2337-9bac-4eee-8e26-4a0b8ccbcaa7 + - 30014eb2-47d9-4266-8204-977165cc3ab8 + - d563964e-0a39-4238-8d71-f469129bcbd3 + - 95c69399-666d-4d22-b215-784e43408837 + - 77e933d4-5a92-42ef-96d8-4419be494762 + - c9fda211-3e43-4fff-8202-a74f9a46ba52 status: code: 200 message: OK @@ -1120,27 +1151,28 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:59.4165317Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:59.4165317Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:30:10.8900256Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:17.2998266Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"c927f4ec-7746-4424-9e14-929ec6d90285","customResourceName":"c927f4ec-7746-4424-9e14-929ec6d90285","moRefId":"network-563661","moName":"VM + Network","provisioningState":"Accepted","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-05T10:46:50.9838601Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-05T10:46:50.9838601Z"}]}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/19454c61-20e4-4f0d-9c6a-2dbcdff7ed4d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2c2dd1b3-1ce0-4495-94dc-bf4d6f92838d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '1133' + - '1478' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:58:03 GMT + - Mon, 07 Aug 2023 14:00:18 GMT etag: - - '"62016221-0000-0100-0000-63f27f490000"' + - '"29007c9f-0000-0100-0000-64d0f8f20000"' expires: - '-1' location: @@ -1172,12 +1204,12 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/19454c61-20e4-4f0d-9c6a-2dbcdff7ed4d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2c2dd1b3-1ce0-4495-94dc-bf4d6f92838d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/19454c61-20e4-4f0d-9c6a-2dbcdff7ed4d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","name":"19454c61-20e4-4f0d-9c6a-2dbcdff7ed4d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","status":"Succeeded","startTime":"2023-02-19T19:58:01.6775257Z","endTime":"2023-02-19T19:58:11.8085302Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2c2dd1b3-1ce0-4495-94dc-bf4d6f92838d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","name":"2c2dd1b3-1ce0-4495-94dc-bf4d6f92838d*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","status":"Succeeded","startTime":"2023-08-07T14:00:18.6888189Z","endTime":"2023-08-07T14:00:39.9607116Z","properties":null}' headers: cache-control: - no-cache @@ -1186,9 +1218,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:58:33 GMT + - Mon, 07 Aug 2023 14:00:48 GMT etag: - - '"240018d1-0000-0100-0000-63f27f530000"' + - '"73004f27-0000-0100-0000-64d0f9070000"' expires: - '-1' pragma: @@ -1218,24 +1250,24 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:59.4165317Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:59.4165317Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"29be6a08-a482-4e58-b0d8-df2c5d8469af","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:58:11.5194028Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:58:11.5194028Z"}],"customResourceName":"29be6a08-a482-4e58-b0d8-df2c5d8469af","moRefId":"network-563661","moName":"VM - Network"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:30:10.8900256Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:17.2998266Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"c927f4ec-7746-4424-9e14-929ec6d90285","customResourceName":"c927f4ec-7746-4424-9e14-929ec6d90285","moRefId":"network-563661","moName":"VM + Network","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:00:39.6908856Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:00:39.6908856Z"}]}}' headers: cache-control: - no-cache content-length: - - '1461' + - '1479' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:58:34 GMT + - Mon, 07 Aug 2023 14:00:49 GMT etag: - - '"62015f22-0000-0100-0000-63f27f530000"' + - '"2900b59f-0000-0100-0000-64d0f9070000"' expires: - '-1' pragma: @@ -1267,24 +1299,24 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:59.4165317Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:59.4165317Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"29be6a08-a482-4e58-b0d8-df2c5d8469af","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:58:11.5194028Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:58:11.5194028Z"}],"customResourceName":"29be6a08-a482-4e58-b0d8-df2c5d8469af","moRefId":"network-563661","moName":"VM - Network"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:30:10.8900256Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:17.2998266Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"c927f4ec-7746-4424-9e14-929ec6d90285","customResourceName":"c927f4ec-7746-4424-9e14-929ec6d90285","moRefId":"network-563661","moName":"VM + Network","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:00:39.6908856Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:00:39.6908856Z"}]}}' headers: cache-control: - no-cache content-length: - - '1461' + - '1479' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:58:38 GMT + - Mon, 07 Aug 2023 14:00:51 GMT etag: - - '"62015f22-0000-0100-0000-63f27f530000"' + - '"2900b59f-0000-0100-0000-64d0f9070000"' expires: - '-1' pragma: @@ -1316,22 +1348,22 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:57:59.4165317Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:57:59.4165317Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","uuid":"29be6a08-a482-4e58-b0d8-df2c5d8469af","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:58:11.5194028Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:58:11.5194028Z"}],"customResourceName":"29be6a08-a482-4e58-b0d8-df2c5d8469af","moRefId":"network-563661","moName":"VM - Network"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","name":"azcli-test-virtual-network","type":"microsoft.connectedvmwarevsphere/virtualnetworks","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:30:10.8900256Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:17.2998266Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/network-563661","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","uuid":"c927f4ec-7746-4424-9e14-929ec6d90285","customResourceName":"c927f4ec-7746-4424-9e14-929ec6d90285","moRefId":"network-563661","moName":"VM + Network","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:00:39.6908856Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:00:39.6908856Z"}]}}]}' headers: cache-control: - no-cache content-length: - - '1473' + - '1491' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:58:41 GMT + - Mon, 07 Aug 2023 14:00:52 GMT expires: - '-1' pragma: @@ -1343,13 +1375,19 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 182010f7-908c-4a3d-ad73-95beea609891 - - 525c473a-de31-4c15-8e43-a18367f37dbc - - cf75bb4c-be66-45f5-b2be-c6d04f5dfd4a - - 0815f1d6-27be-4144-8512-4bfecb534ce9 - - ab6de9c6-0deb-4630-b300-f63baca3f97b - - 5f03bc3e-44d1-46fa-b7ec-ccf5f2f0a7f6 - - 3c3f5e32-9f95-4ca5-9760-e2ea335c0881 + - bb99c2f1-6321-4df9-91d9-a5b487fd8edf + - f3ec3ada-1c35-4f1e-a7e0-3641eabcabf7 + - a8e2f1db-1d34-401e-9e4f-24004fbf2463 + - ab077445-ee13-46e5-a3df-c554258a45f8 + - 5fcb7733-9e33-4921-9632-cf0424b53dbc + - 9ae21b2c-d3ce-4c19-a61a-fd0babd33e3c + - 87467a9a-d46a-4283-85e6-9820c48ddc2b + - 7f21f4e9-583a-47e3-95c8-953d2f1fff51 + - 53332fe5-f12c-4501-bdd4-a2ee9564714a + - 29cc7257-8a30-494c-a6dc-5e55365563b9 + - fdd2065e-7681-465f-8cca-491209eda24c + - f966d928-8eca-48f8-8231-c66e5344c20b + - 9c2be153-71c7-45de-aa3f-ecf4b1269404 status: code: 200 message: OK @@ -1373,27 +1411,31 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:58:50.3035334Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:58:50.3035334Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","provisioningState":"Accepted"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:31:19.7213112Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:53.9137515Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:68:4b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}],"disks":[{"diskObjectId":"1324-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","uuid":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","customResourceName":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","moRefId":"vm-1184288","moName":"azcli-test-linux-tmpl","memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"osName":"Ubuntu + Linux (64-bit)","folderPath":"ArcPrivateClouds-67/azcli-test-folder","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304","provisioningState":"Accepted","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-05T10:47:33.1233772Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-05T10:47:33.1233772Z"}]}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/c9b12e8d-fed0-432e-a3b1-e4587c4b50b2*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/7e7c7db2-6c95-46f0-ae3d-e6ba4c13e1e4*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '1143' + - '2336' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:58:55 GMT + - Mon, 07 Aug 2023 14:00:54 GMT etag: - - '"25002f57-0000-0100-0000-63f27f7e0000"' + - '"4100b79a-0000-0100-0000-64d0f9170000"' expires: - '-1' location: @@ -1425,12 +1467,12 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/c9b12e8d-fed0-432e-a3b1-e4587c4b50b2*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/7e7c7db2-6c95-46f0-ae3d-e6ba4c13e1e4*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/c9b12e8d-fed0-432e-a3b1-e4587c4b50b2*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","name":"c9b12e8d-fed0-432e-a3b1-e4587c4b50b2*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","status":"Succeeded","startTime":"2023-02-19T19:58:53.3594254Z","endTime":"2023-02-19T19:59:09.1428789Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/7e7c7db2-6c95-46f0-ae3d-e6ba4c13e1e4*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","name":"7e7c7db2-6c95-46f0-ae3d-e6ba4c13e1e4*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","status":"Succeeded","startTime":"2023-08-07T14:00:54.9959706Z","endTime":"2023-08-07T14:01:07.7089028Z","properties":null}' headers: cache-control: - no-cache @@ -1439,9 +1481,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:59:25 GMT + - Mon, 07 Aug 2023 14:01:25 GMT etag: - - '"240040d1-0000-0100-0000-63f27f8d0000"' + - '"73009331-0000-0100-0000-64d0f9230000"' expires: - '-1' pragma: @@ -1471,27 +1513,27 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:58:50.3035334Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:58:50.3035334Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","provisioningState":"Succeeded","uuid":"64009a0b-3896-449f-aa2b-a33e5c7657ca","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:59:08.8448843Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:59:08.8448843Z"}],"customResourceName":"64009a0b-3896-449f-aa2b-a33e5c7657ca","moRefId":"vm-1184288","networkInterfaces":[{"name":"nic_1","label":"Network + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:31:19.7213112Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:53.9137515Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","networkInterfaces":[{"name":"nic_1","label":"Network adapter 1","macAddress":"00:50:56:95:68:4b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}],"disks":[{"diskObjectId":"1324-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"moName":"azcli-test-linux-tmpl","memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"osType":"Linux","osName":"Ubuntu - Linux (64-bit)","folderPath":"ArcPrivateClouds-67/azcli-test-folder","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"}}' + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","ipAddress":"10.150.177.65","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.65","subnetMask":"255.255.248.0"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:684b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"fe80::250:56ff:fe95:684b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}],"disks":[{"diskObjectId":"1324-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","uuid":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","customResourceName":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","moRefId":"vm-1184288","moName":"azcli-test-linux-tmpl","memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"osName":"Ubuntu + Linux (64-bit)","folderPath":"ArcPrivateClouds-67/azcli-test-folder","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:01:07.3083666Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:01:07.3083666Z"}],"osType":"Linux"}}' headers: cache-control: - no-cache content-length: - - '2336' + - '2692' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:59:26 GMT + - Mon, 07 Aug 2023 14:01:26 GMT etag: - - '"25003957-0000-0100-0000-63f27f8d0000"' + - '"4100be9c-0000-0100-0000-64d0f9230000"' expires: - '-1' pragma: @@ -1523,27 +1565,27 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:58:50.3035334Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:58:50.3035334Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","provisioningState":"Succeeded","uuid":"64009a0b-3896-449f-aa2b-a33e5c7657ca","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:59:08.8448843Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:59:08.8448843Z"}],"customResourceName":"64009a0b-3896-449f-aa2b-a33e5c7657ca","moRefId":"vm-1184288","networkInterfaces":[{"name":"nic_1","label":"Network + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:31:19.7213112Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:53.9137515Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","networkInterfaces":[{"name":"nic_1","label":"Network adapter 1","macAddress":"00:50:56:95:68:4b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}],"disks":[{"diskObjectId":"1324-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"moName":"azcli-test-linux-tmpl","memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"osType":"Linux","osName":"Ubuntu - Linux (64-bit)","folderPath":"ArcPrivateClouds-67/azcli-test-folder","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"}}' + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","ipAddress":"10.150.177.65","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.65","subnetMask":"255.255.248.0"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:684b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"fe80::250:56ff:fe95:684b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}],"disks":[{"diskObjectId":"1324-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","uuid":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","customResourceName":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","moRefId":"vm-1184288","moName":"azcli-test-linux-tmpl","memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"osName":"Ubuntu + Linux (64-bit)","folderPath":"ArcPrivateClouds-67/azcli-test-folder","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:01:07.3083666Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:01:07.3083666Z"}],"osType":"Linux"}}' headers: cache-control: - no-cache content-length: - - '2336' + - '2692' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:59:31 GMT + - Mon, 07 Aug 2023 14:01:27 GMT etag: - - '"25003957-0000-0100-0000-63f27f8d0000"' + - '"4100be9c-0000-0100-0000-64d0f9230000"' expires: - '-1' pragma: @@ -1575,25 +1617,25 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:58:50.3035334Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:58:50.3035334Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","provisioningState":"Succeeded","uuid":"64009a0b-3896-449f-aa2b-a33e5c7657ca","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T19:59:08.8448843Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T19:59:08.8448843Z"}],"customResourceName":"64009a0b-3896-449f-aa2b-a33e5c7657ca","moRefId":"vm-1184288","networkInterfaces":[{"name":"nic_1","label":"Network + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","name":"azcli-test-vm-template","type":"microsoft.connectedvmwarevsphere/virtualmachinetemplates","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"snaskar@microsoft.com","createdByType":"User","createdAt":"2023-08-05T08:31:19.7213112Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:00:53.9137515Z"},"properties":{"vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","networkInterfaces":[{"name":"nic_1","label":"Network adapter 1","macAddress":"00:50:56:95:68:4b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}],"disks":[{"diskObjectId":"1324-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"moName":"azcli-test-linux-tmpl","memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"osType":"Linux","osName":"Ubuntu - Linux (64-bit)","folderPath":"ArcPrivateClouds-67/azcli-test-folder","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"}}]}' + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","ipAddress":"10.150.177.65","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.65","subnetMask":"255.255.248.0"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:684b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"fe80::250:56ff:fe95:684b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}],"disks":[{"diskObjectId":"1324-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vmtpl-vm-1184288","uuid":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","customResourceName":"b01dcf71-4ff7-409d-9b92-d3a3a6f90fbc","moRefId":"vm-1184288","moName":"azcli-test-linux-tmpl","memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"osName":"Ubuntu + Linux (64-bit)","folderPath":"ArcPrivateClouds-67/azcli-test-folder","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:01:07.3083666Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:01:07.3083666Z"}],"osType":"Linux"}}]}' headers: cache-control: - no-cache content-length: - - '2348' + - '2704' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:59:33 GMT + - Mon, 07 Aug 2023 14:01:28 GMT expires: - '-1' pragma: @@ -1605,13 +1647,19 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 8db61b66-3515-4846-916a-fe748d3248df - - 870afb42-8e08-489d-8809-bb1799493260 - - 70dc0494-5159-4c71-845f-9972532d1bc7 - - 5a62e7e9-c4a0-45ac-aa73-5cbd403a41b8 - - 156453b4-8dc2-4376-97e3-2e3b7b907883 - - c5b09724-fc46-4e43-9501-3eaa5628d5c9 - - 4d646d75-2f39-4677-a131-02d900d69dfa + - 803e3b97-4ce7-484f-8d45-b0cd4b9a851b + - 0874bf8b-4efa-42fd-804c-c33f989aba17 + - e8f08c6c-f19b-4243-a679-1978bf0380be + - a95053db-4a51-401f-802b-972f53d9a111 + - 33a999ef-dfa1-43da-9eee-f1f6f64f0b40 + - 6bb1512f-1eff-4a97-8738-79bb479d8da1 + - b41d5689-f472-43e2-af89-621097a9e08c + - b57f005b-5df6-41d9-973a-ed355db46467 + - 790dc554-f9d0-4777-895d-b7bad4781cda + - 2c4033d5-b96e-4692-9245-4a6f06c99385 + - 72fc64fc-5f81-44d6-b0bc-51bca06f5525 + - 18f94cf3-4142-4773-a16e-c6d240a937e1 + - 8579a2b3-47ec-4856-8feb-1746241e0c38 status: code: 200 message: OK @@ -1629,23 +1677,23 @@ interactions: ParameterSetName: - -g --vcenter --i User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc/inventoryItems/resgroup-724471?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc/inventoryItems/resgroup-724471?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/azcli-test-vc/InventoryItems/resgroup-724471","name":"resgroup-724471","type":"microsoft.connectedvmwarevsphere/vcenters/inventoryitems","kind":"ResourcePool","systemData":{"createdBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","createdByType":"Application","createdAt":"2023-02-16T15:55:05.4946885Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-02-19T19:55:06.7934322Z"},"properties":{"parent":{"moName":"Resources","inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/azcli-test-vc/InventoryItems/resgroup-649661"},"inventoryType":"ResourcePool","managedResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","moRefId":"resgroup-724471","moName":"azcli-test-rp","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/azcli-test-vc/InventoryItems/resgroup-724471","name":"resgroup-724471","type":"microsoft.connectedvmwarevsphere/vcenters/inventoryitems","kind":"ResourcePool","systemData":{"createdBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","createdByType":"Application","createdAt":"2023-02-16T15:55:05.4946885Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-08-06T23:04:20.4922406Z"},"properties":{"provisioningState":"Succeeded","inventoryType":"ResourcePool","parent":{"moName":"Resources","inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/azcli-test-vc/InventoryItems/resgroup-649661","inventoryType":"ResourcePool"},"managedResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","moRefId":"resgroup-724471","moName":"azcli-test-rp"}}' headers: cache-control: - no-cache content-length: - - '1123' + - '1154' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:59:36 GMT + - Mon, 07 Aug 2023 14:01:30 GMT etag: - - '"77013026-0000-0100-0000-63f27e9a0000"' + - '"1c001501-0000-0100-0000-64d026f40000"' expires: - '-1' pragma: @@ -1664,11 +1712,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus", "extendedLocation": {"type": "CustomLocation", "name": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"}, - "properties": {"templateId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template", - "vCenterId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc", - "placementProfile": {"resourcePoolId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/resourcePools/azcli-test-resource-pool"}}}' + body: null headers: Accept: - application/json @@ -1678,58 +1722,48 @@ interactions: - connectedvmware vm create Connection: - keep-alive - Content-Length: - - '802' - Content-Type: - - application/json ParameterSetName: - -g -l --custom-location --vcenter --resource-pool --vm-template --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:59:46.7913271Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/resourcePools/azcli-test-resource-pool"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted","statuses":[{"status":"False","type":"Ready","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T19:59:48.5118694Z"},{"status":"False","type":"Idle","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T19:59:48.5118694Z"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc","name":"azcli-test-vc","type":"microsoft.connectedvmwarevsphere/vcenters","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azcli-test-rg/providers/microsoft.extendedlocation/customlocations/azcli-test-cl"},"tags":{},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-16T15:53:39.9929387Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-08-06T23:44:21.1344414Z"},"properties":{"credentials":{"username":"arcvmware"},"uuid":"e6048b2a-ba86-4334-adff-ba3d617d12ef","fqdn":"idclab-vcen67.fareast.corp.microsoft.com","port":443,"version":"6.7.0","instanceUuid":"db73f8f2-624c-4a0f-905b-8c6f34442cbc","customResourceName":"e6048b2a-ba86-4334-adff-ba3d617d12ef","connectionStatus":"Connected","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Connected","lastUpdatedAt":"2023-08-06T23:44:15Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"}]}}' headers: - api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview - azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview cache-control: - no-cache content-length: - - '1667' + - '1339' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 19:59:49 GMT + - Mon, 07 Aug 2023 14:01:31 GMT etag: - - '"310188e3-0000-0100-0000-63f27fb40000"' + - '"1600d91b-0000-0100-0000-64d030550000"' expires: - '-1' - location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-providerhub-traffic: - 'True' - x-ms-ratelimit-remaining-subscription-writes: - - '1199' status: - code: 201 - message: Created + code: 200 + message: OK - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: @@ -1739,27 +1773,75 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter --resource-pool --vm-template --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Accepted","startTime":"2023-02-19T19:59:47.8372886Z"}' + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.HybridCompute/machines/azcli-test-vm-0'' + under resource group ''azcli-test-rg'' was not found. For more details please + go to https://aka.ms/ARMResourceNotFoundFix"}}' headers: cache-control: - no-cache content-length: - - '532' + - '233' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:00:19 GMT - etag: - - '"240074d1-0000-0100-0000-63f27fb30000"' + - Mon, 07 Aug 2023 14:01:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: '{"location": "eastus", "kind": "VMware"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedvmware vm create + Connection: + - keep-alive + Content-Length: + - '40' + Content-Type: + - application/json + ParameterSetName: + - -g -l --custom-location --vcenter --resource-pool --vm-template --name + User-Agent: + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0?api-version=2023-04-25-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0","name":"azcli-test-vm-0","location":"eastus","kind":"VMware","identity":{"type":"None","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"type":"Microsoft.HybridCompute/machines","properties":{"provisioningState":"Creating","osProfile":{},"vmId":"ff09c91f-d979-4860-9be5-9ad4def8d328","agentConfiguration":{},"agentUpgrade":{"enableAutomaticUpgrade":false},"esuProperties":{"arcEsuEnrollmentState":"Unknown","esuKeyActive":false}}}' + headers: + cache-control: + - no-cache + content-length: + - '580' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 07 Aug 2023 14:01:35 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -1768,55 +1850,72 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '319' status: code: 200 message: OK - request: - body: null + body: '{"extendedLocation": {"type": "CustomLocation", "name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"}, + "properties": {"placementProfile": {"resourcePoolId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/resourcePools/azcli-test-resource-pool"}, + "infrastructureProfile": {"templateId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template", + "vCenterId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc"}}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - connectedvmware vm create Connection: - keep-alive + Content-Length: + - '807' + Content-Type: + - application/json ParameterSetName: - -g -l --custom-location --vcenter --resource-pool --vm-template --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Accepted","startTime":"2023-02-19T19:59:47.8372886Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/resourcePools/azcli-test-resource-pool"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc"},"provisioningState":"Accepted","statuses":[{"status":"False","type":"Ready","reason":"Provisioning","message":"The + resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-08-07T14:01:37.3791466Z"},{"status":"False","type":"Idle","reason":"Provisioning","message":"The + resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-08-07T14:01:37.3791466Z"}]}}' headers: + api-supported-versions: + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '532' + - '1760' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:00:50 GMT + - Mon, 07 Aug 2023 14:01:37 GMT etag: - - '"240074d1-0000-0100-0000-63f27fb30000"' + - '"0f003ac9-0000-0100-0000-64d0f9410000"' expires: - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' status: - code: 200 - message: OK + code: 201 + message: Created - request: body: null headers: @@ -1831,23 +1930,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter --resource-pool --vm-template --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"3f4c69d0-5996-4fd8-bc56-83a35e8082bf*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T19:59:47.8372886Z","endTime":"2023-02-19T20:01:09.8306845Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Accepted","startTime":"2023-08-07T14:01:37.1040487Z"}' headers: cache-control: - no-cache content-length: - - '592' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:21 GMT + - Mon, 07 Aug 2023 14:02:07 GMT etag: - - '"2400e9d1-0000-0100-0000-63f280050000"' + - '"73005b3c-0000-0100-0000-64d0f9410000"' expires: - '-1' pragma: @@ -1877,27 +1976,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter --resource-pool --vm-template --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:59:46.7913271Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Accepted","startTime":"2023-08-07T14:01:37.1040487Z"}' headers: cache-control: - no-cache content-length: - - '3452' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:22 GMT + - Mon, 07 Aug 2023 14:02:39 GMT etag: - - '"3101a8e3-0000-0100-0000-63f280050000"' + - '"73005b3c-0000-0100-0000-64d0f9410000"' expires: - '-1' pragma: @@ -1910,8 +2005,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-providerhub-traffic: - - 'True' status: code: 200 message: OK @@ -1919,37 +2012,33 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm show + - connectedvmware vm create Connection: - keep-alive ParameterSetName: - - -g --name + - -g -l --custom-location --vcenter --resource-pool --vm-template --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:59:46.7913271Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"10c7b084-70c9-4c73-83ff-3d2e26d618e2*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:01:37.1040487Z","endTime":"2023-08-07T14:02:57.9392482Z","properties":null}' headers: cache-control: - no-cache content-length: - - '3452' + - '653' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:25 GMT + - Mon, 07 Aug 2023 14:03:09 GMT etag: - - '"3101a8e3-0000-0100-0000-63f280050000"' + - '"7300ae59-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: @@ -1962,8 +2051,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-providerhub-traffic: - - 'True' status: code: 200 message: OK @@ -1971,53 +2058,51 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm list + - connectedvmware vm create Connection: - keep-alive ParameterSetName: - - -g + - -g -l --custom-location --vcenter --resource-pool --vm-template --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:59:46.7913271Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}]}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '3464' + - '3396' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:28 GMT + - Mon, 07 Aug 2023 14:03:09 GMT + etag: + - '"0f0074d0-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked vary: - Accept-Encoding x-content-type-options: - nosniff - x-ms-original-request-ids: - - f01c1407-17d2-4345-9a3c-99ed7a4f66c6 - - 961af7ab-0640-4fdb-9c5c-d11d63a43938 - - 78ef0558-fcda-4762-b6ee-15ab51eddf4f - - 7764b6b4-5e75-4614-a2f2-4726e1cffa19 - - 12ee6f20-c9dc-4d1c-afb8-e50461c145b2 - - c4bd8575-681f-4d99-9ac2-81947c6bf24d - - 58ffd8b5-c20f-4611-8808-555528a42bc7 + x-ms-providerhub-traffic: + - 'True' status: code: 200 message: OK @@ -2029,33 +2114,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm nic show + - connectedvmware vm show Connection: - keep-alive ParameterSetName: - - -g --vm-name --name + - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:59:46.7913271Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '3452' + - '3396' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:30 GMT + - Mon, 07 Aug 2023 14:03:11 GMT etag: - - '"3101a8e3-0000-0100-0000-63f280050000"' + - '"0f0074d0-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: @@ -2081,33 +2166,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm nic list + - connectedvmware vm nic show Connection: - keep-alive ParameterSetName: - - -g --vm-name + - -g --vm-name --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T19:59:46.7913271Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '3452' + - '3396' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:33 GMT + - Mon, 07 Aug 2023 14:03:12 GMT etag: - - '"3101a8e3-0000-0100-0000-63f280050000"' + - '"0f0074d0-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: @@ -2133,33 +2218,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm disk show + - connectedvmware vm nic list Connection: - keep-alive ParameterSetName: - - -g --vm-name --name + - -g --vm-name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-02-19T20:01:35.2236508Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","ipAddresses":["10.150.177.60","fe80::250:56ff:fe95:236b","2404:f801:4800:14:250:56ff:fe95:236b"],"macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::12f3:11ff:fe3b:55d3","fe80::12f3:11ff:fe36:994b"],"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0"},{"ipAddress":"fe80::250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '4047' + - '3396' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:34 GMT + - Mon, 07 Aug 2023 14:03:14 GMT etag: - - '"3101cfe3-0000-0100-0000-63f2801f0000"' + - '"0f0074d0-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: @@ -2185,33 +2270,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm disk list + - connectedvmware vm disk show Connection: - keep-alive ParameterSetName: - - -g --vm-name + - -g --vm-name --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-02-19T20:01:35.2236508Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","ipAddresses":["10.150.177.60","fe80::250:56ff:fe95:236b","2404:f801:4800:14:250:56ff:fe95:236b"],"macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::12f3:11ff:fe3b:55d3","fe80::12f3:11ff:fe36:994b"],"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0"},{"ipAddress":"fe80::250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '4047' + - '3396' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:37 GMT + - Mon, 07 Aug 2023 14:03:15 GMT etag: - - '"3101cfe3-0000-0100-0000-63f2801f0000"' + - '"0f0074d0-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: @@ -2237,33 +2322,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm guest-agent enable + - connectedvmware vm disk list Connection: - keep-alive ParameterSetName: - - -g --vm-name --username --password + - -g --vm-name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-02-19T20:01:35.2236508Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:01:07.1912533Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","ipAddresses":["10.150.177.60","fe80::250:56ff:fe95:236b","2404:f801:4800:14:250:56ff:fe95:236b"],"macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::12f3:11ff:fe3b:55d3","fe80::12f3:11ff:fe36:994b"],"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0"},{"ipAddress":"fe80::250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '4047' + - '3396' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:38 GMT + - Mon, 07 Aug 2023 14:03:16 GMT etag: - - '"3101cfe3-0000-0100-0000-63f2801f0000"' + - '"0f0074d0-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: @@ -2282,7 +2367,7 @@ interactions: code: 200 message: OK - request: - body: '{"identity": {"type": "SystemAssigned"}}' + body: null headers: Accept: - application/json @@ -2292,62 +2377,46 @@ interactions: - connectedvmware vm guest-agent enable Connection: - keep-alive - Content-Length: - - '40' - Content-Type: - - application/json ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0?api-version=2023-04-25-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:01:43.2164285Z"},"identity":{"principalId":"1cb74750-e0d4-437a-828b-f2ea3b9240c3","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"False","type":"Ready","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T20:01:43.8541215Z"},{"status":"False","type":"Idle","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T20:01:43.8541215Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","ipAddresses":["10.150.177.60","fe80::250:56ff:fe95:236b","2404:f801:4800:14:250:56ff:fe95:236b"],"macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::12f3:11ff:fe3b:55d3","fe80::12f3:11ff:fe36:994b"],"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0"},{"ipAddress":"fe80::250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0","name":"azcli-test-vm-0","location":"eastus","tags":{},"kind":"VMware","identity":{"type":"None","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"type":"Microsoft.HybridCompute/machines","properties":{"provisioningState":"Succeeded","osProfile":{},"vmId":"ff09c91f-d979-4860-9be5-9ad4def8d328","agentConfiguration":{},"agentUpgrade":{"enableAutomaticUpgrade":false},"esuProperties":{"arcEsuEnrollmentState":"Unknown","esuKeyActive":false}},"resources":[]}' headers: - api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview - azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/0d403d8b-c4f3-4c6d-83f6-9b002c6ba9f4*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview cache-control: - no-cache content-length: - - '4346' + - '606' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:01:46 GMT - etag: - - '"3101d3e3-0000-0100-0000-63f280270000"' + - Mon, 07 Aug 2023 14:03:18 GMT expires: - '-1' - location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-writes: - - '1199' status: - code: 201 - message: Created + code: 200 + message: OK - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: @@ -2357,23 +2426,27 @@ interactions: ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/0d403d8b-c4f3-4c6d-83f6-9b002c6ba9f4*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/0d403d8b-c4f3-4c6d-83f6-9b002c6ba9f4*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"0d403d8b-c4f3-4c6d-83f6-9b002c6ba9f4*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:01:43.6839728Z","endTime":"2023-02-19T20:02:05.2520468Z","properties":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:01:35.4352263Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:02:57.2468565Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '592' + - '3396' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:02:17 GMT + - Mon, 07 Aug 2023 14:03:19 GMT etag: - - '"240039d2-0000-0100-0000-63f2803d0000"' + - '"0f0074d0-0000-0100-0000-64d0f9910000"' expires: - '-1' pragma: @@ -2386,48 +2459,50 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-providerhub-traffic: + - 'True' status: code: 200 message: OK - request: - body: null + body: '{"identity": {"type": "SystemAssigned"}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - connectedvmware vm guest-agent enable Connection: - keep-alive + Content-Length: + - '40' + Content-Type: + - application/json ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0?api-version=2023-04-25-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:01:43.2164285Z"},"identity":{"principalId":"1cb74750-e0d4-437a-828b-f2ea3b9240c3","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:02:04.9136585Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:02:04.9136585Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","ipAddresses":["10.150.177.60","fe80::250:56ff:fe95:236b","2404:f801:4800:14:250:56ff:fe95:236b"],"macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::12f3:11ff:fe3b:55d3","fe80::12f3:11ff:fe36:994b"],"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0"},{"ipAddress":"fe80::250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":1024,"numCPUs":1,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0","name":"azcli-test-vm-0","location":"eastus","tags":{},"kind":"VMware","identity":{"type":"SystemAssigned","principalId":"4effc565-e795-4daa-9b71-08d9f91bc032","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"type":"Microsoft.HybridCompute/machines","properties":{"provisioningState":"Updating","osProfile":{},"vmId":"ff09c91f-d979-4860-9be5-9ad4def8d328","agentConfiguration":{},"agentUpgrade":{"enableAutomaticUpgrade":false},"esuProperties":{"arcEsuEnrollmentState":"Unknown","esuKeyActive":false}}}' headers: cache-control: - no-cache content-length: - - '4167' + - '653' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:02:18 GMT - etag: - - '"3101d8e3-0000-0100-0000-63f2803d0000"' + - Mon, 07 Aug 2023 14:03:23 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -2436,8 +2511,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-providerhub-traffic: - - 'True' + x-ms-ratelimit-remaining-subscription-resource-requests: + - '319' status: code: 200 message: OK @@ -2460,31 +2535,31 @@ interactions: ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachines/guestagents","systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T20:02:20.1819169Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:02:20.1819169Z"},"properties":{"credentials":{"username":"azcli-user"},"provisioningAction":"install","provisioningState":"Accepted"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances/guestagents","systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:03:23.6767387Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:03:23.6767387Z"},"properties":{"credentials":{"username":"azcli-user"},"provisioningAction":"install","provisioningState":"Accepted"}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '624' + - '733' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:02:21 GMT + - Mon, 07 Aug 2023 14:03:25 GMT etag: - - '"49019da9-0000-0100-0000-63f2804e0000"' + - '"1700eb1d-0000-0100-0000-64d0f9ae0000"' expires: - '-1' location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default + - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default pragma: - no-cache strict-transport-security: @@ -2512,23 +2587,23 @@ interactions: ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2","name":"8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default","status":"Accepted","startTime":"2023-02-19T20:02:21.5332855Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924","name":"a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default","status":"Accepted","startTime":"2023-08-07T14:03:25.7351925Z"}' headers: cache-control: - no-cache content-length: - - '552' + - '613' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:02:52 GMT + - Mon, 07 Aug 2023 14:03:56 GMT etag: - - '"24005bd2-0000-0100-0000-63f2804d0000"' + - '"7300bd63-0000-0100-0000-64d0f9ad0000"' expires: - '-1' pragma: @@ -2558,23 +2633,23 @@ interactions: ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2","name":"8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default","status":"Accepted","startTime":"2023-02-19T20:02:21.5332855Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924","name":"a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default","status":"Accepted","startTime":"2023-08-07T14:03:25.7351925Z"}' headers: cache-control: - no-cache content-length: - - '552' + - '613' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:03:23 GMT + - Mon, 07 Aug 2023 14:04:26 GMT etag: - - '"24005bd2-0000-0100-0000-63f2804d0000"' + - '"7300bd63-0000-0100-0000-64d0f9ad0000"' expires: - '-1' pragma: @@ -2604,23 +2679,23 @@ interactions: ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2","name":"8d55ad95-c237-44dc-a0e6-b78c3cb3585d*C94872F71B990574759DA6D0822912D1F3CC7379D63D98FB7F87E4E315FEC7A2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default","status":"Succeeded","startTime":"2023-02-19T20:02:21.5332855Z","endTime":"2023-02-19T20:03:48.5548014Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924","name":"a4a4e2cd-fe49-430b-8d99-546eb6c2b18d*21FEDF538148A9F36EC78DD612CD74F1F5C5843F3264817896B11FDA2B0CB924","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default","status":"Succeeded","startTime":"2023-08-07T14:03:25.7351925Z","endTime":"2023-08-07T14:04:37.6888704Z","properties":null}' headers: cache-control: - no-cache content-length: - - '612' + - '673' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:03:54 GMT + - Mon, 07 Aug 2023 14:04:57 GMT etag: - - '"2400b5d2-0000-0100-0000-63f280a40000"' + - '"7300bb7d-0000-0100-0000-64d0f9f50000"' expires: - '-1' pragma: @@ -2650,23 +2725,23 @@ interactions: ParameterSetName: - -g --vm-name --username --password User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/guestAgents/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachines/guestagents","systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T20:02:20.1819169Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:02:20.1819169Z"},"properties":{"credentials":{"username":"azcli-user"},"provisioningAction":"install","provisioningState":"Succeeded","uuid":"fc0d224c-93bd-4439-82bf-68616e6e54fc","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:03:48.2744653Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:03:48.2744653Z"}],"customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","status":"Enabled"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances/guestagents","systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:03:23.6767387Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:03:23.6767387Z"},"properties":{"credentials":{"username":"azcli-user"},"provisioningAction":"install","provisioningState":"Succeeded","uuid":"1e5fd63d-9a48-44e9-a26f-f43188e01f4b","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:04:37.3420507Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:04:37.3420507Z"}],"customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","status":"Enabled"}}' headers: cache-control: - no-cache content-length: - - '922' + - '1031' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:03:55 GMT + - Mon, 07 Aug 2023 14:04:57 GMT etag: - - '"4901eeb0-0000-0100-0000-63f280a40000"' + - '"1700ba23-0000-0100-0000-64d0f9f50000"' expires: - '-1' pragma: @@ -2685,8 +2760,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus", "properties": {"publisher": "Microsoft.Azure.Monitor", - "type": "AzureMonitorLinuxAgent", "typeHandlerVersion": "1.15.3"}}' + body: '{"location": "eastus", "properties": {"publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", "settings": {"commandToExecute": "whoami"}}}' headers: Accept: - application/json @@ -2697,46 +2772,46 @@ interactions: Connection: - keep-alive Content-Length: - - '144' + - '149' Content-Type: - application/json ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -l -g --vm-name --name --type --publisher --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand?api-version=2023-04-25-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","name":"AzureMonitorLinuxAgent","type":"microsoft.connectedvmwarevsphere/virtualmachines/extensions","location":"eastus","systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T20:04:02.4574378Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:04:02.4574378Z"},"properties":{"publisher":"Microsoft.Azure.Monitor","type":"AzureMonitorLinuxAgent","typeHandlerVersion":"1.15.3","autoUpgradeMinorVersion":false,"provisioningState":"Accepted","instanceView":{"status":{}}}}' + string: '' headers: azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/9feddfad-0ced-4a62-940c-5909d068bf2e?api-version=2023-04-25-preview cache-control: - no-cache content-length: - - '762' + - '0' content-type: - - application/json; charset=utf-8 + - application/json date: - - Sun, 19 Feb 2023 20:04:04 GMT - etag: - - '"10017b39-0000-0100-0000-63f280b30000"' + - Mon, 07 Aug 2023 14:05:01 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationresults/9feddfad-0ced-4a62-940c-5909d068bf2e?api-version=2023-04-25-preview pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-ms-ratelimit-remaining-subscription-resource-requests: + - '319' status: - code: 201 - message: Created + code: 202 + message: Accepted - request: body: null headers: @@ -2749,29 +2824,33 @@ interactions: Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -l -g --vm-name --name --type --publisher --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/9feddfad-0ced-4a62-940c-5909d068bf2e?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: '{"name":"9feddfad-0ced-4a62-940c-5909d068bf2e","status":"InProgress","startTime":"2023-08-07T14:05:01.1998849Z"}' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/9feddfad-0ced-4a62-940c-5909d068bf2e?api-version=2023-04-25-preview cache-control: - no-cache content-length: - - '567' + - '112' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:04:35 GMT - etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - Mon, 07 Aug 2023 14:07:02 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationresults/9feddfad-0ced-4a62-940c-5909d068bf2e?api-version=2023-04-25-preview pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -2795,29 +2874,30 @@ interactions: Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -l -g --vm-name --name --type --publisher --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/9feddfad-0ced-4a62-940c-5909d068bf2e?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: '{"name":"9feddfad-0ced-4a62-940c-5909d068bf2e","status":"Succeeded","startTime":"2023-08-07T14:05:01.1998849Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand","name":"RunCommand","location":"eastus","type":"Microsoft.HybridCompute/machines/extensions","properties":{"publisher":"Microsoft.Azure.Extensions","type":"CustomScript","typeHandlerVersion":"2.1.10","autoUpgradeMinorVersion":false,"enableAutomaticUpgrade":true,"settings":{"commandToExecute":"whoami"},"provisioningState":"Succeeded","instanceView":{"name":"RunCommand","type":"CustomScript","typeHandlerVersion":"2.1.10","status":{"code":"0","level":"Information","message":"Extension + Message: Enable succeeded: \n[stdout]\nroot\n\n[stderr]\n"}}}}}' headers: cache-control: - no-cache content-length: - - '567' + - '844' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:05:05 GMT - etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - Mon, 07 Aug 2023 14:09:02 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -2841,29 +2921,30 @@ interactions: Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -l -g --vm-name --name --type --publisher --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand","name":"RunCommand","type":"Microsoft.HybridCompute/machines/extensions","location":"eastus","properties":{"publisher":"Microsoft.Azure.Extensions","type":"CustomScript","typeHandlerVersion":"2.1.10","autoUpgradeMinorVersion":false,"enableAutomaticUpgrade":true,"settings":{"commandToExecute":"whoami"},"provisioningState":"Succeeded","instanceView":{"name":"RunCommand","type":"CustomScript","typeHandlerVersion":"2.1.10","status":{"code":"0","level":"Information","message":"Extension + Message: Enable succeeded: \n[stdout]\nroot\n\n[stderr]\n"}}}}' headers: cache-control: - no-cache content-length: - - '567' + - '719' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:05:36 GMT - etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - Mon, 07 Aug 2023 14:09:03 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -2876,51 +2957,57 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"properties": {"settings": {"commandToExecute": "uname"}}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm extension create + - connectedvmware vm extension update Connection: - keep-alive + Content-Length: + - '59' + Content-Type: + - application/json ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -g --vm-name --name --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: '' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/14c0c093-dc12-4534-9e26-38c20dab4c56?api-version=2023-04-25-preview cache-control: - no-cache content-length: - - '567' + - '0' content-type: - - application/json; charset=utf-8 + - application/json date: - - Sun, 19 Feb 2023 20:06:07 GMT - etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - Mon, 07 Aug 2023 14:09:05 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationresults/14c0c093-dc12-4534-9e26-38c20dab4c56?api-version=2023-04-25-preview pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '319' status: - code: 200 - message: OK + code: 202 + message: Accepted - request: body: null headers: @@ -2929,33 +3016,37 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm extension create + - connectedvmware vm extension update Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -g --vm-name --name --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/14c0c093-dc12-4534-9e26-38c20dab4c56?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: '{"name":"14c0c093-dc12-4534-9e26-38c20dab4c56","status":"InProgress","startTime":"2023-08-07T14:09:05.8566114Z"}' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/14c0c093-dc12-4534-9e26-38c20dab4c56?api-version=2023-04-25-preview cache-control: - no-cache content-length: - - '567' + - '112' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:06:37 GMT - etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - Mon, 07 Aug 2023 14:11:07 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationresults/14c0c093-dc12-4534-9e26-38c20dab4c56?api-version=2023-04-25-preview pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -2975,33 +3066,34 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm extension create + - connectedvmware vm extension update Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -g --vm-name --name --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HybridCompute/locations/eastus/operationstatus/14c0c093-dc12-4534-9e26-38c20dab4c56?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: '{"name":"14c0c093-dc12-4534-9e26-38c20dab4c56","status":"Succeeded","startTime":"2023-08-07T14:09:05.8566114Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand","name":"RunCommand","location":"eastus","type":"Microsoft.HybridCompute/machines/extensions","properties":{"publisher":"Microsoft.Azure.Extensions","type":"CustomScript","typeHandlerVersion":"2.1.10","autoUpgradeMinorVersion":false,"enableAutomaticUpgrade":true,"settings":{"commandToExecute":"uname"},"provisioningState":"Succeeded","instanceView":{"name":"RunCommand","type":"CustomScript","typeHandlerVersion":"2.1.10","status":{"code":"0","level":"Information","message":"Extension + Message: Enable succeeded: \n[stdout]\nLinux\n\n[stderr]\n"}}}}}' headers: cache-control: - no-cache content-length: - - '567' + - '844' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:07:08 GMT - etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - Mon, 07 Aug 2023 14:13:07 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -3021,33 +3113,34 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm extension create + - connectedvmware vm extension update Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -g --vm-name --name --settings User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand","name":"RunCommand","type":"Microsoft.HybridCompute/machines/extensions","location":"eastus","properties":{"publisher":"Microsoft.Azure.Extensions","type":"CustomScript","typeHandlerVersion":"2.1.10","autoUpgradeMinorVersion":false,"enableAutomaticUpgrade":true,"settings":{"commandToExecute":"uname"},"provisioningState":"Succeeded","instanceView":{"name":"RunCommand","type":"CustomScript","typeHandlerVersion":"2.1.10","status":{"code":"0","level":"Information","message":"Extension + Message: Enable succeeded: \n[stdout]\nLinux\n\n[stderr]\n"}}}}' headers: cache-control: - no-cache content-length: - - '567' + - '719' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:07:39 GMT - etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - Mon, 07 Aug 2023 14:13:08 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -3060,51 +3153,61 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"properties": {"hardwareProfile": {"memorySizeMB": 2048, "numCPUs": 2}}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm extension create + - connectedvmware vm update Connection: - keep-alive + Content-Length: + - '73' + Content-Type: + - application/json ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -g --name --memory-size --num-CPUs User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"InProgress","startTime":"2023-02-19T20:04:03.239504Z"}' + string: 'null' headers: + api-supported-versions: + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f5f4f52c-0bec-4360-a9fe-3cad6573e2c7*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '567' + - '4' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:08:10 GMT + - Mon, 07 Aug 2023 14:13:11 GMT etag: - - '"2400cbd2-0000-0100-0000-63f280b80000"' + - '"10008b0a-0000-0100-0000-64d0fbf70000"' expires: - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f5f4f52c-0bec-4360-a9fe-3cad6573e2c7*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' status: - code: 200 - message: OK + code: 202 + message: Accepted - request: body: null headers: @@ -3113,30 +3216,29 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm extension create + - connectedvmware vm update Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -g --name --memory-size --num-CPUs User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f5f4f52c-0bec-4360-a9fe-3cad6573e2c7*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","name":"f473cbe6-529e-4b9e-b2ac-ccb08b863cc6*C018C49EFAD9A898B94AB0C6A5D43F2A1BAB41B3174DD3AC2FE0F19A80AC9422","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","status":"Succeeded","startTime":"2023-02-19T20:04:03.239504Z","endTime":"2023-02-19T20:08:11.643669Z","properties":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","name":"AzureMonitorLinuxAgent","location":"eastus","type":"Microsoft.ConnectedVMwarevSphere/virtualMachines/extensions","properties":{"publisher":"Microsoft.Azure.Monitor","type":"AzureMonitorLinuxAgent","typeHandlerVersion":"1.15.3","autoUpgradeMinorVersion":false,"enableAutomaticUpgrade":true,"provisioningState":"Succeeded","instanceView":{"name":"AzureMonitorLinuxAgent","type":"AzureMonitorLinuxAgent","typeHandlerVersion":"1.15.3","status":{"code":"0","level":"Information","message":"Extension - Message: Enable succeeded"}}}}}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f5f4f52c-0bec-4360-a9fe-3cad6573e2c7*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"f5f4f52c-0bec-4360-a9fe-3cad6573e2c7*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:13:10.933648Z","endTime":"2023-08-07T14:13:36.3655815Z","properties":null}' headers: cache-control: - no-cache content-length: - - '1349' + - '652' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:08:40 GMT + - Mon, 07 Aug 2023 14:13:42 GMT etag: - - '"2400dad3-0000-0100-0000-63f281ab0000"' + - '"74006644-0000-0100-0000-64d0fc100000"' expires: - '-1' pragma: @@ -3160,30 +3262,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm extension create + - connectedvmware vm update Connection: - keep-alive ParameterSetName: - - -l -g --vm-name --name --type --publisher --type-handler-version + - -g --name --memory-size --num-CPUs User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","name":"AzureMonitorLinuxAgent","type":"Microsoft.ConnectedVMwarevSphere/virtualMachines/extensions","location":"eastus","properties":{"publisher":"Microsoft.Azure.Monitor","type":"AzureMonitorLinuxAgent","typeHandlerVersion":"1.15.3","autoUpgradeMinorVersion":false,"enableAutomaticUpgrade":true,"provisioningState":"Succeeded","instanceView":{"name":"AzureMonitorLinuxAgent","type":"AzureMonitorLinuxAgent","typeHandlerVersion":"1.15.3","status":{"code":"0","level":"Information","message":"Extension - Message: Enable succeeded"}}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:01:35.4352263Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:13:09.3208177Z"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster"},"infrastructureProfile":{"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"329f3b2b-3685-409d-9b4e-a048602f0062","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moRefId":"vm-1451845","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-08-07T14:02:48Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:13:35.743027Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:13:35.743027Z"}],"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network + adapter 1","macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"5475-2000","name":"disk_1","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":2048,"numCPUs":2,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '729' + - '3394' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:08:41 GMT + - Mon, 07 Aug 2023 14:13:42 GMT etag: - - '"10011546-0000-0100-0000-63f281ab0000"' + - '"1000bc0c-0000-0100-0000-64d0fc100000"' expires: - '-1' pragma: @@ -3202,109 +3307,46 @@ interactions: code: 200 message: OK - request: - body: '{"properties": {"enableAutomaticUpgrade": false}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedvmware vm extension update - Connection: - - keep-alive - Content-Length: - - '49' - Content-Type: - - application/json - ParameterSetName: - - -g --vm-name --name --enable-auto-upgrade - User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent?api-version=2022-01-10-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/extensions/AzureMonitorLinuxAgent","name":"AzureMonitorLinuxAgent","type":"microsoft.connectedvmwarevsphere/virtualmachines/extensions","location":"eastus","systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T20:04:02.4574378Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:08:43.6237271Z"},"properties":{"publisher":"Microsoft.Azure.Monitor","type":"AzureMonitorLinuxAgent","typeHandlerVersion":"1.15.3","autoUpgradeMinorVersion":false,"provisioningState":"Succeeded","instanceView":{"status":{"code":"0","level":"Information","message":"Extension - Message: Enable succeeded"},"name":"AzureMonitorLinuxAgent","type":"AzureMonitorLinuxAgent","typeHandlerVersion":"1.15.3"},"enableAutomaticUpgrade":false}}' - headers: - cache-control: - - no-cache - content-length: - - '968' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 19 Feb 2023 20:08:44 GMT - etag: - - '"10016f47-0000-0100-0000-63f281cc0000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: '{"properties": {"hardwareProfile": {"memorySizeMB": 2048, "numCPUs": 2}}}' + body: '{"skipShutdown": false}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm update + - connectedvmware vm stop Connection: - keep-alive Content-Length: - - '73' + - '23' Content-Type: - application/json ParameterSetName: - - -g --name --memory-size --num-CPUs + - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:08:47.1746322Z"},"identity":{"principalId":"1cb74750-e0d4-437a-828b-f2ea3b9240c3","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"False","type":"Ready","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T20:08:48.174021Z"},{"status":"False","type":"Idle","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T20:08:48.174021Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","ipAddresses":["10.150.177.60","fe80::250:56ff:fe95:236b","2404:f801:4800:14:250:56ff:fe95:236b"],"macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::12f3:11ff:fe3b:55d3","fe80::12f3:11ff:fe36:994b"],"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0"},{"ipAddress":"fe80::250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304","allowExtensionOperations":true},"hardwareProfile":{"memorySizeMB":2048,"numCPUs":2,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn","guestAgentProfile":{"vmUuid":"A26D1542-B63F-B8F0-27A0-D10934D6916A","status":"Connected","lastStatusChange":"2023-02-19T20:03:29.1042631Z","agentVersion":"1.27.02238.691","errorDetails":[]}}}' + string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e1a5ea46-19d1-4bcd-a874-f4b313259c6d*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '4567' + - '4' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:08:52 GMT - etag: - - '"3101b7e4-0000-0100-0000-63f281d00000"' + - Mon, 07 Aug 2023 14:13:45 GMT expires: - '-1' location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -3316,8 +3358,8 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '1198' status: - code: 201 - message: Created + code: 202 + message: Accepted - request: body: null headers: @@ -3326,29 +3368,29 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm update + - connectedvmware vm stop Connection: - keep-alive ParameterSetName: - - -g --name --memory-size --num-CPUs + - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e1a5ea46-19d1-4bcd-a874-f4b313259c6d*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e1a5ea46-19d1-4bcd-a874-f4b313259c6d*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"e1a5ea46-19d1-4bcd-a874-f4b313259c6d*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:08:47.9955413Z","endTime":"2023-02-19T20:09:08.8535868Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:13:45.1029526Z","endTime":"2023-08-07T14:14:07.8395115Z","properties":null}' headers: cache-control: - no-cache content-length: - - '592' + - '653' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:09:23 GMT + - Mon, 07 Aug 2023 14:14:16 GMT etag: - - '"240050d4-0000-0100-0000-63f281e40000"' + - '"7400e84f-0000-0100-0000-64d0fc2f0000"' expires: - '-1' pragma: @@ -3372,33 +3414,29 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm update + - connectedvmware vm stop Connection: - keep-alive ParameterSetName: - - -g --name --memory-size --num-CPUs + - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T19:59:46.7913271Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:08:47.1746322Z"},"identity":{"principalId":"1cb74750-e0d4-437a-828b-f2ea3b9240c3","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"properties":{"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/virtualmachineTemplates/azcli-test-vm-template","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"CustomizationCompleted","lastUpdatedAt":"2023-02-19T20:01:01Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:09:07.5426797Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:09:07.5426797Z"}],"vmId":"f2152429-c9d4-423d-841d-7cba118505be","customResourceName":"f2152429-c9d4-423d-841d-7cba118505be","networkProfile":{"networkInterfaces":[{"name":"nic_1","label":"Network - adapter 1","macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset"}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","name":"disk_1","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304","allowExtensionOperations":true},"hardwareProfile":{"memorySizeMB":2048,"numCPUs":2,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moRefId":"vm-1184421","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn","guestAgentProfile":{"vmUuid":"A26D1542-B63F-B8F0-27A0-D10934D6916A","status":"Connected","lastStatusChange":"2023-02-19T20:03:29.1042631Z","agentVersion":"1.27.02238.691","errorDetails":[]}}}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"b6ad28ad-4cfd-45b3-8784-a577dd3ec9fe*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:13:45.1029526Z","endTime":"2023-08-07T14:14:07.8395115Z","properties":null}' headers: cache-control: - no-cache content-length: - - '3815' + - '653' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:09:24 GMT + - Mon, 07 Aug 2023 14:14:17 GMT etag: - - '"3101c5e4-0000-0100-0000-63f281e40000"' + - '"7400e84f-0000-0100-0000-64d0fc2f0000"' expires: - '-1' pragma: @@ -3411,40 +3449,36 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-providerhub-traffic: - - 'True' status: code: 200 message: OK - request: - body: '{"skipShutdown": false}' + body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm stop + - connectedvmware vm start Connection: - keep-alive Content-Length: - - '23' - Content-Type: - - application/json + - '0' ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/stop?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start?api-version=2023-03-01-preview response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -3452,11 +3486,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:09:26 GMT + - Mon, 07 Aug 2023 14:14:18 GMT expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -3478,29 +3512,29 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm stop + - connectedvmware vm start Connection: - keep-alive ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:09:26.4558465Z","endTime":"2023-02-19T20:09:52.2802385Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:14:18.8669913Z","endTime":"2023-08-07T14:14:39.1966314Z","properties":null}' headers: cache-control: - no-cache content-length: - - '592' + - '653' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:09:57 GMT + - Mon, 07 Aug 2023 14:14:49 GMT etag: - - '"240089d4-0000-0100-0000-63f282100000"' + - '"7400605b-0000-0100-0000-64d0fc4f0000"' expires: - '-1' pragma: @@ -3524,29 +3558,29 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm stop + - connectedvmware vm start Connection: - keep-alive ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"e47ce56c-b3b6-4d78-9547-1d6abe597f81*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:09:26.4558465Z","endTime":"2023-02-19T20:09:52.2802385Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"a5488d53-63c9-4c3b-9527-60257ee9e53c*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:14:18.8669913Z","endTime":"2023-08-07T14:14:39.1966314Z","properties":null}' headers: cache-control: - no-cache content-length: - - '592' + - '653' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:09:57 GMT + - Mon, 07 Aug 2023 14:14:49 GMT etag: - - '"240089d4-0000-0100-0000-63f282100000"' + - '"7400605b-0000-0100-0000-64d0fc4f0000"' expires: - '-1' pragma: @@ -3570,25 +3604,25 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm start + - connectedvmware vm delete Connection: - keep-alive Content-Length: - '0' ParameterSetName: - - -g --name + - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm/start?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -3596,11 +3630,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:10:01 GMT + - Mon, 07 Aug 2023 14:14:51 GMT + etag: + - '"10001c13-0000-0100-0000-64d0fc5c0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -3609,8 +3645,8 @@ interactions: - nosniff x-ms-providerhub-traffic: - 'True' - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' status: code: 202 message: Accepted @@ -3622,31 +3658,35 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm start + - connectedvmware vm delete Connection: - keep-alive ParameterSetName: - - -g --name + - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Accepted","startTime":"2023-02-19T20:10:01.21301Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Deleting","startTime":"2023-08-07T14:14:52.0009683Z"}' headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '530' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:10:32 GMT + - Mon, 07 Aug 2023 14:15:22 GMT etag: - - '"24009ed4-0000-0100-0000-63f282190000"' + - '"74004360-0000-0100-0000-64d0fc5b0000"' expires: - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -3664,141 +3704,41 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm start - Connection: - - keep-alive - ParameterSetName: - - -g --name - User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview - response: - body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:10:01.21301Z","endTime":"2023-02-19T20:10:32.2001534Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 19 Feb 2023 20:11:02 GMT - etag: - - '"2400d8d4-0000-0100-0000-63f282380000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - connectedvmware vm start - Connection: - - keep-alive - ParameterSetName: - - -g --name - User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview - response: - body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"2f64b144-8921-4b43-8b62-a4ed0f5d3a84*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:10:01.21301Z","endTime":"2023-02-19T20:10:32.2001534Z","properties":null}' - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 19 Feb 2023 20:11:02 GMT - etag: - - '"2400d8d4-0000-0100-0000-63f282380000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - connectedvmware vm delete Connection: - keep-alive - Content-Length: - - '0' ParameterSetName: - - -g --name --retain -y + - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview&force=false&retain=true + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: GET + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: 'null' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Deleting","startTime":"2023-08-07T14:14:52.0009683Z"}' headers: - api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '4' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:11:09 GMT + - Mon, 07 Aug 2023 14:15:53 GMT etag: - - '"3101eae4-0000-0100-0000-63f2825d0000"' + - '"74004360-0000-0100-0000-64d0fc5b0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-providerhub-traffic: - - 'True' - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' status: code: 202 message: Accepted @@ -3814,27 +3754,31 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --name --retain -y + - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Deleting","startTime":"2023-02-19T20:11:08.6457116Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Deleting","startTime":"2023-08-07T14:14:52.0009683Z"}' headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '532' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:11:40 GMT + - Mon, 07 Aug 2023 14:16:24 GMT etag: - - '"240011d5-0000-0100-0000-63f2825c0000"' + - '"74004360-0000-0100-0000-64d0fc5b0000"' expires: - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -3856,113 +3800,126 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --name --retain -y + - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Deleting","startTime":"2023-02-19T20:11:08.6457116Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"88c0e5fb-7a8e-4999-bfee-b1c4404bccba*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:14:52.0009683Z","properties":null}' headers: cache-control: - no-cache content-length: - - '532' + - '612' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:12:10 GMT + - Mon, 07 Aug 2023 14:16:55 GMT etag: - - '"240011d5-0000-0100-0000-63f2825c0000"' + - '"0300ed89-0000-4d00-0000-64d0fcd50000"' expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm delete + - connectedvmware vm create Connection: - keep-alive ParameterSetName: - - -g --name --retain -y + - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Deleting","startTime":"2023-02-19T20:11:08.6457116Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/vcenters/azcli-test-vc","name":"azcli-test-vc","type":"microsoft.connectedvmwarevsphere/vcenters","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azcli-test-rg/providers/microsoft.extendedlocation/customlocations/azcli-test-cl"},"tags":{},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-16T15:53:39.9929387Z","lastModifiedBy":"ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7","lastModifiedByType":"Application","lastModifiedAt":"2023-08-06T23:44:21.1344414Z"},"properties":{"credentials":{"username":"arcvmware"},"uuid":"e6048b2a-ba86-4334-adff-ba3d617d12ef","fqdn":"idclab-vcen67.fareast.corp.microsoft.com","port":443,"version":"6.7.0","instanceUuid":"db73f8f2-624c-4a0f-905b-8c6f34442cbc","customResourceName":"e6048b2a-ba86-4334-adff-ba3d617d12ef","connectionStatus":"Connected","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Connected","lastUpdatedAt":"2023-08-06T23:44:15Z"},{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-01T05:26:07.8798425Z"}]}}' headers: cache-control: - no-cache content-length: - - '532' + - '1339' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:12:41 GMT + - Mon, 07 Aug 2023 14:16:57 GMT etag: - - '"240011d5-0000-0100-0000-63f2825c0000"' + - '"1600d91b-0000-0100-0000-64d030550000"' expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff + x-ms-providerhub-traffic: + - 'True' status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - connectedvmware vm delete + - connectedvmware vm create Connection: - keep-alive ParameterSetName: - - -g --name --retain -y + - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"f2491154-d607-4855-8170-e4cbfd459b26*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:11:08.6457116Z","properties":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0","name":"azcli-test-vm-0","location":"eastus","tags":{},"kind":"VMware","identity":{"type":"SystemAssigned","principalId":"4effc565-e795-4daa-9b71-08d9f91bc032","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"type":"Microsoft.HybridCompute/machines","properties":{"provisioningState":"Succeeded","agentVersion":"1.33.02399.1041","status":"Connected","lastStatusChange":"2023-08-07T14:14:44.2303719Z","errorDetails":[],"displayName":"azcli-test-vm-0","machineFqdn":"azcli-test-vm-0","osName":"linux","osVersion":"4.4.0-186-generic","osType":"linux","osProfile":{"computerName":"azcli-test-vm-0"},"vmId":"ff09c91f-d979-4860-9be5-9ad4def8d328","vmUuid":"0C5E1542-898B-A8F5-C4B1-146765D9F864","osSku":"Ubuntu + 16.04.7 LTS","domainName":"unknown","adFqdn":"unknown","dnsFqdn":"azcli-test-vm-0","mssqlDiscovered":"false","cloudMetadata":{"provider":"N/A"},"detectedProperties":{"cloudprovider":"N/A","coreCount":"1","logicalCoreCount":"2","manufacturer":"VMware, + Inc.","model":"VMware Virtual Platform","mssqldiscovered":"false","processorCount":"2","productType":"unknown"},"agentConfiguration":{"proxyUrl":"","incomingConnectionsPorts":[],"extensionsAllowList":[],"extensionsBlockList":[],"proxyBypass":[],"extensionsEnabled":"true","guestConfigurationEnabled":"true","configMode":"full"},"serviceStatuses":{"extensionService":{"status":"active","startupType":"enabled"},"guestConfigurationService":{"status":"active","startupType":"enabled"}},"agentUpgrade":{"enableAutomaticUpgrade":false},"networkProfile":{"networkInterfaces":[{"ipAddresses":[{"address":"10.150.176.233","ipAddressVersion":"IPv4","subnet":{"addressPrefix":"10.150.176.0/21"}},{"address":"2404:f801:4800:14:250:56ff:fe95:e954","ipAddressVersion":"IPv6","subnet":{"addressPrefix":"2404:f801:4800:14::/64"}}]}]},"esuProperties":{"arcEsuEnrollmentState":"Ineligible","esuKeyActive":false}},"resources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/extensions/RunCommand","name":"RunCommand","type":"Microsoft.HybridCompute/machines/extensions","location":"eastus","properties":{"publisher":"Microsoft.Azure.Extensions","type":"CustomScript","typeHandlerVersion":"2.1.10","autoUpgradeMinorVersion":false,"enableAutomaticUpgrade":true,"settings":{"commandToExecute":"uname"},"provisioningState":"Succeeded","instanceView":{"name":"RunCommand","type":"CustomScript","typeHandlerVersion":"2.1.10","status":{"code":"0","level":"Information","message":"Extension + Message: Enable succeeded: \n[stdout]\nLinux\n\n[stderr]\n"}}}}]}' headers: cache-control: - no-cache content-length: - - '551' + - '2737' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:13:12 GMT - etag: - - '"2400e5d5-0000-0100-0000-63f282d20000"' + - Mon, 07 Aug 2023 14:16:59 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -3975,9 +3932,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus", "extendedLocation": {"type": "CustomLocation", "name": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"}, - "properties": {"inventoryItemId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vm-1184421"}}' + body: '{"extendedLocation": {"type": "CustomLocation", "name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"}, + "properties": {"infrastructureProfile": {"inventoryItemId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vm-1451845"}}}' headers: Accept: - application/json @@ -3988,39 +3944,39 @@ interactions: Connection: - keep-alive Content-Length: - - '440' + - '445' Content-Type: - application/json ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T20:13:19.3957231Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:13:19.3957231Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vm-1184421","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Accepted","statuses":[{"status":"False","type":"Ready","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T20:13:22.1960655Z"},{"status":"False","type":"Idle","reason":"Provisioning","message":"The - resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-02-19T20:13:22.1960655Z"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:17:00.2093907Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:17:00.2093907Z"},"properties":{"infrastructureProfile":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vm-1451845","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc"},"provisioningState":"Accepted","statuses":[{"status":"False","type":"Ready","reason":"Provisioning","message":"The + resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-08-07T14:17:02.4735677Z"},{"status":"False","type":"Idle","reason":"Provisioning","message":"The + resource is being provisioned.","severity":"Info","lastUpdatedAt":"2023-08-07T14:17:02.4735677Z"}]}}' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/4467d09a-b76f-4c46-b335-5b51f032b2b5*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/714314ad-7f7f-4b79-926b-85696d23439b*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '1471' + - '1564' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:13:23 GMT + - Mon, 07 Aug 2023 14:17:02 GMT etag: - - '"310111e5-0000-0100-0000-63f282e20000"' + - '"1000a51e-0000-0100-0000-64d0fcde0000"' expires: - '-1' location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm + - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default pragma: - no-cache strict-transport-security: @@ -4030,7 +3986,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 201 message: Created @@ -4048,23 +4004,23 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/4467d09a-b76f-4c46-b335-5b51f032b2b5*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/714314ad-7f7f-4b79-926b-85696d23439b*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/4467d09a-b76f-4c46-b335-5b51f032b2b5*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"4467d09a-b76f-4c46-b335-5b51f032b2b5*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:13:21.9045862Z","endTime":"2023-02-19T20:13:47.0426988Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/714314ad-7f7f-4b79-926b-85696d23439b*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"714314ad-7f7f-4b79-926b-85696d23439b*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:17:02.1181065Z","endTime":"2023-08-07T14:17:22.1989909Z","properties":null}' headers: cache-control: - no-cache content-length: - - '592' + - '653' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:13:53 GMT + - Mon, 07 Aug 2023 14:17:32 GMT etag: - - '"240021d6-0000-0100-0000-63f282fb0000"' + - '"74005597-0000-0100-0000-64d0fcf20000"' expires: - '-1' pragma: @@ -4094,27 +4050,27 @@ interactions: ParameterSetName: - -g -l --custom-location --vcenter -i --name User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","name":"azcli-test-vm","type":"microsoft.connectedvmwarevsphere/virtualmachines","kind":"VMware","location":"eastus","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"sanmishra@microsoft.com","createdByType":"User","createdAt":"2023-02-19T20:13:19.3957231Z","lastModifiedBy":"sanmishra@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-02-19T20:13:19.3957231Z"},"properties":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vm-1184421","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-02-19T20:13:43.5768978Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-02-19T20:13:43.5768978Z"}],"vmId":"0109db02-2dd9-475e-a241-d6d4723d7a2b","placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"customResourceName":"0109db02-2dd9-475e-a241-d6d4723d7a2b","moRefId":"vm-1184421","networkProfile":{"networkInterfaces":[{"label":"Network - adapter 1","ipAddresses":["10.150.177.60","fe80::250:56ff:fe95:236b","2404:f801:4800:14:250:56ff:fe95:236b"],"macAddress":"00:50:56:95:23:6b","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM - Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::12f3:11ff:fe36:994b","fe80::12f3:11ff:fe3b:55d3"],"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.177.60","subnetMask":"255.255.248.0"},{"ipAddress":"fe80::250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:236b","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"2796-2000","label":"Hard - disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm","osType":"Linux","osName":"Ubuntu - Linux (64-bit)","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":2048,"numCPUs":2,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"instanceUuid":"f2152429-c9d4-423d-841d-7cba118505be","moName":"azcli-test-vm","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42156da2-3fb6-f0b8-27a0-d10934d6916a","firmwareType":"bios","powerState":"poweredOn"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","name":"default","type":"microsoft.connectedvmwarevsphere/virtualmachineinstances","extendedLocation":{"type":"CustomLocation","name":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ExtendedLocation/CustomLocations/azcli-test-cl"},"systemData":{"createdBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","createdByType":"Application","createdAt":"2023-08-07T14:17:00.2093907Z","lastModifiedBy":"fe61de33-9658-4dac-9b6e-8ef8d993bb32","lastModifiedByType":"Application","lastModifiedAt":"2023-08-07T14:17:00.2093907Z"},"properties":{"infrastructureProfile":{"inventoryItemId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc/InventoryItems/vm-1451845","vCenterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVmwarevSphere/vcenters/azcli-test-vc","customResourceName":"da106708-a3ab-4e14-aa5d-24792778c6dc","moRefId":"vm-1451845","instanceUuid":"329f3b2b-3685-409d-9b4e-a048602f0062","moName":"azcli-test-vm-0","folderPath":"ArcPrivateClouds-67","smbiosUuid":"42155e0c-8b89-f5a8-c4b1-146765d9f864","firmwareType":"bios"},"provisioningState":"Succeeded","statuses":[{"status":"True","type":"Ready","lastUpdatedAt":"2023-08-07T14:17:21.6470645Z"},{"status":"True","type":"Idle","lastUpdatedAt":"2023-08-07T14:17:21.6470645Z"}],"placementProfile":{"resourcePoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/azcli-test-resource-pool","clusterId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Clusters/azcli-test-cluster","hostId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/Hosts/azcli-test-host"},"resourceUid":"ff09c91f-d979-4860-9be5-9ad4def8d328","networkProfile":{"networkInterfaces":[{"label":"Network + adapter 1","ipAddresses":["10.150.176.233","2404:f801:4800:14:250:56ff:fe95:e954","fe80::250:56ff:fe95:e954"],"macAddress":"00:50:56:95:e9:54","networkId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/VirtualNetworks/azcli-test-virtual-network","networkMoRefId":"network-563661","networkMoName":"VM + Network","nicType":"vmxnet3","deviceKey":4000,"powerOnBoot":"enabled","ipSettings":{"allocationMethod":"unset","dnsServers":["10.50.50.50","10.50.10.50"],"gateway":["10.150.176.1","fe80::201:11ff:fe11:1111"],"ipAddress":"10.150.176.233","subnetMask":"255.255.248.0","ipAddressInfo":[{"ipAddress":"10.150.176.233","subnetMask":"255.255.248.0"},{"ipAddress":"2404:f801:4800:14:250:56ff:fe95:e954","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"},{"ipAddress":"fe80::250:56ff:fe95:e954","subnetMask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000"}]}}]},"storageProfile":{"disks":[{"diskObjectId":"6292-2000","label":"Hard + disk 1","diskSizeGB":10,"deviceKey":2000,"diskMode":"persistent","controllerKey":1000,"unitNumber":0,"diskType":"flat"}],"scsiControllers":[{"type":"lsilogic","controllerKey":1000,"scsiCtlrUnitNumber":7,"sharing":"noSharing"}]},"securityProfile":{"uefiSettings":{"secureBootEnabled":false}},"osProfile":{"computerName":"azcli-test-vm-0","osSku":"Ubuntu + Linux (64-bit)","osType":"Linux","guestId":"ubuntu64Guest","toolsRunningStatus":"guestToolsRunning","toolsVersionStatus":"guestToolsUnmanaged","toolsVersion":"10304"},"hardwareProfile":{"memorySizeMB":2048,"numCPUs":2,"numCoresPerSocket":1,"cpuHotAddEnabled":true,"cpuHotRemoveEnabled":false,"memoryHotAddEnabled":true},"powerState":"poweredOn"}}' headers: cache-control: - no-cache content-length: - - '3914' + - '3991' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:13:54 GMT + - Mon, 07 Aug 2023 14:17:32 GMT etag: - - '"31011ee5-0000-0100-0000-63f282fb0000"' + - '"10004520-0000-0100-0000-64d0fcf20000"' expires: - '-1' pragma: @@ -4146,19 +4102,19 @@ interactions: Content-Length: - '0' ParameterSetName: - - -g --name -y + - -g --name --delete-from-host --delete-machine -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm?api-version=2022-01-10-preview&force=false + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default?api-version=2023-03-01-preview&deleteFromHost=true response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -4166,13 +4122,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:13:58 GMT + - Mon, 07 Aug 2023 14:17:36 GMT etag: - - '"310127e5-0000-0100-0000-63f283060000"' + - '"10008a21-0000-0100-0000-64d0fd000000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4198,27 +4154,31 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --name -y + - -g --name --delete-from-host --delete-machine -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Deleting","startTime":"2023-02-19T20:13:57.4943826Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Deleting","startTime":"2023-08-07T14:17:35.7247429Z"}' headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '532' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:14:28 GMT + - Mon, 07 Aug 2023 14:18:05 GMT etag: - - '"24002cd6-0000-0100-0000-63f283050000"' + - '"74002f9c-0000-0100-0000-64d0fcff0000"' expires: - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4240,27 +4200,31 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --name -y + - -g --name --delete-from-host --delete-machine -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Deleting","startTime":"2023-02-19T20:13:57.4943826Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Deleting","startTime":"2023-08-07T14:17:35.7247429Z"}' headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview cache-control: - no-cache content-length: - - '532' + - '593' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:15:00 GMT + - Mon, 07 Aug 2023 14:18:37 GMT etag: - - '"24002cd6-0000-0100-0000-63f283050000"' + - '"74002f9c-0000-0100-0000-64d0fcff0000"' expires: - '-1' + location: + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/eastus/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4282,79 +4246,83 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --name -y + - -g --name --delete-from-host --delete-machine -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Deleting","startTime":"2023-02-19T20:13:57.4943826Z"}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","name":"96efba25-6209-4671-9d3d-dec6fb86c227*99DD5E94BBB3787DBAC7E96753756FD81C7C74387B3D8AC87BB790185C051975","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default","status":"Succeeded","startTime":"2023-08-07T14:17:35.7247429Z","properties":null}' headers: cache-control: - no-cache content-length: - - '532' + - '612' content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:15:30 GMT + - Mon, 07 Aug 2023 14:19:08 GMT etag: - - '"24002cd6-0000-0100-0000-63f283050000"' + - '"740077bd-0000-0100-0000-64d0fd5b0000"' expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - connectedvmware vm delete Connection: - keep-alive + Content-Length: + - '0' ParameterSetName: - - -g --name -y + - -g --name --delete-from-host --delete-machine -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2?api-version=2022-01-10-preview + - AZURECLI/2.42.0 azsdk-python-mgmt-hybridcompute/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.HybridCompute/machines/azcli-test-vm-0?api-version=2023-04-25-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","name":"ab11ca9f-9552-474d-a6a1-315132d8311e*8C24F2E947DEC83F8FA8A160B4EB9CF89800D9D0046AB1D69E82BD6A56D025D2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/azcli-test-vm","status":"Succeeded","startTime":"2023-02-19T20:13:57.4943826Z","properties":null}' + string: '' headers: cache-control: - no-cache content-length: - - '551' + - '0' content-type: - - application/json; charset=utf-8 + - application/json date: - - Sun, 19 Feb 2023 20:16:01 GMT - etag: - - '"2400bad6-0000-0100-0000-63f283650000"' + - Mon, 07 Aug 2023 14:19:17 GMT expires: - '-1' pragma: - no-cache + server: + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' status: code: 200 message: OK @@ -4374,17 +4342,17 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2022-01-10-preview&force=false + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool?api-version=2023-03-01-preview&force=false response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ef8557bd-91e8-4328-b50e-8930710a993f*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d44ee0a9-0b10-4872-bd77-698fe8403a3a*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -4392,13 +4360,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:16:05 GMT + - Mon, 07 Aug 2023 14:19:18 GMT etag: - - '"3c002135-0000-0100-0000-63f283850000"' + - '"6100468e-0000-0100-0000-64d0fd670000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ef8557bd-91e8-4328-b50e-8930710a993f*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d44ee0a9-0b10-4872-bd77-698fe8403a3a*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4426,12 +4394,12 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ef8557bd-91e8-4328-b50e-8930710a993f*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d44ee0a9-0b10-4872-bd77-698fe8403a3a*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/ef8557bd-91e8-4328-b50e-8930710a993f*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","name":"ef8557bd-91e8-4328-b50e-8930710a993f*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","status":"Succeeded","startTime":"2023-02-19T20:16:05.4698931Z","endTime":"2023-02-19T20:16:10.3327096Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d44ee0a9-0b10-4872-bd77-698fe8403a3a*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","name":"d44ee0a9-0b10-4872-bd77-698fe8403a3a*E33D395D76158BAF7C5815D334D05A902D2A49219B7EE04A2C06FA58A8E43EFC","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/resourcePools/azcli-test-resource-pool","status":"Succeeded","startTime":"2023-08-07T14:19:19.4423737Z","endTime":"2023-08-07T14:19:26.3017783Z","properties":null}' headers: cache-control: - no-cache @@ -4440,9 +4408,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:16:36 GMT + - Mon, 07 Aug 2023 14:19:50 GMT etag: - - '"2400f5d6-0000-0100-0000-63f2838a0000"' + - '"740028c4-0000-0100-0000-64d0fd6e0000"' expires: - '-1' pragma: @@ -4474,17 +4442,17 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2022-01-10-preview&force=false + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster?api-version=2023-03-01-preview&force=false response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d853f224-6e9a-4333-a0f7-154f504ff7dd*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/656619d6-74bd-4d89-b132-dd19a3f55e91*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -4492,13 +4460,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:16:41 GMT + - Mon, 07 Aug 2023 14:19:52 GMT etag: - - '"94006ad3-0000-0100-0000-63f283a90000"' + - '"2e007b1e-0000-0100-0000-64d0fd880000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d853f224-6e9a-4333-a0f7-154f504ff7dd*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/656619d6-74bd-4d89-b132-dd19a3f55e91*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4526,12 +4494,12 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d853f224-6e9a-4333-a0f7-154f504ff7dd*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/656619d6-74bd-4d89-b132-dd19a3f55e91*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/d853f224-6e9a-4333-a0f7-154f504ff7dd*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","name":"d853f224-6e9a-4333-a0f7-154f504ff7dd*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","status":"Succeeded","startTime":"2023-02-19T20:16:41.5168337Z","endTime":"2023-02-19T20:16:47.8846637Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/656619d6-74bd-4d89-b132-dd19a3f55e91*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","name":"656619d6-74bd-4d89-b132-dd19a3f55e91*BA7D5BCC10B0E3C8353A43CFDD3238340013F133409368F1AB6C672583FED47E","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/clusters/azcli-test-cluster","status":"Succeeded","startTime":"2023-08-07T14:19:52.3949399Z","endTime":"2023-08-07T14:19:58.9714508Z","properties":null}' headers: cache-control: - no-cache @@ -4540,9 +4508,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:17:12 GMT + - Mon, 07 Aug 2023 14:20:22 GMT etag: - - '"24003bd7-0000-0100-0000-63f283af0000"' + - '"740004d0-0000-0100-0000-64d0fd8e0000"' expires: - '-1' pragma: @@ -4574,17 +4542,17 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2022-01-10-preview&force=false + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore?api-version=2023-03-01-preview&force=false response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f8f528bc-6bff-4fa4-ba89-2ca1782406f8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a61a5e85-343d-4112-b543-8f20c5610078*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -4592,13 +4560,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:17:15 GMT + - Mon, 07 Aug 2023 14:20:25 GMT etag: - - '"3300c826-0000-0100-0000-63f283cc0000"' + - '"170055be-0000-0100-0000-64d0fda90000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f8f528bc-6bff-4fa4-ba89-2ca1782406f8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a61a5e85-343d-4112-b543-8f20c5610078*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4626,12 +4594,12 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f8f528bc-6bff-4fa4-ba89-2ca1782406f8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a61a5e85-343d-4112-b543-8f20c5610078*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/f8f528bc-6bff-4fa4-ba89-2ca1782406f8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","name":"f8f528bc-6bff-4fa4-ba89-2ca1782406f8*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","status":"Succeeded","startTime":"2023-02-19T20:17:16.0937552Z","endTime":"2023-02-19T20:17:19.3985702Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/a61a5e85-343d-4112-b543-8f20c5610078*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","name":"a61a5e85-343d-4112-b543-8f20c5610078*0BA3195A388F8E68B2BCA768784A2C477B581CF3750C51FB69057C6907EB9D70","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/datastores/azcli-test-datastore","status":"Succeeded","startTime":"2023-08-07T14:20:25.3206557Z","endTime":"2023-08-07T14:20:31.1314771Z","properties":null}' headers: cache-control: - no-cache @@ -4640,9 +4608,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:17:47 GMT + - Mon, 07 Aug 2023 14:20:55 GMT etag: - - '"240068d7-0000-0100-0000-63f283cf0000"' + - '"740007db-0000-0100-0000-64d0fdaf0000"' expires: - '-1' pragma: @@ -4674,17 +4642,17 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2022-01-10-preview&force=false + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host?api-version=2023-03-01-preview&force=false response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/cbbed141-3f93-4c91-9004-61af3d869da4*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/1acbebde-f6bb-44e7-912a-66a5eb3c4e19*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -4692,13 +4660,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:17:54 GMT + - Mon, 07 Aug 2023 14:21:18 GMT etag: - - '"29013f30-0000-0100-0000-63f283f20000"' + - '"2f00046a-0000-0100-0000-64d0fddf0000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/cbbed141-3f93-4c91-9004-61af3d869da4*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/1acbebde-f6bb-44e7-912a-66a5eb3c4e19*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4726,12 +4694,12 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/cbbed141-3f93-4c91-9004-61af3d869da4*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/1acbebde-f6bb-44e7-912a-66a5eb3c4e19*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/cbbed141-3f93-4c91-9004-61af3d869da4*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","name":"cbbed141-3f93-4c91-9004-61af3d869da4*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","status":"Succeeded","startTime":"2023-02-19T20:17:54.1054429Z","endTime":"2023-02-19T20:17:57.9560459Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/1acbebde-f6bb-44e7-912a-66a5eb3c4e19*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","name":"1acbebde-f6bb-44e7-912a-66a5eb3c4e19*B55A001CADA037E0E2ED8E056C839E3102437398BD45444965294749D0CB7C3C","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/hosts/azcli-test-host","status":"Succeeded","startTime":"2023-08-07T14:20:57.9128932Z","endTime":"2023-08-07T14:21:25.5993413Z","properties":null}' headers: cache-control: - no-cache @@ -4740,9 +4708,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:18:24 GMT + - Mon, 07 Aug 2023 14:21:48 GMT etag: - - '"2400a6d7-0000-0100-0000-63f283f50000"' + - '"740032ef-0000-0100-0000-64d0fde50000"' expires: - '-1' pragma: @@ -4774,17 +4742,17 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2022-01-10-preview&force=false + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network?api-version=2023-03-01-preview&force=false response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/53dc42f9-f5da-43c5-a136-1f53e8b9fc9b*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/85a17009-e9f2-4ee1-936d-cfb877caba27*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -4792,13 +4760,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:18:29 GMT + - Mon, 07 Aug 2023 14:21:51 GMT etag: - - '"6201de97-0000-0100-0000-63f284150000"' + - '"2900caa9-0000-0100-0000-64d0fe000000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/53dc42f9-f5da-43c5-a136-1f53e8b9fc9b*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/85a17009-e9f2-4ee1-936d-cfb877caba27*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4808,7 +4776,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14997' status: code: 202 message: Accepted @@ -4826,12 +4794,12 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/53dc42f9-f5da-43c5-a136-1f53e8b9fc9b*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/85a17009-e9f2-4ee1-936d-cfb877caba27*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/53dc42f9-f5da-43c5-a136-1f53e8b9fc9b*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","name":"53dc42f9-f5da-43c5-a136-1f53e8b9fc9b*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","status":"Succeeded","startTime":"2023-02-19T20:18:29.7131123Z","endTime":"2023-02-19T20:18:34.7000894Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/85a17009-e9f2-4ee1-936d-cfb877caba27*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","name":"85a17009-e9f2-4ee1-936d-cfb877caba27*CB0A480FE4EF7C13EBE7E6D61E1DABA694436AED00BC4B639CBD00E8ACDF3866","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualNetworks/azcli-test-virtual-network","status":"Succeeded","startTime":"2023-08-07T14:21:51.8583943Z","endTime":"2023-08-07T14:21:57.8105328Z","properties":null}' headers: cache-control: - no-cache @@ -4840,9 +4808,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:19:01 GMT + - Mon, 07 Aug 2023 14:22:22 GMT etag: - - '"2400d6d7-0000-0100-0000-63f2841a0000"' + - '"74008cfb-0000-0100-0000-64d0fe050000"' expires: - '-1' pragma: @@ -4874,17 +4842,17 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2022-01-10-preview&force=false + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template?api-version=2023-03-01-preview&force=false response: body: string: 'null' headers: api-supported-versions: - - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview + - 2020-10-01-preview, 2022-01-10-preview, 2022-07-15-preview, 2023-03-01-preview azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/0d8fbac0-d281-4da3-9e91-7b117c321f67*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/11ac2b1f-d9f6-48e0-8b55-2b675cbae441*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2023-03-01-preview cache-control: - no-cache content-length: @@ -4892,13 +4860,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:19:06 GMT + - Mon, 07 Aug 2023 14:22:24 GMT etag: - - '"2500935a-0000-0100-0000-63f2843b0000"' + - '"4200865f-0000-0100-0000-64d0fe200000"' expires: - '-1' location: - - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/0d8fbac0-d281-4da3-9e91-7b117c321f67*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2022-01-10-preview + - https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/11ac2b1f-d9f6-48e0-8b55-2b675cbae441*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2023-03-01-preview pragma: - no-cache strict-transport-security: @@ -4908,7 +4876,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 202 message: Accepted @@ -4926,12 +4894,12 @@ interactions: ParameterSetName: - -g --name -y User-Agent: - - AZURECLI/2.45.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + - AZURECLI/2.42.0 azsdk-python-mgmt-connectedvmware/1.0.0b1 Python/3.10.2 (Linux-5.17.5-76051705-generic-x86_64-with-glibc2.35) method: GET - uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/0d8fbac0-d281-4da3-9e91-7b117c321f67*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2022-01-10-preview + uri: https://management.azure.com/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/11ac2b1f-d9f6-48e0-8b55-2b675cbae441*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3?api-version=2023-03-01-preview response: body: - string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/0d8fbac0-d281-4da3-9e91-7b117c321f67*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","name":"0d8fbac0-d281-4da3-9e91-7b117c321f67*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","status":"Succeeded","startTime":"2023-02-19T20:19:07.029156Z","endTime":"2023-02-19T20:19:11.3968115Z","properties":null}' + string: '{"id":"/providers/Microsoft.ConnectedVMwarevSphere/locations/EASTUS/operationStatuses/11ac2b1f-d9f6-48e0-8b55-2b675cbae441*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","name":"11ac2b1f-d9f6-48e0-8b55-2b675cbae441*04EA61613559B90D23ED3ECFACDF2E6D1E27A0B3817A66B3F21A8114E2761CF3","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azcli-test-rg/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/azcli-test-vm-template","status":"Succeeded","startTime":"2023-08-07T14:22:24.773342Z","endTime":"2023-08-07T14:22:31.2303488Z","properties":null}' headers: cache-control: - no-cache @@ -4940,9 +4908,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 19 Feb 2023 20:19:37 GMT + - Mon, 07 Aug 2023 14:22:54 GMT etag: - - '"24000bd8-0000-0100-0000-63f2843f0000"' + - '"75000207-0000-0100-0000-64d0fe270000"' expires: - '-1' pragma: diff --git a/src/connectedvmware/azext_connectedvmware/tests/latest/test_connectedvmware_scenario.py b/src/connectedvmware/azext_connectedvmware/tests/latest/test_connectedvmware_scenario.py index 1a72b031ab0..9b737fe97a0 100644 --- a/src/connectedvmware/azext_connectedvmware/tests/latest/test_connectedvmware_scenario.py +++ b/src/connectedvmware/azext_connectedvmware/tests/latest/test_connectedvmware_scenario.py @@ -34,15 +34,16 @@ def test_connectedvmware(self): 'vnet_name': 'azcli-test-virtual-network', 'vmtpl_inventory_item': 'vmtpl-vm-1184288', 'vmtpl_name': 'azcli-test-vm-template', - 'vm_name': 'azcli-test-vm', + 'vm_name': 'azcli-test-vm-0', 'guest_username': 'azcli-user', 'guest_password': 'azcli-password', 'nic_name': 'nic_1', 'disk_name': 'disk_1', - 'extension_name': 'AzureMonitorLinuxAgent', - 'extension_type': 'AzureMonitorLinuxAgent', - 'type_handler_version': '1.15.3', - 'publisher': 'Microsoft.Azure.Monitor', + 'extension_name': 'RunCommand', + 'extension_type': 'CustomScript', + 'publisher': 'Microsoft.Azure.Extensions', + 'command_whoami': '{"commandToExecute": "whoami"}', + 'command_uname': '{"commandToExecute": "uname"}', } ) @@ -181,7 +182,7 @@ def test_connectedvmware(self): # At this point there should be 1 vm-template resource. assert len(resource_list) >= 1 - # Validate the show command output with inventory-item name. + # Validate the inventory-item show command output with resourcepool moRefID. self.cmd( 'az connectedvmware vcenter inventory-item show -g {rg} --vcenter {vc_name} --i {rp_inventory_item}', checks=[ @@ -198,21 +199,14 @@ def test_connectedvmware(self): vm = self.cmd( 'az connectedvmware vm show -g {rg} --name {vm_name}', checks=[ - self.check('name', '{vm_name}'), + self.check('infrastructureProfile.moName', '{vm_name}'), ], ).get_output_in_json() - vm_moRefId = vm['moRefId'] + vm_moRefId = vm['infrastructureProfile']['moRefId'] self.kwargs.update({ 'vm_moRefId': vm_moRefId }) self.assertIsNotNone(vm_moRefId) self.assertNotEqual(len(vm_moRefId), 0, 'moRefId of the VM should not be empty') - # List the VM resources in this resource group. - resource_list = self.cmd( - 'az connectedvmware vm list -g {rg}' - ).get_output_in_json() - # At this point there should be 1 vm resource. - assert len(resource_list) >= 1 - # Validate vm nic name. self.cmd( 'az connectedvmware vm nic show -g {rg} --vm-name {vm_name} --name {nic_name}', @@ -252,21 +246,33 @@ def test_connectedvmware(self): ) # Create VM extension. - self.cmd( - 'az connectedvmware vm extension create -l {loc} -g {rg} --vm-name {vm_name} --name {extension_name} --type {extension_type} --publisher {publisher} --type-handler-version {type_handler_version}', + extension = self.cmd( + ''' + az connectedvmware vm extension create -l {loc} -g {rg} --vm-name {vm_name} --name {extension_name} --type {extension_type} --publisher {publisher} --settings '{command_whoami}' + '''.strip(), checks=[ self.check('provisioningState', 'Succeeded'), - self.check('typeHandlerVersion', '{type_handler_version}'), + self.check('settings.commandToExecute', 'whoami'), ], + ).get_output_in_json() + self.assertIn( + 'root', + extension['instanceView']['status']['message'] ) # Update VM extension. - self.cmd( - 'az connectedvmware vm extension update -g {rg} --vm-name {vm_name} --name {extension_name} --enable-auto-upgrade false', + extension = self.cmd( + ''' + az connectedvmware vm extension update -g {rg} --vm-name {vm_name} --name {extension_name} --settings '{command_uname}' + '''.strip(), checks=[ self.check('provisioningState', 'Succeeded'), - self.check('enableAutomaticUpgrade', False), + self.check('settings.commandToExecute', 'uname'), ], + ).get_output_in_json() + self.assertIn( + 'Linux', + extension['instanceView']['status']['message'] ) # Update VM. @@ -274,6 +280,7 @@ def test_connectedvmware(self): 'az connectedvmware vm update -g {rg} --name {vm_name} --memory-size 2048 --num-CPUs 2', checks=[ self.check('hardwareProfile.memorySizeMb', '2048'), + self.check('hardwareProfile.numCpUs', '2'), ], ) @@ -284,7 +291,7 @@ def test_connectedvmware(self): self.cmd('az connectedvmware vm start -g {rg} --name {vm_name}') # Disable the VM from azure; delete the ARM resource, retain the VM in vCenter. - self.cmd('az connectedvmware vm delete -g {rg} --name {vm_name} --retain -y') + self.cmd('az connectedvmware vm delete -g {rg} --name {vm_name} -y') # Enable the VM to azure again. self.cmd( @@ -292,7 +299,7 @@ def test_connectedvmware(self): ) # Delete the created VM. - self.cmd('az connectedvmware vm delete -g {rg} --name {vm_name} -y') + self.cmd('az connectedvmware vm delete -g {rg} --name {vm_name} --delete-from-host --delete-machine -y') # Delete the created resource-pool. self.cmd('az connectedvmware resource-pool delete -g {rg} --name {rp_name} -y') diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/__init__.py index 11059dcb4dc..f9540baa58f 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/__init__.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/__init__.py @@ -6,13 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._azure_arc_vmware_management_service_api import AzureArcVMwareManagementServiceAPI -from ._version import VERSION - -__version__ = VERSION -__all__ = ['AzureArcVMwareManagementServiceAPI'] - -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/__init__.py new file mode 100644 index 00000000000..11059dcb4dc --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._azure_arc_vmware_management_service_api import AzureArcVMwareManagementServiceAPI +from ._version import VERSION + +__version__ = VERSION +__all__ = ['AzureArcVMwareManagementServiceAPI'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/_azure_arc_vmware_management_service_api.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_azure_arc_vmware_management_service_api.py similarity index 66% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/_azure_arc_vmware_management_service_api.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_azure_arc_vmware_management_service_api.py index 028e5f58ddb..eaef48205db 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/_azure_arc_vmware_management_service_api.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_azure_arc_vmware_management_service_api.py @@ -15,7 +15,7 @@ from . import models from ._configuration import AzureArcVMwareManagementServiceAPIConfiguration -from .operations import ClustersOperations, DatastoresOperations, GuestAgentsOperations, HostsOperations, HybridIdentityMetadataOperations, InventoryItemsOperations, MachineExtensionsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VirtualMachineTemplatesOperations, VirtualMachinesOperations, VirtualNetworksOperations +from .operations import AzureArcVMwareManagementServiceAPIOperationsMixin, ClustersOperations, DatastoresOperations, GuestAgentsOperations, HostsOperations, HybridIdentityMetadataOperations, InventoryItemsOperations, MachineExtensionsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VMInstanceGuestAgentsOperations, VirtualMachineInstancesOperations, VirtualMachineTemplatesOperations, VirtualMachinesOperations, VirtualNetworksOperations, VmInstanceHybridIdentityMetadataOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -24,44 +24,59 @@ from azure.core.credentials import TokenCredential from azure.core.rest import HttpRequest, HttpResponse -class AzureArcVMwareManagementServiceAPI(object): # pylint: disable=too-many-instance-attributes +class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOperationsMixin): # pylint: disable=too-many-instance-attributes """Self service experience for VMware. :ivar operations: Operations operations - :vartype operations: azure.mgmt.connectedvmware.operations.Operations + :vartype operations: azure_arc_vmware_management_service_api.operations.Operations :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: azure.mgmt.connectedvmware.operations.VirtualMachinesOperations + :vartype virtual_machines: + azure_arc_vmware_management_service_api.operations.VirtualMachinesOperations :ivar resource_pools: ResourcePoolsOperations operations - :vartype resource_pools: azure.mgmt.connectedvmware.operations.ResourcePoolsOperations + :vartype resource_pools: + azure_arc_vmware_management_service_api.operations.ResourcePoolsOperations :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.connectedvmware.operations.ClustersOperations + :vartype clusters: azure_arc_vmware_management_service_api.operations.ClustersOperations :ivar hosts: HostsOperations operations - :vartype hosts: azure.mgmt.connectedvmware.operations.HostsOperations + :vartype hosts: azure_arc_vmware_management_service_api.operations.HostsOperations :ivar datastores: DatastoresOperations operations - :vartype datastores: azure.mgmt.connectedvmware.operations.DatastoresOperations + :vartype datastores: azure_arc_vmware_management_service_api.operations.DatastoresOperations :ivar vcenters: VCentersOperations operations - :vartype vcenters: azure.mgmt.connectedvmware.operations.VCentersOperations + :vartype vcenters: azure_arc_vmware_management_service_api.operations.VCentersOperations :ivar virtual_machine_templates: VirtualMachineTemplatesOperations operations :vartype virtual_machine_templates: - azure.mgmt.connectedvmware.operations.VirtualMachineTemplatesOperations + azure_arc_vmware_management_service_api.operations.VirtualMachineTemplatesOperations :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.connectedvmware.operations.VirtualNetworksOperations + :vartype virtual_networks: + azure_arc_vmware_management_service_api.operations.VirtualNetworksOperations :ivar inventory_items: InventoryItemsOperations operations - :vartype inventory_items: azure.mgmt.connectedvmware.operations.InventoryItemsOperations + :vartype inventory_items: + azure_arc_vmware_management_service_api.operations.InventoryItemsOperations :ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations :vartype hybrid_identity_metadata: - azure.mgmt.connectedvmware.operations.HybridIdentityMetadataOperations + azure_arc_vmware_management_service_api.operations.HybridIdentityMetadataOperations :ivar machine_extensions: MachineExtensionsOperations operations - :vartype machine_extensions: azure.mgmt.connectedvmware.operations.MachineExtensionsOperations + :vartype machine_extensions: + azure_arc_vmware_management_service_api.operations.MachineExtensionsOperations :ivar guest_agents: GuestAgentsOperations operations - :vartype guest_agents: azure.mgmt.connectedvmware.operations.GuestAgentsOperations + :vartype guest_agents: azure_arc_vmware_management_service_api.operations.GuestAgentsOperations + :ivar virtual_machine_instances: VirtualMachineInstancesOperations operations + :vartype virtual_machine_instances: + azure_arc_vmware_management_service_api.operations.VirtualMachineInstancesOperations + :ivar vm_instance_hybrid_identity_metadata: VmInstanceHybridIdentityMetadataOperations + operations + :vartype vm_instance_hybrid_identity_metadata: + azure_arc_vmware_management_service_api.operations.VmInstanceHybridIdentityMetadataOperations + :ivar vm_instance_guest_agents: VMInstanceGuestAgentsOperations operations + :vartype vm_instance_guest_agents: + azure_arc_vmware_management_service_api.operations.VMInstanceGuestAgentsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Subscription ID. :type subscription_id: str :param base_url: Service URL. Default value is 'https://management.azure.com'. :type base_url: str - :keyword api_version: Api Version. The default value is "2022-01-10-preview". Note that + :keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -96,6 +111,9 @@ def __init__( self.hybrid_identity_metadata = HybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize) self.machine_extensions = MachineExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) self.guest_agents = GuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_machine_instances = VirtualMachineInstancesOperations(self._client, self._config, self._serialize, self._deserialize) + self.vm_instance_hybrid_identity_metadata = VmInstanceHybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize) + self.vm_instance_guest_agents = VMInstanceGuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize) def _send_request( diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/_configuration.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_configuration.py similarity index 97% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/_configuration.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_configuration.py index 1ef5cb26bff..f30d2d83e75 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/_configuration.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_configuration.py @@ -31,7 +31,7 @@ class AzureArcVMwareManagementServiceAPIConfiguration(Configuration): # pylint: :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Subscription ID. :type subscription_id: str - :keyword api_version: Api Version. The default value is "2022-01-10-preview". Note that + :keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -44,7 +44,7 @@ def __init__( ): # type: (...) -> None super(AzureArcVMwareManagementServiceAPIConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/_patch.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_patch.py similarity index 100% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/_patch.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_patch.py diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/_vendor.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_vendor.py similarity index 100% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/_vendor.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_vendor.py diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/_version.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_version.py similarity index 100% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/_version.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/_version.py diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/__init__.py similarity index 100% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/__init__.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/__init__.py diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_azure_arc_vmware_management_service_api.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_azure_arc_vmware_management_service_api.py similarity index 66% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_azure_arc_vmware_management_service_api.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_azure_arc_vmware_management_service_api.py index b6067bbacce..1831c85c7c9 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_azure_arc_vmware_management_service_api.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_azure_arc_vmware_management_service_api.py @@ -16,51 +16,67 @@ from .. import models from ._configuration import AzureArcVMwareManagementServiceAPIConfiguration -from .operations import ClustersOperations, DatastoresOperations, GuestAgentsOperations, HostsOperations, HybridIdentityMetadataOperations, InventoryItemsOperations, MachineExtensionsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VirtualMachineTemplatesOperations, VirtualMachinesOperations, VirtualNetworksOperations +from .operations import AzureArcVMwareManagementServiceAPIOperationsMixin, ClustersOperations, DatastoresOperations, GuestAgentsOperations, HostsOperations, HybridIdentityMetadataOperations, InventoryItemsOperations, MachineExtensionsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VMInstanceGuestAgentsOperations, VirtualMachineInstancesOperations, VirtualMachineTemplatesOperations, VirtualMachinesOperations, VirtualNetworksOperations, VmInstanceHybridIdentityMetadataOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class AzureArcVMwareManagementServiceAPI: # pylint: disable=too-many-instance-attributes +class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOperationsMixin): # pylint: disable=too-many-instance-attributes """Self service experience for VMware. :ivar operations: Operations operations - :vartype operations: azure.mgmt.connectedvmware.aio.operations.Operations + :vartype operations: azure_arc_vmware_management_service_api.aio.operations.Operations :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: azure.mgmt.connectedvmware.aio.operations.VirtualMachinesOperations + :vartype virtual_machines: + azure_arc_vmware_management_service_api.aio.operations.VirtualMachinesOperations :ivar resource_pools: ResourcePoolsOperations operations - :vartype resource_pools: azure.mgmt.connectedvmware.aio.operations.ResourcePoolsOperations + :vartype resource_pools: + azure_arc_vmware_management_service_api.aio.operations.ResourcePoolsOperations :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.connectedvmware.aio.operations.ClustersOperations + :vartype clusters: azure_arc_vmware_management_service_api.aio.operations.ClustersOperations :ivar hosts: HostsOperations operations - :vartype hosts: azure.mgmt.connectedvmware.aio.operations.HostsOperations + :vartype hosts: azure_arc_vmware_management_service_api.aio.operations.HostsOperations :ivar datastores: DatastoresOperations operations - :vartype datastores: azure.mgmt.connectedvmware.aio.operations.DatastoresOperations + :vartype datastores: + azure_arc_vmware_management_service_api.aio.operations.DatastoresOperations :ivar vcenters: VCentersOperations operations - :vartype vcenters: azure.mgmt.connectedvmware.aio.operations.VCentersOperations + :vartype vcenters: azure_arc_vmware_management_service_api.aio.operations.VCentersOperations :ivar virtual_machine_templates: VirtualMachineTemplatesOperations operations :vartype virtual_machine_templates: - azure.mgmt.connectedvmware.aio.operations.VirtualMachineTemplatesOperations + azure_arc_vmware_management_service_api.aio.operations.VirtualMachineTemplatesOperations :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.connectedvmware.aio.operations.VirtualNetworksOperations + :vartype virtual_networks: + azure_arc_vmware_management_service_api.aio.operations.VirtualNetworksOperations :ivar inventory_items: InventoryItemsOperations operations - :vartype inventory_items: azure.mgmt.connectedvmware.aio.operations.InventoryItemsOperations + :vartype inventory_items: + azure_arc_vmware_management_service_api.aio.operations.InventoryItemsOperations :ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations :vartype hybrid_identity_metadata: - azure.mgmt.connectedvmware.aio.operations.HybridIdentityMetadataOperations + azure_arc_vmware_management_service_api.aio.operations.HybridIdentityMetadataOperations :ivar machine_extensions: MachineExtensionsOperations operations :vartype machine_extensions: - azure.mgmt.connectedvmware.aio.operations.MachineExtensionsOperations + azure_arc_vmware_management_service_api.aio.operations.MachineExtensionsOperations :ivar guest_agents: GuestAgentsOperations operations - :vartype guest_agents: azure.mgmt.connectedvmware.aio.operations.GuestAgentsOperations + :vartype guest_agents: + azure_arc_vmware_management_service_api.aio.operations.GuestAgentsOperations + :ivar virtual_machine_instances: VirtualMachineInstancesOperations operations + :vartype virtual_machine_instances: + azure_arc_vmware_management_service_api.aio.operations.VirtualMachineInstancesOperations + :ivar vm_instance_hybrid_identity_metadata: VmInstanceHybridIdentityMetadataOperations + operations + :vartype vm_instance_hybrid_identity_metadata: + azure_arc_vmware_management_service_api.aio.operations.VmInstanceHybridIdentityMetadataOperations + :ivar vm_instance_guest_agents: VMInstanceGuestAgentsOperations operations + :vartype vm_instance_guest_agents: + azure_arc_vmware_management_service_api.aio.operations.VMInstanceGuestAgentsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Subscription ID. :type subscription_id: str :param base_url: Service URL. Default value is 'https://management.azure.com'. :type base_url: str - :keyword api_version: Api Version. The default value is "2022-01-10-preview". Note that + :keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -94,6 +110,9 @@ def __init__( self.hybrid_identity_metadata = HybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize) self.machine_extensions = MachineExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) self.guest_agents = GuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_machine_instances = VirtualMachineInstancesOperations(self._client, self._config, self._serialize, self._deserialize) + self.vm_instance_hybrid_identity_metadata = VmInstanceHybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize) + self.vm_instance_guest_agents = VMInstanceGuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize) def _send_request( diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_configuration.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_configuration.py similarity index 97% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_configuration.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_configuration.py index 38fea25b86c..a2ab20e7c2d 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_configuration.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_configuration.py @@ -29,7 +29,7 @@ class AzureArcVMwareManagementServiceAPIConfiguration(Configuration): # pylint: :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Subscription ID. :type subscription_id: str - :keyword api_version: Api Version. The default value is "2022-01-10-preview". Note that + :keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -41,7 +41,7 @@ def __init__( **kwargs: Any ) -> None: super(AzureArcVMwareManagementServiceAPIConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_patch.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_patch.py similarity index 100% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/_patch.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/_patch.py diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/__init__.py similarity index 74% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/__init__.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/__init__.py index 81e185f271d..c6ae55da975 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/__init__.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/__init__.py @@ -18,7 +18,11 @@ from ._inventory_items_operations import InventoryItemsOperations from ._hybrid_identity_metadata_operations import HybridIdentityMetadataOperations from ._machine_extensions_operations import MachineExtensionsOperations +from ._azure_arc_vmware_management_service_api_operations import AzureArcVMwareManagementServiceAPIOperationsMixin from ._guest_agents_operations import GuestAgentsOperations +from ._virtual_machine_instances_operations import VirtualMachineInstancesOperations +from ._vm_instance_hybrid_identity_metadata_operations import VmInstanceHybridIdentityMetadataOperations +from ._vm_instance_guest_agents_operations import VMInstanceGuestAgentsOperations __all__ = [ 'Operations', @@ -33,5 +37,9 @@ 'InventoryItemsOperations', 'HybridIdentityMetadataOperations', 'MachineExtensionsOperations', + 'AzureArcVMwareManagementServiceAPIOperationsMixin', 'GuestAgentsOperations', + 'VirtualMachineInstancesOperations', + 'VmInstanceHybridIdentityMetadataOperations', + 'VMInstanceGuestAgentsOperations', ] diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_azure_arc_vmware_management_service_api_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_azure_arc_vmware_management_service_api_operations.py new file mode 100644 index 00000000000..928cc75ae0a --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_azure_arc_vmware_management_service_api_operations.py @@ -0,0 +1,142 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar, Union + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._azure_arc_vmware_management_service_api_operations import build_upgrade_extensions_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AzureArcVMwareManagementServiceAPIOperationsMixin: + + async def _upgrade_extensions_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_machine_name: str, + extension_upgrade_parameters: "_models.MachineExtensionUpgrade", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_upgrade_parameters, 'MachineExtensionUpgrade') + + request = build_upgrade_extensions_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_machine_name=virtual_machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._upgrade_extensions_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _upgrade_extensions_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/upgradeExtensions"} # type: ignore + + + @distributed_trace_async + async def begin_upgrade_extensions( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_machine_name: str, + extension_upgrade_parameters: "_models.MachineExtensionUpgrade", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """The operation to Upgrade Machine Extensions. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param virtual_machine_name: The name of the machine containing the extension. + :type virtual_machine_name: str + :param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation. + :type extension_upgrade_parameters: + ~azure_arc_vmware_management_service_api.models.MachineExtensionUpgrade + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_extensions_initial( + resource_group_name=resource_group_name, + virtual_machine_name=virtual_machine_name, + extension_upgrade_parameters=extension_upgrade_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_upgrade_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/upgradeExtensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_clusters_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_clusters_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_clusters_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_clusters_operations.py index 428457476bd..224abddae5e 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_clusters_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_clusters_operations.py @@ -32,7 +32,7 @@ class ClustersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -122,7 +122,7 @@ async def begin_create( :param cluster_name: Name of the cluster. :type cluster_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.Cluster + :type body: ~azure_arc_vmware_management_service_api.models.Cluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -133,10 +133,11 @@ async def begin_create( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.Cluster] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.Cluster] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -196,7 +197,7 @@ async def get( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Cluster + :rtype: ~azure_arc_vmware_management_service_api.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -205,7 +206,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -257,10 +258,10 @@ async def update( :param cluster_name: Name of the cluster. :type cluster_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Cluster + :rtype: ~azure_arc_vmware_management_service_api.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -269,7 +270,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -324,7 +325,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -385,7 +386,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -435,10 +436,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClustersList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.ClustersList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.ClustersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ClustersList"] error_map = { @@ -513,10 +514,10 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClustersList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.ClustersList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.ClustersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ClustersList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_datastores_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_datastores_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_datastores_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_datastores_operations.py index 36650886e12..f3e33249964 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_datastores_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_datastores_operations.py @@ -32,7 +32,7 @@ class DatastoresOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -122,7 +122,7 @@ async def begin_create( :param datastore_name: Name of the datastore. :type datastore_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.Datastore + :type body: ~azure_arc_vmware_management_service_api.models.Datastore :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -133,10 +133,11 @@ async def begin_create( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Datastore or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.Datastore] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.Datastore] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] @@ -196,7 +197,7 @@ async def get( :type datastore_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Datastore, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Datastore + :rtype: ~azure_arc_vmware_management_service_api.models.Datastore :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] @@ -205,7 +206,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -257,10 +258,10 @@ async def update( :param datastore_name: Name of the datastore. :type datastore_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Datastore, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Datastore + :rtype: ~azure_arc_vmware_management_service_api.models.Datastore :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] @@ -269,7 +270,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -324,7 +325,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -385,7 +386,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -435,10 +436,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatastoresList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.DatastoresList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.DatastoresList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoresList"] error_map = { @@ -513,10 +514,10 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatastoresList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.DatastoresList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.DatastoresList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoresList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_guest_agents_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_guest_agents_operations.py similarity index 93% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_guest_agents_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_guest_agents_operations.py index ccd3cb0a12a..e08525b9e82 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_guest_agents_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_guest_agents_operations.py @@ -21,7 +21,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._guest_agents_operations import build_create_request_initial, build_delete_request_initial, build_get_request, build_list_by_vm_request +from ...operations._guest_agents_operations import build_create_request_initial, build_delete_request_initial, build_get_request, build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -32,7 +32,7 @@ class GuestAgentsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -61,7 +61,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -127,7 +127,7 @@ async def begin_create( :param name: Name of the guestAgents. :type name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.GuestAgent + :type body: ~azure_arc_vmware_management_service_api.models.GuestAgent :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -138,10 +138,11 @@ async def begin_create( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either GuestAgent or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.GuestAgent] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.GuestAgent] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] @@ -205,7 +206,7 @@ async def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestAgent, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.GuestAgent + :rtype: ~azure_arc_vmware_management_service_api.models.GuestAgent :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] @@ -214,7 +215,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -263,7 +264,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -324,7 +325,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -363,7 +364,7 @@ def get_long_running_output(pipeline_response): begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}"} # type: ignore @distributed_trace - def list_by_vm( + def list( self, resource_group_name: str, virtual_machine_name: str, @@ -380,10 +381,10 @@ def list_by_vm( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GuestAgentList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.GuestAgentList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.GuestAgentList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgentList"] error_map = { @@ -393,19 +394,19 @@ def list_by_vm( def prepare_request(next_link=None): if not next_link: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, - template_url=self.list_by_vm.metadata['url'], + template_url=self.list.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, @@ -445,4 +446,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_vm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_hosts_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_hosts_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_hosts_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_hosts_operations.py index 39aa5d47fc0..a2fd8764362 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_hosts_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_hosts_operations.py @@ -32,7 +32,7 @@ class HostsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -122,7 +122,7 @@ async def begin_create( :param host_name: Name of the host. :type host_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.Host + :type body: ~azure_arc_vmware_management_service_api.models.Host :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -132,10 +132,11 @@ async def begin_create( :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Host or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.Host] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.Host] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Host"] @@ -195,7 +196,7 @@ async def get( :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Host, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Host + :rtype: ~azure_arc_vmware_management_service_api.models.Host :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Host"] @@ -204,7 +205,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -256,10 +257,10 @@ async def update( :param host_name: Name of the host. :type host_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Host, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Host + :rtype: ~azure_arc_vmware_management_service_api.models.Host :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Host"] @@ -268,7 +269,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -323,7 +324,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -384,7 +385,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -433,10 +434,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either HostsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.HostsList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.HostsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.HostsList"] error_map = { @@ -510,10 +512,11 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either HostsList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.HostsList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.HostsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.HostsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_hybrid_identity_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_hybrid_identity_metadata_operations.py similarity index 92% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_hybrid_identity_metadata_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_hybrid_identity_metadata_operations.py index 3c9a39d2e18..426dabb79ee 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_hybrid_identity_metadata_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_hybrid_identity_metadata_operations.py @@ -19,7 +19,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._hybrid_identity_metadata_operations import build_create_request, build_delete_request, build_get_request, build_list_by_vm_request +from ...operations._hybrid_identity_metadata_operations import build_create_request, build_delete_request, build_get_request, build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -30,7 +30,7 @@ class HybridIdentityMetadataOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,10 +65,10 @@ async def create( :param metadata_name: Name of the hybridIdentityMetadata. :type metadata_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.HybridIdentityMetadata + :type body: ~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata :keyword callable cls: A custom type or function that will be passed the direct response :return: HybridIdentityMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.HybridIdentityMetadata + :rtype: ~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadata"] @@ -77,7 +77,7 @@ async def create( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -140,7 +140,7 @@ async def get( :type metadata_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: HybridIdentityMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.HybridIdentityMetadata + :rtype: ~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadata"] @@ -149,7 +149,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -214,7 +214,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request( @@ -247,7 +247,7 @@ async def delete( # pylint: disable=inconsistent-return-statements @distributed_trace - def list_by_vm( + def list( self, resource_group_name: str, virtual_machine_name: str, @@ -265,10 +265,10 @@ def list_by_vm( :return: An iterator like instance of either HybridIdentityMetadataList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.HybridIdentityMetadataList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.HybridIdentityMetadataList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadataList"] error_map = { @@ -278,19 +278,19 @@ def list_by_vm( def prepare_request(next_link=None): if not next_link: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, - template_url=self.list_by_vm.metadata['url'], + template_url=self.list.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, @@ -330,4 +330,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_vm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_inventory_items_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_inventory_items_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_inventory_items_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_inventory_items_operations.py index d732b825e53..a2ce595a5b7 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_inventory_items_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_inventory_items_operations.py @@ -30,7 +30,7 @@ class InventoryItemsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,10 +65,10 @@ async def create( :param inventory_item_name: Name of the inventoryItem. :type inventory_item_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.InventoryItem + :type body: ~azure_arc_vmware_management_service_api.models.InventoryItem :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.InventoryItem + :rtype: ~azure_arc_vmware_management_service_api.models.InventoryItem :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItem"] @@ -77,7 +77,7 @@ async def create( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -140,7 +140,7 @@ async def get( :type inventory_item_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.InventoryItem + :rtype: ~azure_arc_vmware_management_service_api.models.InventoryItem :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItem"] @@ -149,7 +149,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -214,7 +214,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request( @@ -264,10 +264,10 @@ def list_by_v_center( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InventoryItemsList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.InventoryItemsList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.InventoryItemsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItemsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_machine_extensions_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_machine_extensions_operations.py similarity index 86% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_machine_extensions_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_machine_extensions_operations.py index 67ab3a96e19..26c218d3d18 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_machine_extensions_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_machine_extensions_operations.py @@ -32,7 +32,7 @@ class MachineExtensionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _create_or_update_initial( self, resource_group_name: str, - name: str, + virtual_machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtension", **kwargs: Any @@ -61,7 +61,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(extension_parameters, 'MachineExtension') @@ -69,7 +69,7 @@ async def _create_or_update_initial( request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, content_type=content_type, @@ -101,14 +101,14 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, - name: str, + virtual_machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtension", **kwargs: Any @@ -117,12 +117,13 @@ async def begin_create_or_update( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine where the extension should be created or updated. - :type name: str + :param virtual_machine_name: The name of the machine where the extension should be created or + updated. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :param extension_parameters: Parameters supplied to the Create Machine Extension operation. - :type extension_parameters: ~azure.mgmt.connectedvmware.models.MachineExtension + :type extension_parameters: ~azure_arc_vmware_management_service_api.models.MachineExtension :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -133,10 +134,11 @@ async def begin_create_or_update( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MachineExtension or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.MachineExtension] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.MachineExtension] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] @@ -148,7 +150,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, extension_parameters=extension_parameters, api_version=api_version, @@ -178,12 +180,12 @@ def get_long_running_output(pipeline_response): ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore async def _update_initial( self, resource_group_name: str, - name: str, + virtual_machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtensionUpdate", **kwargs: Any @@ -194,7 +196,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(extension_parameters, 'MachineExtensionUpdate') @@ -202,7 +204,7 @@ async def _update_initial( request = build_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, content_type=content_type, @@ -234,14 +236,14 @@ async def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace_async async def begin_update( self, resource_group_name: str, - name: str, + virtual_machine_name: str, extension_name: str, extension_parameters: "_models.MachineExtensionUpdate", **kwargs: Any @@ -250,12 +252,14 @@ async def begin_update( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine where the extension should be created or updated. - :type name: str + :param virtual_machine_name: The name of the machine where the extension should be created or + updated. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :param extension_parameters: Parameters supplied to the Create Machine Extension operation. - :type extension_parameters: ~azure.mgmt.connectedvmware.models.MachineExtensionUpdate + :type extension_parameters: + ~azure_arc_vmware_management_service_api.models.MachineExtensionUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -266,10 +270,11 @@ async def begin_update( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MachineExtension or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.MachineExtension] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.MachineExtension] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] @@ -281,7 +286,7 @@ async def begin_update( if cont_token is None: raw_result = await self._update_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, extension_parameters=extension_parameters, api_version=api_version, @@ -311,12 +316,12 @@ def get_long_running_output(pipeline_response): ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, - name: str, + virtual_machine_name: str, extension_name: str, **kwargs: Any ) -> None: @@ -326,13 +331,13 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, template_url=self._delete_initial.metadata['url'], @@ -354,14 +359,14 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace_async async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, - name: str, + virtual_machine_name: str, extension_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: @@ -369,8 +374,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine where the extension should be deleted. - :type name: str + :param virtual_machine_name: The name of the machine where the extension should be deleted. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -385,7 +390,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -396,7 +401,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, cls=lambda x,y,z: x, @@ -421,13 +426,13 @@ def get_long_running_output(pipeline_response): ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace_async async def get( self, resource_group_name: str, - name: str, + virtual_machine_name: str, extension_name: str, **kwargs: Any ) -> "_models.MachineExtension": @@ -435,13 +440,13 @@ async def get( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine containing the extension. - :type name: str + :param virtual_machine_name: The name of the machine containing the extension. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MachineExtension, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.MachineExtension + :rtype: ~azure_arc_vmware_management_service_api.models.MachineExtension :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] @@ -450,13 +455,13 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, template_url=self.get.metadata['url'], @@ -483,14 +488,14 @@ async def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace def list( self, resource_group_name: str, - name: str, + virtual_machine_name: str, expand: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.MachineExtensionsListResult"]: @@ -498,18 +503,18 @@ def list( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine containing the extension. - :type name: str + :param virtual_machine_name: The name of the machine containing the extension. + :type virtual_machine_name: str :param expand: The expand expression to apply on the operation. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MachineExtensionsListResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.MachineExtensionsListResult] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.MachineExtensionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtensionsListResult"] error_map = { @@ -522,7 +527,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, expand=expand, template_url=self.list.metadata['url'], @@ -535,7 +540,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, expand=expand, template_url=next_link, @@ -573,4 +578,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_operations.py index 0a0bd70ec0e..be4219643e2 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_operations.py @@ -29,7 +29,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,10 +54,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationsList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.OperationsList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.OperationsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_resource_pools_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_resource_pools_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_resource_pools_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_resource_pools_operations.py index 2c5e3d9af1e..a706bb209b2 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_resource_pools_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_resource_pools_operations.py @@ -32,7 +32,7 @@ class ResourcePoolsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -122,7 +122,7 @@ async def begin_create( :param resource_pool_name: Name of the resourcePool. :type resource_pool_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePool + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -133,10 +133,11 @@ async def begin_create( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ResourcePool or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.ResourcePool] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.ResourcePool] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePool"] @@ -196,7 +197,7 @@ async def get( :type resource_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourcePool, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.ResourcePool + :rtype: ~azure_arc_vmware_management_service_api.models.ResourcePool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePool"] @@ -205,7 +206,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -257,10 +258,10 @@ async def update( :param resource_pool_name: Name of the resourcePool. :type resource_pool_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourcePool, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.ResourcePool + :rtype: ~azure_arc_vmware_management_service_api.models.ResourcePool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePool"] @@ -269,7 +270,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -324,7 +325,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -385,7 +386,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -435,10 +436,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourcePoolsList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.ResourcePoolsList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.ResourcePoolsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePoolsList"] error_map = { @@ -513,10 +514,10 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourcePoolsList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.ResourcePoolsList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.ResourcePoolsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePoolsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_vcenters_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vcenters_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_vcenters_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vcenters_operations.py index ef2814df551..1dc0d9a1fb2 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_vcenters_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vcenters_operations.py @@ -32,7 +32,7 @@ class VCentersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -122,7 +122,7 @@ async def begin_create( :param vcenter_name: Name of the vCenter. :type vcenter_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VCenter + :type body: ~azure_arc_vmware_management_service_api.models.VCenter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -133,10 +133,11 @@ async def begin_create( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VCenter or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.VCenter] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VCenter] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VCenter"] @@ -196,7 +197,7 @@ async def get( :type vcenter_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VCenter, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VCenter + :rtype: ~azure_arc_vmware_management_service_api.models.VCenter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VCenter"] @@ -205,7 +206,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -257,10 +258,10 @@ async def update( :param vcenter_name: Name of the vCenter. :type vcenter_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: VCenter, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VCenter + :rtype: ~azure_arc_vmware_management_service_api.models.VCenter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VCenter"] @@ -269,7 +270,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -324,7 +325,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -385,7 +386,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -435,10 +436,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VCentersList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VCentersList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VCentersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VCentersList"] error_map = { @@ -513,10 +514,10 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VCentersList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VCentersList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VCentersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VCentersList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machine_instances_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machine_instances_operations.py new file mode 100644 index 00000000000..ea60b5dec22 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machine_instances_operations.py @@ -0,0 +1,839 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar, Union + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._virtual_machine_instances_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_request, build_restart_request_initial, build_start_request_initial, build_stop_request_initial, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualMachineInstancesOperations: + """VirtualMachineInstancesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure_arc_vmware_management_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_uri: str, + body: Optional["_models.VirtualMachineInstance"] = None, + **kwargs: Any + ) -> "_models.VirtualMachineInstance": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'VirtualMachineInstance') + else: + _json = None + + request = build_create_or_update_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_uri: str, + body: Optional["_models.VirtualMachineInstance"] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualMachineInstance"]: + """Implements virtual machine PUT method. + + The operation to create or update a virtual machine instance. Please note some properties can + be set only during virtual machine instance creation. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Request payload. + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstance + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualMachineInstance or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_uri: str, + **kwargs: Any + ) -> "_models.VirtualMachineInstance": + """Gets a virtual machine. + + Retrieves information about a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachineInstance, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_get_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + async def _update_initial( + self, + resource_uri: str, + body: Optional["_models.VirtualMachineInstanceUpdate"] = None, + **kwargs: Any + ) -> Optional["_models.VirtualMachineInstance"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualMachineInstance"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'VirtualMachineInstanceUpdate') + else: + _json = None + + request = build_update_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_uri: str, + body: Optional["_models.VirtualMachineInstanceUpdate"] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualMachineInstance"]: + """Updates a virtual machine. + + The operation to update a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Resource properties to update. + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstanceUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualMachineInstance or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + delete_from_host: Optional[bool] = None, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_delete_request_initial( + resource_uri=resource_uri, + api_version=api_version, + delete_from_host=delete_from_host, + force=force, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + delete_from_host: Optional[bool] = None, + force: Optional[bool] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an virtual machine. + + The operation to delete a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param delete_from_host: Whether to delete the VM from the vCenter. + :type delete_from_host: bool + :param force: Whether force delete was specified. + :type force: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_uri=resource_uri, + delete_from_host=delete_from_host, + force=force, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + @distributed_trace_async + async def list( + self, + resource_uri: str, + **kwargs: Any + ) -> "_models.VirtualMachineInstancesList": + """Implements List virtual machine instances. + + Lists all of the virtual machine instances within the specified parent resource. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachineInstancesList, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstancesList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstancesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachineInstancesList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances"} # type: ignore + + + async def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + body: Optional["_models.StopVirtualMachineOptions"] = None, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'StopVirtualMachineOptions') + else: + _json = None + + request = build_stop_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop"} # type: ignore + + + @distributed_trace_async + async def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + body: Optional["_models.StopVirtualMachineOptions"] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements the operation to stop a virtual machine. + + The operation to power off (stop) a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Virtualmachine stop action payload. + :type body: ~azure_arc_vmware_management_service_api.models.StopVirtualMachineOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop"} # type: ignore + + async def _start_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_start_request_initial( + resource_uri=resource_uri, + api_version=api_version, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start"} # type: ignore + + + @distributed_trace_async + async def begin_start( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements the operation to start a virtual machine. + + The operation to start a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_uri=resource_uri, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start"} # type: ignore + + async def _restart_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_restart_request_initial( + resource_uri=resource_uri, + api_version=api_version, + template_url=self._restart_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restart_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/restart"} # type: ignore + + + @distributed_trace_async + async def begin_restart( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements the operation to restart a virtual machine. + + The operation to restart a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restart_initial( + resource_uri=resource_uri, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_restart.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/restart"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_machine_templates_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machine_templates_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_machine_templates_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machine_templates_operations.py index d315166c741..b1009c6274a 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_machine_templates_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machine_templates_operations.py @@ -32,7 +32,7 @@ class VirtualMachineTemplatesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -122,7 +122,7 @@ async def begin_create( :param virtual_machine_template_name: Name of the virtual machine template resource. :type virtual_machine_template_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VirtualMachineTemplate + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -134,10 +134,10 @@ async def begin_create( :return: An instance of AsyncLROPoller that returns either VirtualMachineTemplate or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.VirtualMachineTemplate] + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] @@ -197,7 +197,7 @@ async def get( :type virtual_machine_template_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineTemplate, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualMachineTemplate + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] @@ -206,7 +206,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -258,10 +258,10 @@ async def update( :param virtual_machine_template_name: Name of the virtual machine template resource. :type virtual_machine_template_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineTemplate, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualMachineTemplate + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] @@ -270,7 +270,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -325,7 +325,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -386,7 +386,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -437,10 +437,10 @@ def list( :return: An iterator like instance of either VirtualMachineTemplatesList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachineTemplatesList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplatesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplatesList"] error_map = { @@ -516,10 +516,10 @@ def list_by_resource_group( :return: An iterator like instance of either VirtualMachineTemplatesList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachineTemplatesList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplatesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplatesList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_machines_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machines_operations.py similarity index 90% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_machines_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machines_operations.py index 7c9694beb7c..1476a8a2d6b 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_machines_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_machines_operations.py @@ -21,7 +21,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._virtual_machines_operations import build_assess_patches_request_initial, build_create_request_initial, build_delete_request_initial, build_get_request, build_install_patches_request_initial, build_list_by_resource_group_request, build_list_request, build_restart_request_initial, build_start_request_initial, build_stop_request_initial, build_update_request_initial +from ...operations._virtual_machines_operations import build_assess_patches_request_initial, build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_install_patches_request_initial, build_list_all_request, build_list_request, build_restart_request_initial, build_start_request_initial, build_stop_request_initial, build_update_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -32,7 +32,7 @@ class VirtualMachinesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _assess_patches_initial( self, resource_group_name: str, - name: str, + virtual_machine_name: str, **kwargs: Any ) -> Optional["_models.VirtualMachineAssessPatchesResult"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualMachineAssessPatchesResult"]] @@ -59,13 +59,13 @@ async def _assess_patches_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_assess_patches_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, template_url=self._assess_patches_initial.metadata['url'], ) @@ -92,22 +92,22 @@ async def _assess_patches_initial( return deserialized - _assess_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/assessPatches"} # type: ignore + _assess_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/assessPatches"} # type: ignore @distributed_trace_async async def begin_assess_patches( self, resource_group_name: str, - name: str, + virtual_machine_name: str, **kwargs: Any ) -> AsyncLROPoller["_models.VirtualMachineAssessPatchesResult"]: """The operation to assess patches on a vSphere VMware machine identity in Azure. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param name: The name of the vSphere VMware machine. - :type name: str + :param virtual_machine_name: The name of the vSphere VMware machine. + :type virtual_machine_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -119,10 +119,10 @@ async def begin_assess_patches( :return: An instance of AsyncLROPoller that returns either VirtualMachineAssessPatchesResult or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.VirtualMachineAssessPatchesResult] + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineAssessPatchesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineAssessPatchesResult"] lro_delay = kwargs.pop( @@ -133,7 +133,7 @@ async def begin_assess_patches( if cont_token is None: raw_result = await self._assess_patches_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, cls=lambda x,y,z: x, **kwargs @@ -160,12 +160,12 @@ def get_long_running_output(pipeline_response): ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_assess_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/assessPatches"} # type: ignore + begin_assess_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/assessPatches"} # type: ignore async def _install_patches_initial( self, resource_group_name: str, - name: str, + virtual_machine_name: str, install_patches_input: "_models.VirtualMachineInstallPatchesParameters", **kwargs: Any ) -> Optional["_models.VirtualMachineInstallPatchesResult"]: @@ -175,7 +175,7 @@ async def _install_patches_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(install_patches_input, 'VirtualMachineInstallPatchesParameters') @@ -183,7 +183,7 @@ async def _install_patches_initial( request = build_install_patches_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, content_type=content_type, json=_json, @@ -212,14 +212,14 @@ async def _install_patches_initial( return deserialized - _install_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/installPatches"} # type: ignore + _install_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/installPatches"} # type: ignore @distributed_trace_async async def begin_install_patches( self, resource_group_name: str, - name: str, + virtual_machine_name: str, install_patches_input: "_models.VirtualMachineInstallPatchesParameters", **kwargs: Any ) -> AsyncLROPoller["_models.VirtualMachineInstallPatchesResult"]: @@ -227,11 +227,11 @@ async def begin_install_patches( :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param name: The name of the vSphere VMware machine. - :type name: str + :param virtual_machine_name: The name of the vSphere VMware machine. + :type virtual_machine_name: str :param install_patches_input: Input for InstallPatches as directly received by the API. :type install_patches_input: - ~azure.mgmt.connectedvmware.models.VirtualMachineInstallPatchesParameters + ~azure_arc_vmware_management_service_api.models.VirtualMachineInstallPatchesParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -243,10 +243,10 @@ async def begin_install_patches( :return: An instance of AsyncLROPoller that returns either VirtualMachineInstallPatchesResult or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.VirtualMachineInstallPatchesResult] + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineInstallPatchesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstallPatchesResult"] @@ -258,7 +258,7 @@ async def begin_install_patches( if cont_token is None: raw_result = await self._install_patches_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, install_patches_input=install_patches_input, api_version=api_version, content_type=content_type, @@ -287,9 +287,9 @@ def get_long_running_output(pipeline_response): ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/installPatches"} # type: ignore + begin_install_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/installPatches"} # type: ignore - async def _create_initial( + async def _create_or_update_initial( self, resource_group_name: str, virtual_machine_name: str, @@ -302,7 +302,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -310,14 +310,14 @@ async def _create_initial( else: _json = None - request = build_create_request_initial( + request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -344,11 +344,11 @@ async def _create_initial( return deserialized - _create_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore @distributed_trace_async - async def begin_create( + async def begin_create_or_update( self, resource_group_name: str, virtual_machine_name: str, @@ -364,7 +364,7 @@ async def begin_create( :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VirtualMachine + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachine :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -375,10 +375,11 @@ async def begin_create( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualMachine or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.VirtualMachine] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachine] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] @@ -388,7 +389,7 @@ async def begin_create( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, body=body, @@ -419,7 +420,7 @@ def get_long_running_output(pipeline_response): ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore @distributed_trace_async async def get( @@ -438,7 +439,7 @@ async def get( :type virtual_machine_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachine, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualMachine + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachine :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] @@ -447,7 +448,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -495,7 +496,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -558,7 +559,7 @@ async def begin_update( :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.VirtualMachineUpdate + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -569,10 +570,11 @@ async def begin_update( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualMachine or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.VirtualMachine] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachine] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] @@ -619,8 +621,8 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, virtual_machine_name: str, + delete_from_host: Optional[bool] = None, force: Optional[bool] = None, - retain: Optional[bool] = None, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -629,7 +631,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -637,8 +639,8 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, + delete_from_host=delete_from_host, force=force, - retain=retain, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) @@ -666,8 +668,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, virtual_machine_name: str, + delete_from_host: Optional[bool] = None, force: Optional[bool] = None, - retain: Optional[bool] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an virtual machine. @@ -678,10 +680,10 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type resource_group_name: str :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str + :param delete_from_host: Whether to delete the VM from the vCenter. + :type delete_from_host: bool :param force: Whether force delete was specified. :type force: bool - :param retain: Whether to just disable the VM from azure and retain the VM in the VMM. - :type retain: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -694,7 +696,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -706,8 +708,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements raw_result = await self._delete_initial( resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, + delete_from_host=delete_from_host, force=force, - retain=retain, api_version=api_version, cls=lambda x,y,z: x, **kwargs @@ -746,7 +748,7 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -800,7 +802,7 @@ async def begin_stop( # pylint: disable=inconsistent-return-statements :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str :param body: Virtualmachine stop action payload. - :type body: ~azure.mgmt.connectedvmware.models.StopVirtualMachineOptions + :type body: ~azure_arc_vmware_management_service_api.models.StopVirtualMachineOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -813,7 +815,7 @@ async def begin_stop( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -839,7 +841,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -865,7 +867,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_start_request_initial( @@ -922,7 +924,7 @@ async def begin_start( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -945,7 +947,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -971,7 +973,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_restart_request_initial( @@ -1028,7 +1030,7 @@ async def begin_restart( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -1051,7 +1053,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1066,7 +1068,7 @@ def get_long_running_output(pipeline_response): begin_restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/restart"} # type: ignore @distributed_trace - def list( + def list_all( self, **kwargs: Any ) -> AsyncIterable["_models.VirtualMachinesList"]: @@ -1077,10 +1079,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachinesList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachinesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] error_map = { @@ -1090,17 +1092,17 @@ def list( def prepare_request(next_link=None): if not next_link: - request = build_list_request( + request = build_list_all_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list_all.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_request( + request = build_list_all_request( subscription_id=self._config.subscription_id, api_version=api_version, template_url=next_link, @@ -1138,10 +1140,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore @distributed_trace - def list_by_resource_group( + def list( self, resource_group_name: str, **kwargs: Any @@ -1155,10 +1157,10 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachinesList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachinesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] error_map = { @@ -1168,18 +1170,18 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, api_version=api_version, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_by_resource_group_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, api_version=api_version, @@ -1218,4 +1220,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_networks_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_networks_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_networks_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_networks_operations.py index 01618a15f4d..f1ffe479237 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/aio/operations/_virtual_networks_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_virtual_networks_operations.py @@ -32,7 +32,7 @@ class VirtualNetworksOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -122,7 +122,7 @@ async def begin_create( :param virtual_network_name: Name of the virtual network resource. :type virtual_network_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VirtualNetwork + :type body: ~azure_arc_vmware_management_service_api.models.VirtualNetwork :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -133,10 +133,11 @@ async def begin_create( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.connectedvmware.models.VirtualNetwork] + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.VirtualNetwork] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -196,7 +197,7 @@ async def get( :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualNetwork + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualNetwork :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -205,7 +206,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -257,10 +258,10 @@ async def update( :param virtual_network_name: Name of the virtual network resource. :type virtual_network_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualNetwork + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualNetwork :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -269,7 +270,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -324,7 +325,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -385,7 +386,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -435,10 +436,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworksList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VirtualNetworksList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VirtualNetworksList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworksList"] error_map = { @@ -513,10 +514,10 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworksList or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.connectedvmware.models.VirtualNetworksList] + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VirtualNetworksList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworksList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_guest_agents_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_guest_agents_operations.py new file mode 100644 index 00000000000..c212d17b401 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_guest_agents_operations.py @@ -0,0 +1,411 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._vm_instance_guest_agents_operations import build_create_request_initial, build_delete_request_initial, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VMInstanceGuestAgentsOperations: + """VMInstanceGuestAgentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure_arc_vmware_management_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_initial( + self, + resource_uri: str, + body: Optional["_models.GuestAgent"] = None, + **kwargs: Any + ) -> "_models.GuestAgent": + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'GuestAgent') + else: + _json = None + + request = build_create_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('GuestAgent', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('GuestAgent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + + @distributed_trace_async + async def begin_create( + self, + resource_uri: str, + body: Optional["_models.GuestAgent"] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.GuestAgent"]: + """Implements GuestAgent PUT method. + + Create Or Update GuestAgent. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Request payload. + :type body: ~azure_arc_vmware_management_service_api.models.GuestAgent + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GuestAgent or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure_arc_vmware_management_service_api.models.GuestAgent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('GuestAgent', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_uri: str, + **kwargs: Any + ) -> "_models.GuestAgent": + """Gets GuestAgent. + + Implements GuestAgent GET method. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GuestAgent, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.GuestAgent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_get_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GuestAgent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_delete_request_initial( + resource_uri=resource_uri, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an GuestAgent. + + Implements GuestAgent DELETE method. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_uri=resource_uri, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + @distributed_trace + def list( + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncIterable["_models.GuestAgentList"]: + """Implements GET GuestAgent in a vm. + + Returns the list of GuestAgent of the given vm. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either GuestAgentList or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.GuestAgentList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgentList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("GuestAgentList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_hybrid_identity_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_hybrid_identity_metadata_operations.py new file mode 100644 index 00000000000..5cda010769a --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/aio/operations/_vm_instance_hybrid_identity_metadata_operations.py @@ -0,0 +1,183 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._vm_instance_hybrid_identity_metadata_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VmInstanceHybridIdentityMetadataOperations: + """VmInstanceHybridIdentityMetadataOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure_arc_vmware_management_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_uri: str, + **kwargs: Any + ) -> "_models.VmInstanceHybridIdentityMetadata": + """Gets HybridIdentityMetadata. + + Implements HybridIdentityMetadata GET method. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VmInstanceHybridIdentityMetadata, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VmInstanceHybridIdentityMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_get_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VmInstanceHybridIdentityMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata/default"} # type: ignore + + + @distributed_trace + def list( + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncIterable["_models.VmInstanceHybridIdentityMetadataList"]: + """Implements GET HybridIdentityMetadata in a vm. + + Returns the list of HybridIdentityMetadata of the given vm. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VmInstanceHybridIdentityMetadataList or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadataList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VmInstanceHybridIdentityMetadataList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VmInstanceHybridIdentityMetadataList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/models/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/__init__.py similarity index 88% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/models/__init__.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/__init__.py index bb4dc2bd87d..75cacfe3656 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/models/__init__.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/__init__.py @@ -15,13 +15,15 @@ from ._models_py3 import Datastore from ._models_py3 import DatastoreInventoryItem from ._models_py3 import DatastoresList - from ._models_py3 import ErrorDefinition + from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse from ._models_py3 import ExtendedLocation + from ._models_py3 import ExtensionTargetProperties from ._models_py3 import GuestAgent from ._models_py3 import GuestAgentList from ._models_py3 import GuestAgentProfile + from ._models_py3 import GuestAgentProfileUpdate from ._models_py3 import GuestCredential from ._models_py3 import HardwareProfile from ._models_py3 import Host @@ -31,6 +33,7 @@ from ._models_py3 import HybridIdentityMetadata from ._models_py3 import HybridIdentityMetadataList from ._models_py3 import Identity + from ._models_py3 import InfrastructureProfile from ._models_py3 import InventoryItem from ._models_py3 import InventoryItemDetails from ._models_py3 import InventoryItemProperties @@ -41,6 +44,7 @@ from ._models_py3 import MachineExtensionInstanceViewStatus from ._models_py3 import MachineExtensionPropertiesInstanceView from ._models_py3 import MachineExtensionUpdate + from ._models_py3 import MachineExtensionUpgrade from ._models_py3 import MachineExtensionsListResult from ._models_py3 import NetworkInterface from ._models_py3 import NetworkInterfaceUpdate @@ -52,6 +56,7 @@ from ._models_py3 import OperationDisplay from ._models_py3 import OperationsList from ._models_py3 import OsProfile + from ._models_py3 import OsProfileForVMInstance from ._models_py3 import OsProfileLinuxConfiguration from ._models_py3 import OsProfileUpdate from ._models_py3 import OsProfileUpdateLinuxConfiguration @@ -80,6 +85,9 @@ from ._models_py3 import VirtualMachineAssessPatchesResult from ._models_py3 import VirtualMachineInstallPatchesParameters from ._models_py3 import VirtualMachineInstallPatchesResult + from ._models_py3 import VirtualMachineInstance + from ._models_py3 import VirtualMachineInstanceUpdate + from ._models_py3 import VirtualMachineInstancesList from ._models_py3 import VirtualMachineInventoryItem from ._models_py3 import VirtualMachineTemplate from ._models_py3 import VirtualMachineTemplateInventoryItem @@ -90,6 +98,8 @@ from ._models_py3 import VirtualNetworkInventoryItem from ._models_py3 import VirtualNetworksList from ._models_py3 import VirtualSCSIController + from ._models_py3 import VmInstanceHybridIdentityMetadata + from ._models_py3 import VmInstanceHybridIdentityMetadataList from ._models_py3 import WindowsParameters except (SyntaxError, ImportError): from ._models import AvailablePatchCountByClassification # type: ignore @@ -100,13 +110,15 @@ from ._models import Datastore # type: ignore from ._models import DatastoreInventoryItem # type: ignore from ._models import DatastoresList # type: ignore - from ._models import ErrorDefinition # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore from ._models import ExtendedLocation # type: ignore + from ._models import ExtensionTargetProperties # type: ignore from ._models import GuestAgent # type: ignore from ._models import GuestAgentList # type: ignore from ._models import GuestAgentProfile # type: ignore + from ._models import GuestAgentProfileUpdate # type: ignore from ._models import GuestCredential # type: ignore from ._models import HardwareProfile # type: ignore from ._models import Host # type: ignore @@ -116,6 +128,7 @@ from ._models import HybridIdentityMetadata # type: ignore from ._models import HybridIdentityMetadataList # type: ignore from ._models import Identity # type: ignore + from ._models import InfrastructureProfile # type: ignore from ._models import InventoryItem # type: ignore from ._models import InventoryItemDetails # type: ignore from ._models import InventoryItemProperties # type: ignore @@ -126,6 +139,7 @@ from ._models import MachineExtensionInstanceViewStatus # type: ignore from ._models import MachineExtensionPropertiesInstanceView # type: ignore from ._models import MachineExtensionUpdate # type: ignore + from ._models import MachineExtensionUpgrade # type: ignore from ._models import MachineExtensionsListResult # type: ignore from ._models import NetworkInterface # type: ignore from ._models import NetworkInterfaceUpdate # type: ignore @@ -137,6 +151,7 @@ from ._models import OperationDisplay # type: ignore from ._models import OperationsList # type: ignore from ._models import OsProfile # type: ignore + from ._models import OsProfileForVMInstance # type: ignore from ._models import OsProfileLinuxConfiguration # type: ignore from ._models import OsProfileUpdate # type: ignore from ._models import OsProfileUpdateLinuxConfiguration # type: ignore @@ -165,6 +180,9 @@ from ._models import VirtualMachineAssessPatchesResult # type: ignore from ._models import VirtualMachineInstallPatchesParameters # type: ignore from ._models import VirtualMachineInstallPatchesResult # type: ignore + from ._models import VirtualMachineInstance # type: ignore + from ._models import VirtualMachineInstanceUpdate # type: ignore + from ._models import VirtualMachineInstancesList # type: ignore from ._models import VirtualMachineInventoryItem # type: ignore from ._models import VirtualMachineTemplate # type: ignore from ._models import VirtualMachineTemplateInventoryItem # type: ignore @@ -175,6 +193,8 @@ from ._models import VirtualNetworkInventoryItem # type: ignore from ._models import VirtualNetworksList # type: ignore from ._models import VirtualSCSIController # type: ignore + from ._models import VmInstanceHybridIdentityMetadata # type: ignore + from ._models import VmInstanceHybridIdentityMetadataList # type: ignore from ._models import WindowsParameters # type: ignore from ._azure_arc_vmware_management_service_api_enums import ( @@ -213,13 +233,15 @@ 'Datastore', 'DatastoreInventoryItem', 'DatastoresList', - 'ErrorDefinition', + 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', 'ExtendedLocation', + 'ExtensionTargetProperties', 'GuestAgent', 'GuestAgentList', 'GuestAgentProfile', + 'GuestAgentProfileUpdate', 'GuestCredential', 'HardwareProfile', 'Host', @@ -229,6 +251,7 @@ 'HybridIdentityMetadata', 'HybridIdentityMetadataList', 'Identity', + 'InfrastructureProfile', 'InventoryItem', 'InventoryItemDetails', 'InventoryItemProperties', @@ -239,6 +262,7 @@ 'MachineExtensionInstanceViewStatus', 'MachineExtensionPropertiesInstanceView', 'MachineExtensionUpdate', + 'MachineExtensionUpgrade', 'MachineExtensionsListResult', 'NetworkInterface', 'NetworkInterfaceUpdate', @@ -250,6 +274,7 @@ 'OperationDisplay', 'OperationsList', 'OsProfile', + 'OsProfileForVMInstance', 'OsProfileLinuxConfiguration', 'OsProfileUpdate', 'OsProfileUpdateLinuxConfiguration', @@ -278,6 +303,9 @@ 'VirtualMachineAssessPatchesResult', 'VirtualMachineInstallPatchesParameters', 'VirtualMachineInstallPatchesResult', + 'VirtualMachineInstance', + 'VirtualMachineInstanceUpdate', + 'VirtualMachineInstancesList', 'VirtualMachineInventoryItem', 'VirtualMachineTemplate', 'VirtualMachineTemplateInventoryItem', @@ -288,6 +316,8 @@ 'VirtualNetworkInventoryItem', 'VirtualNetworksList', 'VirtualSCSIController', + 'VmInstanceHybridIdentityMetadata', + 'VmInstanceHybridIdentityMetadataList', 'WindowsParameters', 'CreatedByType', 'DiskMode', diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_azure_arc_vmware_management_service_api_enums.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_azure_arc_vmware_management_service_api_enums.py similarity index 100% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_azure_arc_vmware_management_service_api_enums.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_azure_arc_vmware_management_service_api_enums.py diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_models.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_models.py similarity index 77% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_models.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_models.py index e7b775cf774..4c5eda47eb5 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_models.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_models.py @@ -87,9 +87,9 @@ class Cluster(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -114,14 +114,22 @@ class Cluster(msrest.serialization.Model): :ivar mo_name: Gets or sets the vCenter Managed Object name for the cluster. :vartype mo_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str - :ivar datastore_ids: Gets or sets the datastore ARM ids. + :ivar used_memory_gb: Gets the used physical memory on the cluster in GB. + :vartype used_memory_gb: str + :ivar total_memory_gb: Gets the total amount of physical memory on the cluster in GB. + :vartype total_memory_gb: str + :ivar used_cpum_hz: Gets the used CPU usage across all cores on the cluster in MHz. + :vartype used_cpum_hz: str + :ivar total_cpum_hz: Gets the max CPU usage across all cores on the cluster in MHz. + :vartype total_cpum_hz: str + :ivar datastore_ids: Gets the datastore ARM ids. :vartype datastore_ids: list[str] - :ivar network_ids: Gets or sets the network ARM ids. + :ivar network_ids: Gets the network ARM ids. :vartype network_ids: list[str] - :ivar provisioning_state: Gets or sets the provisioning state. + :ivar provisioning_state: Gets the provisioning state. :vartype provisioning_state: str """ @@ -135,6 +143,10 @@ class Cluster(msrest.serialization.Model): 'mo_name': {'readonly': True}, 'statuses': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'used_memory_gb': {'readonly': True}, + 'total_memory_gb': {'readonly': True}, + 'used_cpum_hz': {'readonly': True}, + 'total_cpum_hz': {'readonly': True}, 'datastore_ids': {'readonly': True}, 'network_ids': {'readonly': True}, 'provisioning_state': {'readonly': True}, @@ -156,6 +168,10 @@ class Cluster(msrest.serialization.Model): 'mo_name': {'key': 'properties.moName', 'type': 'str'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'used_memory_gb': {'key': 'properties.usedMemoryGB', 'type': 'str'}, + 'total_memory_gb': {'key': 'properties.totalMemoryGB', 'type': 'str'}, + 'used_cpum_hz': {'key': 'properties.usedCPUMHz', 'type': 'str'}, + 'total_cpum_hz': {'key': 'properties.totalCPUMHz', 'type': 'str'}, 'datastore_ids': {'key': 'properties.datastoreIds', 'type': '[str]'}, 'network_ids': {'key': 'properties.networkIds', 'type': '[str]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -169,7 +185,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -201,13 +217,17 @@ def __init__( self.mo_name = None self.statuses = None self.custom_resource_name = None + self.used_memory_gb = None + self.total_memory_gb = None + self.used_cpum_hz = None + self.total_cpum_hz = None self.datastore_ids = None self.network_ids = None self.provisioning_state = None class InventoryItemProperties(msrest.serialization.Model): - """Defines the resource properties. + """Describes the properties of an Inventory Item. You probably want to use the sub-classes and not this class directly. Known sub-classes are: ClusterInventoryItem, DatastoreInventoryItem, HostInventoryItem, ResourcePoolInventoryItem, VirtualMachineInventoryItem, VirtualMachineTemplateInventoryItem, VirtualNetworkInventoryItem. @@ -219,7 +239,7 @@ class InventoryItemProperties(msrest.serialization.Model): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -280,7 +300,7 @@ class ClusterInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -331,7 +351,7 @@ class ClustersList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of Clusters. :vartype next_link: str :ivar value: Required. Array of Clusters. - :vartype value: list[~azure.mgmt.connectedvmware.models.Cluster] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Cluster] """ _validation = { @@ -351,7 +371,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of Clusters. :paramtype next_link: str :keyword value: Required. Array of Clusters. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Cluster] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Cluster] """ super(ClustersList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -410,9 +430,9 @@ class Datastore(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -438,13 +458,18 @@ class Datastore(msrest.serialization.Model): :ivar mo_name: Gets or sets the vCenter Managed Object name for the datastore. :vartype mo_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str + :ivar capacity_gb: Gets or sets Maximum capacity of this datastore in GBs. + :vartype capacity_gb: long + :ivar free_space_gb: Gets or sets Available space of this datastore in GBs. + :vartype free_space_gb: long :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.connectedvmware.models.ProvisioningState + :vartype provisioning_state: str or + ~azure_arc_vmware_management_service_api.models.ProvisioningState """ _validation = { @@ -457,6 +482,8 @@ class Datastore(msrest.serialization.Model): 'mo_name': {'readonly': True}, 'statuses': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'capacity_gb': {'readonly': True}, + 'free_space_gb': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -476,6 +503,8 @@ class Datastore(msrest.serialization.Model): 'mo_name': {'key': 'properties.moName', 'type': 'str'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'capacity_gb': {'key': 'properties.capacityGB', 'type': 'long'}, + 'free_space_gb': {'key': 'properties.freeSpaceGB', 'type': 'long'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -487,7 +516,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -519,6 +548,8 @@ def __init__( self.mo_name = None self.statuses = None self.custom_resource_name = None + self.capacity_gb = None + self.free_space_gb = None self.provisioning_state = None @@ -532,7 +563,7 @@ class DatastoreInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -595,7 +626,7 @@ class DatastoresList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of Datastores. :vartype next_link: str :ivar value: Required. Array of Datastores. - :vartype value: list[~azure.mgmt.connectedvmware.models.Datastore] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Datastore] """ _validation = { @@ -615,36 +646,32 @@ def __init__( :keyword next_link: Url to follow for getting next page of Datastores. :paramtype next_link: str :keyword value: Required. Array of Datastores. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Datastore] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Datastore] """ super(DatastoresList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) self.value = kwargs['value'] -class ErrorDefinition(msrest.serialization.Model): - """Error definition. +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Service specific error code which serves as the substatus for the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.connectedvmware.models.ErrorDefinition] + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -653,30 +680,35 @@ def __init__( ): """ """ - super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None class ErrorDetail(msrest.serialization.Model): - """Error details. + """The error detail. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Required. The error's code. + :ivar code: The error code. :vartype code: str - :ivar message: Required. A human readable error message. + :ivar message: The error message. :vartype message: str - :ivar target: Indicates which property in the request is responsible for the error. + :ivar target: The error target. :vartype target: str - :ivar details: Additional error details. - :vartype details: list[~azure.mgmt.connectedvmware.models.ErrorDetail] + :ivar details: The error details. + :vartype details: list[~azure_arc_vmware_management_service_api.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure_arc_vmware_management_service_api.models.ErrorAdditionalInfo] """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, } _attribute_map = { @@ -684,6 +716,7 @@ class ErrorDetail(msrest.serialization.Model): 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__( @@ -691,31 +724,24 @@ def __init__( **kwargs ): """ - :keyword code: Required. The error's code. - :paramtype code: str - :keyword message: Required. A human readable error message. - :paramtype message: str - :keyword target: Indicates which property in the request is responsible for the error. - :paramtype target: str - :keyword details: Additional error details. - :paramtype details: list[~azure.mgmt.connectedvmware.models.ErrorDetail] """ super(ErrorDetail, self).__init__(**kwargs) - self.code = kwargs['code'] - self.message = kwargs['message'] - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None class ErrorResponse(msrest.serialization.Model): - """Error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - :ivar error: The error details. - :vartype error: ~azure.mgmt.connectedvmware.models.ErrorDefinition + :ivar error: The error object. + :vartype error: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( @@ -723,8 +749,8 @@ def __init__( **kwargs ): """ - :keyword error: The error details. - :paramtype error: ~azure.mgmt.connectedvmware.models.ErrorDefinition + :keyword error: The error object. + :paramtype error: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ super(ErrorResponse, self).__init__(**kwargs) self.error = kwargs.get('error', None) @@ -759,31 +785,59 @@ def __init__( self.name = kwargs.get('name', None) +class ExtensionTargetProperties(msrest.serialization.Model): + """Describes the Machine Extension Target Version Properties. + + :ivar target_version: Properties for the specified Extension to Upgrade. + :vartype target_version: str + """ + + _attribute_map = { + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword target_version: Properties for the specified Extension to Upgrade. + :paramtype target_version: str + """ + super(ExtensionTargetProperties, self).__init__(**kwargs) + self.target_version = kwargs.get('target_version', None) + + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -796,6 +850,7 @@ def __init__( self.id = None self.name = None self.type = None + self.system_data = None class ProxyResource(Resource): @@ -803,26 +858,31 @@ class ProxyResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -839,31 +899,37 @@ class GuestAgent(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar uuid: Gets or sets a unique identifier for this resource. :vartype uuid: str :ivar credentials: Username / Password Credentials to provision guest agent. - :vartype credentials: ~azure.mgmt.connectedvmware.models.GuestCredential + :vartype credentials: ~azure_arc_vmware_management_service_api.models.GuestCredential + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str :ivar http_proxy_config: HTTP Proxy configuration for the VM. - :vartype http_proxy_config: ~azure.mgmt.connectedvmware.models.HttpProxyConfiguration + :vartype http_proxy_config: + ~azure_arc_vmware_management_service_api.models.HttpProxyConfiguration :ivar provisioning_action: Gets or sets the guest agent provisioning action. Possible values include: "install", "uninstall", "repair". - :vartype provisioning_action: str or ~azure.mgmt.connectedvmware.models.ProvisioningAction + :vartype provisioning_action: str or + ~azure_arc_vmware_management_service_api.models.ProvisioningAction :ivar status: Gets or sets the guest agent status. :vartype status: str :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -887,6 +953,7 @@ class GuestAgent(ProxyResource): 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'uuid': {'key': 'properties.uuid', 'type': 'str'}, 'credentials': {'key': 'properties.credentials', 'type': 'GuestCredential'}, + 'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'}, 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'HttpProxyConfiguration'}, 'provisioning_action': {'key': 'properties.provisioningAction', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, @@ -901,17 +968,22 @@ def __init__( ): """ :keyword credentials: Username / Password Credentials to provision guest agent. - :paramtype credentials: ~azure.mgmt.connectedvmware.models.GuestCredential + :paramtype credentials: ~azure_arc_vmware_management_service_api.models.GuestCredential + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str :keyword http_proxy_config: HTTP Proxy configuration for the VM. - :paramtype http_proxy_config: ~azure.mgmt.connectedvmware.models.HttpProxyConfiguration + :paramtype http_proxy_config: + ~azure_arc_vmware_management_service_api.models.HttpProxyConfiguration :keyword provisioning_action: Gets or sets the guest agent provisioning action. Possible values include: "install", "uninstall", "repair". - :paramtype provisioning_action: str or ~azure.mgmt.connectedvmware.models.ProvisioningAction + :paramtype provisioning_action: str or + ~azure_arc_vmware_management_service_api.models.ProvisioningAction """ super(GuestAgent, self).__init__(**kwargs) - self.system_data = None self.uuid = None self.credentials = kwargs.get('credentials', None) + self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None) self.http_proxy_config = kwargs.get('http_proxy_config', None) self.provisioning_action = kwargs.get('provisioning_action', None) self.status = None @@ -928,7 +1000,7 @@ class GuestAgentList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of GuestAgent. :vartype next_link: str :ivar value: Required. Array of GuestAgent. - :vartype value: list[~azure.mgmt.connectedvmware.models.GuestAgent] + :vartype value: list[~azure_arc_vmware_management_service_api.models.GuestAgent] """ _validation = { @@ -948,7 +1020,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of GuestAgent. :paramtype next_link: str :keyword value: Required. Array of GuestAgent. - :paramtype value: list[~azure.mgmt.connectedvmware.models.GuestAgent] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.GuestAgent] """ super(GuestAgentList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -956,7 +1028,7 @@ def __init__( class GuestAgentProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the guest agent settings for the virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -964,19 +1036,25 @@ class GuestAgentProfile(msrest.serialization.Model): :vartype vm_uuid: str :ivar status: The status of the hybrid machine agent. Possible values include: "Connected", "Disconnected", "Error". - :vartype status: str or ~azure.mgmt.connectedvmware.models.StatusTypes + :vartype status: str or ~azure_arc_vmware_management_service_api.models.StatusTypes :ivar last_status_change: The time of the last status change. :vartype last_status_change: ~datetime.datetime + :ivar client_public_key: Gets or sets the Public Key provided by the client for enabling guest + management. + :vartype client_public_key: str + :ivar mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :vartype mssql_discovered: str :ivar agent_version: The hybrid machine agent full version. :vartype agent_version: str :ivar error_details: Details about the error state. - :vartype error_details: list[~azure.mgmt.connectedvmware.models.ErrorDetail] + :vartype error_details: list[~azure_arc_vmware_management_service_api.models.ErrorDetail] """ _validation = { 'vm_uuid': {'readonly': True}, 'status': {'readonly': True}, 'last_status_change': {'readonly': True}, + 'mssql_discovered': {'readonly': True}, 'agent_version': {'readonly': True}, 'error_details': {'readonly': True}, } @@ -985,6 +1063,8 @@ class GuestAgentProfile(msrest.serialization.Model): 'vm_uuid': {'key': 'vmUuid', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, + 'client_public_key': {'key': 'clientPublicKey', 'type': 'str'}, + 'mssql_discovered': {'key': 'mssqlDiscovered', 'type': 'str'}, 'agent_version': {'key': 'agentVersion', 'type': 'str'}, 'error_details': {'key': 'errorDetails', 'type': '[ErrorDetail]'}, } @@ -994,15 +1074,45 @@ def __init__( **kwargs ): """ + :keyword client_public_key: Gets or sets the Public Key provided by the client for enabling + guest management. + :paramtype client_public_key: str """ super(GuestAgentProfile, self).__init__(**kwargs) self.vm_uuid = None self.status = None self.last_status_change = None + self.client_public_key = kwargs.get('client_public_key', None) + self.mssql_discovered = None self.agent_version = None self.error_details = None +class GuestAgentProfileUpdate(msrest.serialization.Model): + """Specifies the guest agent settings for the virtual machine. + + :ivar client_public_key: Gets or sets the Public Key provided by the client for enabling guest + management. + :vartype client_public_key: str + """ + + _attribute_map = { + 'client_public_key': {'key': 'clientPublicKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword client_public_key: Gets or sets the Public Key provided by the client for enabling + guest management. + :paramtype client_public_key: str + """ + super(GuestAgentProfileUpdate, self).__init__(**kwargs) + self.client_public_key = kwargs.get('client_public_key', None) + + class GuestCredential(msrest.serialization.Model): """Username / Password Credentials to connect to guest. @@ -1033,7 +1143,7 @@ def __init__( class HardwareProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the hardware settings for the virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -1102,9 +1212,9 @@ class Host(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -1128,10 +1238,22 @@ class Host(msrest.serialization.Model): :ivar mo_name: Gets or sets the vCenter Managed Object name for the host. :vartype mo_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str - :ivar provisioning_state: Gets or sets the provisioning state. + :ivar overall_memory_usage_gb: Gets the used physical memory on the host in GB. + :vartype overall_memory_usage_gb: str + :ivar memory_size_gb: Gets the total amount of physical memory on the host in GB. + :vartype memory_size_gb: str + :ivar overall_cpu_usage_m_hz: Gets the used CPU usage across all cores in MHz. + :vartype overall_cpu_usage_m_hz: str + :ivar cpu_mhz: Gets the max CPU usage across all cores in MHz. + :vartype cpu_mhz: str + :ivar datastore_ids: Gets the datastore ARM ids. + :vartype datastore_ids: list[str] + :ivar network_ids: Gets the network ARM ids. + :vartype network_ids: list[str] + :ivar provisioning_state: Gets the provisioning state. :vartype provisioning_state: str """ @@ -1145,6 +1267,12 @@ class Host(msrest.serialization.Model): 'mo_name': {'readonly': True}, 'statuses': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'overall_memory_usage_gb': {'readonly': True}, + 'memory_size_gb': {'readonly': True}, + 'overall_cpu_usage_m_hz': {'readonly': True}, + 'cpu_mhz': {'readonly': True}, + 'datastore_ids': {'readonly': True}, + 'network_ids': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1164,6 +1292,12 @@ class Host(msrest.serialization.Model): 'mo_name': {'key': 'properties.moName', 'type': 'str'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'overall_memory_usage_gb': {'key': 'properties.overallMemoryUsageGB', 'type': 'str'}, + 'memory_size_gb': {'key': 'properties.memorySizeGB', 'type': 'str'}, + 'overall_cpu_usage_m_hz': {'key': 'properties.overallCPUUsageMHz', 'type': 'str'}, + 'cpu_mhz': {'key': 'properties.CPUMhz', 'type': 'str'}, + 'datastore_ids': {'key': 'properties.datastoreIds', 'type': '[str]'}, + 'network_ids': {'key': 'properties.networkIds', 'type': '[str]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -1175,7 +1309,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -1206,6 +1340,12 @@ def __init__( self.mo_name = None self.statuses = None self.custom_resource_name = None + self.overall_memory_usage_gb = None + self.memory_size_gb = None + self.overall_cpu_usage_m_hz = None + self.cpu_mhz = None + self.datastore_ids = None + self.network_ids = None self.provisioning_state = None @@ -1219,7 +1359,7 @@ class HostInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -1230,7 +1370,7 @@ class HostInventoryItem(InventoryItemProperties): :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str :ivar parent: Parent host inventory resource details. - :vartype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ _validation = { @@ -1261,7 +1401,7 @@ def __init__( :keyword mo_name: Gets or sets the vCenter Managed Object name for the inventory item. :paramtype mo_name: str :keyword parent: Parent host inventory resource details. - :paramtype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ super(HostInventoryItem, self).__init__(**kwargs) self.inventory_type = 'Host' # type: str @@ -1276,7 +1416,7 @@ class HostsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of Hosts. :vartype next_link: str :ivar value: Required. Array of Hosts. - :vartype value: list[~azure.mgmt.connectedvmware.models.Host] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Host] """ _validation = { @@ -1296,7 +1436,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of Hosts. :paramtype next_link: str :keyword value: Required. Array of Hosts. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Host] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Host] """ super(HostsList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -1331,22 +1471,23 @@ class HybridIdentityMetadata(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar vm_id: Gets or sets the Vm Id. :vartype vm_id: str :ivar public_key: Gets or sets the Public Key. :vartype public_key: str :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.connectedvmware.models.Identity + :vartype identity: ~azure_arc_vmware_management_service_api.models.Identity :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -1382,7 +1523,6 @@ def __init__( :paramtype public_key: str """ super(HybridIdentityMetadata, self).__init__(**kwargs) - self.system_data = None self.vm_id = kwargs.get('vm_id', None) self.public_key = kwargs.get('public_key', None) self.identity = None @@ -1397,7 +1537,7 @@ class HybridIdentityMetadataList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of HybridIdentityMetadata. :vartype next_link: str :ivar value: Required. Array of HybridIdentityMetadata. - :vartype value: list[~azure.mgmt.connectedvmware.models.HybridIdentityMetadata] + :vartype value: list[~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata] """ _validation = { @@ -1417,7 +1557,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of HybridIdentityMetadata. :paramtype next_link: str :keyword value: Required. Array of HybridIdentityMetadata. - :paramtype value: list[~azure.mgmt.connectedvmware.models.HybridIdentityMetadata] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata] """ super(HybridIdentityMetadataList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -1437,7 +1577,7 @@ class Identity(msrest.serialization.Model): :vartype tenant_id: str :ivar type: Required. The type of managed service identity. Possible values include: "None", "SystemAssigned". - :vartype type: str or ~azure.mgmt.connectedvmware.models.IdentityType + :vartype type: str or ~azure_arc_vmware_management_service_api.models.IdentityType """ _validation = { @@ -1459,7 +1599,7 @@ def __init__( """ :keyword type: Required. The type of managed service identity. Possible values include: "None", "SystemAssigned". - :paramtype type: str or ~azure.mgmt.connectedvmware.models.IdentityType + :paramtype type: str or ~azure_arc_vmware_management_service_api.models.IdentityType """ super(Identity, self).__init__(**kwargs) self.principal_id = None @@ -1467,6 +1607,88 @@ def __init__( self.type = kwargs['type'] +class InfrastructureProfile(msrest.serialization.Model): + """Specifies the vCenter infrastructure specific settings for the virtual machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar template_id: Gets or sets the ARM Id of the template resource to deploy the virtual + machine. + :vartype template_id: str + :ivar v_center_id: Gets or sets the ARM Id of the vCenter resource in which this resource pool + resides. + :vartype v_center_id: str + :ivar mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual + machine. + :vartype mo_ref_id: str + :ivar inventory_item_id: Gets or sets the inventory Item ID for the virtual machine. + :vartype inventory_item_id: str + :ivar mo_name: Gets or sets the vCenter Managed Object name for the virtual machine. + :vartype mo_name: str + :ivar folder_path: Gets or sets the folder path of the vm. + :vartype folder_path: str + :ivar instance_uuid: Gets or sets the instance uuid of the vm. + :vartype instance_uuid: str + :ivar smbios_uuid: Gets or sets the SMBIOS UUID of the vm. + :vartype smbios_uuid: str + :ivar firmware_type: Firmware type. Possible values include: "bios", "efi". + :vartype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType + :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. + :vartype custom_resource_name: str + """ + + _validation = { + 'mo_ref_id': {'readonly': True}, + 'mo_name': {'readonly': True}, + 'folder_path': {'readonly': True}, + 'instance_uuid': {'readonly': True}, + 'custom_resource_name': {'readonly': True}, + } + + _attribute_map = { + 'template_id': {'key': 'templateId', 'type': 'str'}, + 'v_center_id': {'key': 'vCenterId', 'type': 'str'}, + 'mo_ref_id': {'key': 'moRefId', 'type': 'str'}, + 'inventory_item_id': {'key': 'inventoryItemId', 'type': 'str'}, + 'mo_name': {'key': 'moName', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'str'}, + 'instance_uuid': {'key': 'instanceUuid', 'type': 'str'}, + 'smbios_uuid': {'key': 'smbiosUuid', 'type': 'str'}, + 'firmware_type': {'key': 'firmwareType', 'type': 'str'}, + 'custom_resource_name': {'key': 'customResourceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword template_id: Gets or sets the ARM Id of the template resource to deploy the virtual + machine. + :paramtype template_id: str + :keyword v_center_id: Gets or sets the ARM Id of the vCenter resource in which this resource + pool resides. + :paramtype v_center_id: str + :keyword inventory_item_id: Gets or sets the inventory Item ID for the virtual machine. + :paramtype inventory_item_id: str + :keyword smbios_uuid: Gets or sets the SMBIOS UUID of the vm. + :paramtype smbios_uuid: str + :keyword firmware_type: Firmware type. Possible values include: "bios", "efi". + :paramtype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType + """ + super(InfrastructureProfile, self).__init__(**kwargs) + self.template_id = kwargs.get('template_id', None) + self.v_center_id = kwargs.get('v_center_id', None) + self.mo_ref_id = None + self.inventory_item_id = kwargs.get('inventory_item_id', None) + self.mo_name = None + self.folder_path = None + self.instance_uuid = None + self.smbios_uuid = kwargs.get('smbios_uuid', None) + self.firmware_type = kwargs.get('firmware_type', None) + self.custom_resource_name = None + + class InventoryItem(ProxyResource): """Defines the inventory item. @@ -1474,16 +1696,17 @@ class InventoryItem(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. @@ -1491,7 +1714,7 @@ class InventoryItem(ProxyResource): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -1544,7 +1767,6 @@ def __init__( :paramtype mo_name: str """ super(InventoryItem, self).__init__(**kwargs) - self.system_data = None self.kind = kwargs.get('kind', None) self.inventory_type = None # type: Optional[str] self.managed_resource_id = kwargs.get('managed_resource_id', None) @@ -1554,17 +1776,21 @@ def __init__( class InventoryItemDetails(msrest.serialization.Model): - """Defines the resource properties. + """Describes the properties of an Inventory Item reference. :ivar inventory_item_id: Gets or sets the inventory Item ID for the resource. :vartype inventory_item_id: str :ivar mo_name: Gets or sets the vCenter Managed Object name for the resource. :vartype mo_name: str + :ivar inventory_type: The inventory type. Possible values include: "ResourcePool", + "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType """ _attribute_map = { 'inventory_item_id': {'key': 'inventoryItemId', 'type': 'str'}, 'mo_name': {'key': 'moName', 'type': 'str'}, + 'inventory_type': {'key': 'inventoryType', 'type': 'str'}, } def __init__( @@ -1576,10 +1802,14 @@ def __init__( :paramtype inventory_item_id: str :keyword mo_name: Gets or sets the vCenter Managed Object name for the resource. :paramtype mo_name: str + :keyword inventory_type: The inventory type. Possible values include: "ResourcePool", + "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". + :paramtype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType """ super(InventoryItemDetails, self).__init__(**kwargs) self.inventory_item_id = kwargs.get('inventory_item_id', None) self.mo_name = kwargs.get('mo_name', None) + self.inventory_type = kwargs.get('inventory_type', None) class InventoryItemsList(msrest.serialization.Model): @@ -1590,7 +1820,7 @@ class InventoryItemsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of InventoryItems. :vartype next_link: str :ivar value: Required. Array of InventoryItems. - :vartype value: list[~azure.mgmt.connectedvmware.models.InventoryItem] + :vartype value: list[~azure_arc_vmware_management_service_api.models.InventoryItem] """ _validation = { @@ -1610,7 +1840,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of InventoryItems. :paramtype next_link: str :keyword value: Required. Array of InventoryItems. - :paramtype value: list[~azure.mgmt.connectedvmware.models.InventoryItem] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.InventoryItem] """ super(InventoryItemsList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -1623,7 +1853,7 @@ class LinuxParameters(msrest.serialization.Model): :ivar classifications_to_include: The update classifications to select when installing patches for Linux. :vartype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationLinux] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationLinux] :ivar package_name_masks_to_include: packages to include in the patch operation. Format: packageName_packageVersion. :vartype package_name_masks_to_include: list[str] @@ -1646,7 +1876,7 @@ def __init__( :keyword classifications_to_include: The update classifications to select when installing patches for Linux. :paramtype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationLinux] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationLinux] :keyword package_name_masks_to_include: packages to include in the patch operation. Format: packageName_packageVersion. :paramtype package_name_masks_to_include: list[str] @@ -1668,7 +1898,7 @@ class MachineExtension(msrest.serialization.Model): :ivar location: Gets or sets the location. :vartype location: str :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -1703,7 +1933,7 @@ class MachineExtension(msrest.serialization.Model): :vartype provisioning_state: str :ivar instance_view: The machine extension instance view. :vartype instance_view: - ~azure.mgmt.connectedvmware.models.MachineExtensionPropertiesInstanceView + ~azure_arc_vmware_management_service_api.models.MachineExtensionPropertiesInstanceView """ _validation = { @@ -1766,7 +1996,7 @@ def __init__( :paramtype protected_settings: any :keyword instance_view: The machine extension instance view. :paramtype instance_view: - ~azure.mgmt.connectedvmware.models.MachineExtensionPropertiesInstanceView + ~azure_arc_vmware_management_service_api.models.MachineExtensionPropertiesInstanceView """ super(MachineExtension, self).__init__(**kwargs) self.location = kwargs.get('location', None) @@ -1799,7 +2029,8 @@ class MachineExtensionInstanceView(msrest.serialization.Model): :ivar type_handler_version: Specifies the version of the script handler. :vartype type_handler_version: str :ivar status: Instance view status. - :vartype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :vartype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ _validation = { @@ -1821,7 +2052,8 @@ def __init__( ): """ :keyword status: Instance view status. - :paramtype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :paramtype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ super(MachineExtensionInstanceView, self).__init__(**kwargs) self.name = None @@ -1838,7 +2070,7 @@ class MachineExtensionInstanceViewStatus(msrest.serialization.Model): :ivar code: The status code. :vartype code: str :ivar level: The level code. Possible values include: "Info", "Warning", "Error". - :vartype level: str or ~azure.mgmt.connectedvmware.models.StatusLevelTypes + :vartype level: str or ~azure_arc_vmware_management_service_api.models.StatusLevelTypes :ivar display_status: The short localizable label for the status. :vartype display_status: str :ivar message: The detailed status message, including for alerts and error messages. @@ -1889,7 +2121,8 @@ class MachineExtensionPropertiesInstanceView(MachineExtensionInstanceView): :ivar type_handler_version: Specifies the version of the script handler. :vartype type_handler_version: str :ivar status: Instance view status. - :vartype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :vartype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ _validation = { @@ -1911,7 +2144,8 @@ def __init__( ): """ :keyword status: Instance view status. - :paramtype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :paramtype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ super(MachineExtensionPropertiesInstanceView, self).__init__(**kwargs) @@ -1920,7 +2154,7 @@ class MachineExtensionsListResult(msrest.serialization.Model): """Describes the Machine Extensions List Result. :ivar value: The list of extensions. - :vartype value: list[~azure.mgmt.connectedvmware.models.MachineExtension] + :vartype value: list[~azure_arc_vmware_management_service_api.models.MachineExtension] :ivar next_link: The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. :vartype next_link: str @@ -1937,7 +2171,7 @@ def __init__( ): """ :keyword value: The list of extensions. - :paramtype value: list[~azure.mgmt.connectedvmware.models.MachineExtension] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.MachineExtension] :keyword next_link: The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. :paramtype next_link: str @@ -2050,6 +2284,31 @@ def __init__( self.protected_settings = kwargs.get('protected_settings', None) +class MachineExtensionUpgrade(msrest.serialization.Model): + """Describes the Machine Extension Upgrade Properties. + + :ivar extension_targets: Describes the Extension Target Properties. + :vartype extension_targets: dict[str, + ~azure_arc_vmware_management_service_api.models.ExtensionTargetProperties] + """ + + _attribute_map = { + 'extension_targets': {'key': 'extensionTargets', 'type': '{ExtensionTargetProperties}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword extension_targets: Describes the Extension Target Properties. + :paramtype extension_targets: dict[str, + ~azure_arc_vmware_management_service_api.models.ExtensionTargetProperties] + """ + super(MachineExtensionUpgrade, self).__init__(**kwargs) + self.extension_targets = kwargs.get('extension_targets', None) + + class NetworkInterface(msrest.serialization.Model): """Network Interface model. @@ -2069,10 +2328,11 @@ class NetworkInterface(msrest.serialization.Model): :vartype network_id: str :ivar nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :vartype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :vartype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :ivar power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :vartype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :vartype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :ivar network_mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual network that the nic is connected to. @@ -2083,7 +2343,7 @@ class NetworkInterface(msrest.serialization.Model): :ivar device_key: Gets or sets the device key value. :vartype device_key: int :ivar ip_settings: Gets or sets the ipsettings. - :vartype ip_settings: ~azure.mgmt.connectedvmware.models.NicIPSettings + :vartype ip_settings: ~azure_arc_vmware_management_service_api.models.NicIPSettings """ _validation = { @@ -2120,14 +2380,15 @@ def __init__( :paramtype network_id: str :keyword nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :paramtype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :paramtype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :keyword power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :paramtype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :paramtype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :keyword device_key: Gets or sets the device key value. :paramtype device_key: int :keyword ip_settings: Gets or sets the ipsettings. - :paramtype ip_settings: ~azure.mgmt.connectedvmware.models.NicIPSettings + :paramtype ip_settings: ~azure_arc_vmware_management_service_api.models.NicIPSettings """ super(NetworkInterface, self).__init__(**kwargs) self.name = kwargs.get('name', None) @@ -2153,10 +2414,11 @@ class NetworkInterfaceUpdate(msrest.serialization.Model): :vartype network_id: str :ivar nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :vartype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :vartype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :ivar power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :vartype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :vartype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :ivar device_key: Gets or sets the device key value. :vartype device_key: int """ @@ -2181,10 +2443,11 @@ def __init__( :paramtype network_id: str :keyword nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :paramtype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :paramtype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :keyword power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :paramtype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :paramtype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :keyword device_key: Gets or sets the device key value. :paramtype device_key: int """ @@ -2197,11 +2460,12 @@ def __init__( class NetworkProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the network interfaces of the virtual machine. :ivar network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :vartype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterface] + :vartype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterface] """ _attribute_map = { @@ -2215,18 +2479,20 @@ def __init__( """ :keyword network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :paramtype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterface] + :paramtype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterface] """ super(NetworkProfile, self).__init__(**kwargs) self.network_interfaces = kwargs.get('network_interfaces', None) class NetworkProfileUpdate(msrest.serialization.Model): - """Defines the update resource properties. + """Specifies the network interfaces of the virtual machine. :ivar network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :vartype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterfaceUpdate] + :vartype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterfaceUpdate] """ _attribute_map = { @@ -2240,7 +2506,8 @@ def __init__( """ :keyword network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :paramtype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterfaceUpdate] + :paramtype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterfaceUpdate] """ super(NetworkProfileUpdate, self).__init__(**kwargs) self.network_interfaces = kwargs.get('network_interfaces', None) @@ -2290,7 +2557,8 @@ class NicIPSettings(msrest.serialization.Model): :ivar allocation_method: Gets or sets the nic allocation method. Possible values include: "unset", "dynamic", "static", "linklayer", "random", "other". - :vartype allocation_method: str or ~azure.mgmt.connectedvmware.models.IPAddressAllocationMethod + :vartype allocation_method: str or + ~azure_arc_vmware_management_service_api.models.IPAddressAllocationMethod :ivar dns_servers: Gets or sets the dns servers. :vartype dns_servers: list[str] :ivar gateway: Gets or sets the gateway. @@ -2305,7 +2573,8 @@ class NicIPSettings(msrest.serialization.Model): :vartype secondary_wins_server: str :ivar ip_address_info: Gets or sets the IP address information being reported for this NIC. This contains the same IPv4 information above plus IPV6 information. - :vartype ip_address_info: list[~azure.mgmt.connectedvmware.models.NicIPAddressSettings] + :vartype ip_address_info: + list[~azure_arc_vmware_management_service_api.models.NicIPAddressSettings] """ _validation = { @@ -2333,7 +2602,7 @@ def __init__( :keyword allocation_method: Gets or sets the nic allocation method. Possible values include: "unset", "dynamic", "static", "linklayer", "random", "other". :paramtype allocation_method: str or - ~azure.mgmt.connectedvmware.models.IPAddressAllocationMethod + ~azure_arc_vmware_management_service_api.models.IPAddressAllocationMethod :keyword dns_servers: Gets or sets the dns servers. :paramtype dns_servers: list[str] :keyword gateway: Gets or sets the gateway. @@ -2362,7 +2631,7 @@ class Operation(msrest.serialization.Model): :ivar is_data_action: Indicates whether the operation is data action or not. :vartype is_data_action: bool :ivar display: Properties of the operation. - :vartype display: ~azure.mgmt.connectedvmware.models.OperationDisplay + :vartype display: ~azure_arc_vmware_management_service_api.models.OperationDisplay """ _attribute_map = { @@ -2381,7 +2650,7 @@ def __init__( :keyword is_data_action: Indicates whether the operation is data action or not. :paramtype is_data_action: bool :keyword display: Properties of the operation. - :paramtype display: ~azure.mgmt.connectedvmware.models.OperationDisplay + :paramtype display: ~azure_arc_vmware_management_service_api.models.OperationDisplay """ super(Operation, self).__init__(**kwargs) self.name = kwargs.get('name', None) @@ -2438,7 +2707,7 @@ class OperationsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of operations. :vartype next_link: str :ivar value: Required. Array of operations. - :vartype value: list[~azure.mgmt.connectedvmware.models.Operation] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Operation] """ _validation = { @@ -2458,7 +2727,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of operations. :paramtype next_link: str :keyword value: Required. Array of operations. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Operation] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Operation] """ super(OperationsList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -2466,7 +2735,7 @@ def __init__( class OsProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the operating system settings for the virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -2483,7 +2752,7 @@ class OsProfile(msrest.serialization.Model): :vartype allow_extension_operations: bool :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str :ivar tools_running_status: Gets or sets the current running status of VMware Tools running in @@ -2496,9 +2765,10 @@ class OsProfile(msrest.serialization.Model): :vartype tools_version: str :ivar windows_configuration: Specifies the windows configuration for update management. :vartype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileWindowsConfiguration :ivar linux_configuration: Specifies the linux configuration for update management. - :vartype linux_configuration: ~azure.mgmt.connectedvmware.models.OsProfileLinuxConfiguration + :vartype linux_configuration: + ~azure_arc_vmware_management_service_api.models.OsProfileLinuxConfiguration """ _validation = { @@ -2539,12 +2809,13 @@ def __init__( :paramtype guest_id: str :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :paramtype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :keyword windows_configuration: Specifies the windows configuration for update management. :paramtype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileWindowsConfiguration :keyword linux_configuration: Specifies the linux configuration for update management. - :paramtype linux_configuration: ~azure.mgmt.connectedvmware.models.OsProfileLinuxConfiguration + :paramtype linux_configuration: + ~azure_arc_vmware_management_service_api.models.OsProfileLinuxConfiguration """ super(OsProfile, self).__init__(**kwargs) self.computer_name = kwargs.get('computer_name', None) @@ -2561,6 +2832,82 @@ def __init__( self.linux_configuration = kwargs.get('linux_configuration', None) +class OsProfileForVMInstance(msrest.serialization.Model): + """Specifies the operating system settings for the virtual machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar computer_name: Gets or sets computer name. + :vartype computer_name: str + :ivar admin_username: Gets or sets administrator username. + :vartype admin_username: str + :ivar admin_password: Sets administrator password. + :vartype admin_password: str + :ivar guest_id: Gets or sets the guestId. + :vartype guest_id: str + :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", + "Other". + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType + :ivar os_sku: Gets or sets os sku. + :vartype os_sku: str + :ivar tools_running_status: Gets or sets the current running status of VMware Tools running in + the guest operating system. + :vartype tools_running_status: str + :ivar tools_version_status: Gets or sets the current version status of VMware Tools installed + in the guest operating system. + :vartype tools_version_status: str + :ivar tools_version: Gets or sets the current version of VMware Tools. + :vartype tools_version: str + """ + + _validation = { + 'os_sku': {'readonly': True}, + 'tools_running_status': {'readonly': True}, + 'tools_version_status': {'readonly': True}, + 'tools_version': {'readonly': True}, + } + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'guest_id': {'key': 'guestId', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'os_sku': {'key': 'osSku', 'type': 'str'}, + 'tools_running_status': {'key': 'toolsRunningStatus', 'type': 'str'}, + 'tools_version_status': {'key': 'toolsVersionStatus', 'type': 'str'}, + 'tools_version': {'key': 'toolsVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword computer_name: Gets or sets computer name. + :paramtype computer_name: str + :keyword admin_username: Gets or sets administrator username. + :paramtype admin_username: str + :keyword admin_password: Sets administrator password. + :paramtype admin_password: str + :keyword guest_id: Gets or sets the guestId. + :paramtype guest_id: str + :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", + "Other". + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType + """ + super(OsProfileForVMInstance, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.admin_username = kwargs.get('admin_username', None) + self.admin_password = kwargs.get('admin_password', None) + self.guest_id = kwargs.get('guest_id', None) + self.os_type = kwargs.get('os_type', None) + self.os_sku = None + self.tools_running_status = None + self.tools_version_status = None + self.tools_version = None + + class OsProfileLinuxConfiguration(msrest.serialization.Model): """Specifies the linux configuration for update management. @@ -2591,14 +2938,14 @@ def __init__( class OsProfileUpdate(msrest.serialization.Model): - """Defines the os update properties. + """Specifies the operating system settings for the virtual machine. :ivar windows_configuration: Specifies the windows configuration for update management. :vartype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateWindowsConfiguration :ivar linux_configuration: Specifies the linux configuration for update management. :vartype linux_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateLinuxConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateLinuxConfiguration """ _attribute_map = { @@ -2613,10 +2960,10 @@ def __init__( """ :keyword windows_configuration: Specifies the windows configuration for update management. :paramtype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateWindowsConfiguration :keyword linux_configuration: Specifies the linux configuration for update management. :paramtype linux_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateLinuxConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateLinuxConfiguration """ super(OsProfileUpdate, self).__init__(**kwargs) self.windows_configuration = kwargs.get('windows_configuration', None) @@ -2711,7 +3058,7 @@ def __init__( class PlacementProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the compute and storage placement settings for the virtual machine. :ivar resource_pool_id: Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. @@ -2769,9 +3116,9 @@ class ResourcePool(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -2818,11 +3165,23 @@ class ResourcePool(msrest.serialization.Model): :ivar mem_limit_mb: Gets or sets MemLimitMB specifies a memory usage limit in megabytes. Utilization will not exceed the specified limit even if there are available resources. :vartype mem_limit_mb: long + :ivar mem_overall_usage_gb: Gets the used physical memory on the pool in GB. + :vartype mem_overall_usage_gb: long + :ivar mem_capacity_gb: Gets the total amount of physical memory on the pool in GB. + :vartype mem_capacity_gb: long + :ivar cpu_overall_usage_m_hz: Gets the used CPU usage across all cores on the pool in MHz. + :vartype cpu_overall_usage_m_hz: long + :ivar cpu_capacity_m_hz: Gets the max CPU usage across all cores on the pool in MHz. + :vartype cpu_capacity_m_hz: long :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str + :ivar datastore_ids: Gets the datastore ARM ids. + :vartype datastore_ids: list[str] + :ivar network_ids: Gets the network ARM ids. + :vartype network_ids: list[str] :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] - :ivar provisioning_state: Gets or sets the provisioning state. + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] + :ivar provisioning_state: Gets the provisioning state. :vartype provisioning_state: str """ @@ -2840,7 +3199,13 @@ class ResourcePool(msrest.serialization.Model): 'mem_shares_level': {'readonly': True}, 'mem_reservation_mb': {'readonly': True}, 'mem_limit_mb': {'readonly': True}, + 'mem_overall_usage_gb': {'readonly': True}, + 'mem_capacity_gb': {'readonly': True}, + 'cpu_overall_usage_m_hz': {'readonly': True}, + 'cpu_capacity_m_hz': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'datastore_ids': {'readonly': True}, + 'network_ids': {'readonly': True}, 'statuses': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -2865,7 +3230,13 @@ class ResourcePool(msrest.serialization.Model): 'mem_shares_level': {'key': 'properties.memSharesLevel', 'type': 'str'}, 'mem_reservation_mb': {'key': 'properties.memReservationMB', 'type': 'long'}, 'mem_limit_mb': {'key': 'properties.memLimitMB', 'type': 'long'}, + 'mem_overall_usage_gb': {'key': 'properties.memOverallUsageGB', 'type': 'long'}, + 'mem_capacity_gb': {'key': 'properties.memCapacityGB', 'type': 'long'}, + 'cpu_overall_usage_m_hz': {'key': 'properties.CPUOverallUsageMHz', 'type': 'long'}, + 'cpu_capacity_m_hz': {'key': 'properties.CPUCapacityMHz', 'type': 'long'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'datastore_ids': {'key': 'properties.datastoreIds', 'type': '[str]'}, + 'network_ids': {'key': 'properties.networkIds', 'type': '[str]'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -2878,7 +3249,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -2914,7 +3285,13 @@ def __init__( self.mem_shares_level = None self.mem_reservation_mb = None self.mem_limit_mb = None + self.mem_overall_usage_gb = None + self.mem_capacity_gb = None + self.cpu_overall_usage_m_hz = None + self.cpu_capacity_m_hz = None self.custom_resource_name = None + self.datastore_ids = None + self.network_ids = None self.statuses = None self.provisioning_state = None @@ -2929,7 +3306,7 @@ class ResourcePoolInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -2940,7 +3317,7 @@ class ResourcePoolInventoryItem(InventoryItemProperties): :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str :ivar parent: Parent resourcePool inventory resource details. - :vartype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ _validation = { @@ -2971,7 +3348,7 @@ def __init__( :keyword mo_name: Gets or sets the vCenter Managed Object name for the inventory item. :paramtype mo_name: str :keyword parent: Parent resourcePool inventory resource details. - :paramtype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ super(ResourcePoolInventoryItem, self).__init__(**kwargs) self.inventory_type = 'ResourcePool' # type: str @@ -2986,7 +3363,7 @@ class ResourcePoolsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of ResourcePools. :vartype next_link: str :ivar value: Required. Array of ResourcePools. - :vartype value: list[~azure.mgmt.connectedvmware.models.ResourcePool] + :vartype value: list[~azure_arc_vmware_management_service_api.models.ResourcePool] """ _validation = { @@ -3006,7 +3383,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of ResourcePools. :paramtype next_link: str :keyword value: Required. Array of ResourcePools. - :paramtype value: list[~azure.mgmt.connectedvmware.models.ResourcePool] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.ResourcePool] """ super(ResourcePoolsList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -3070,7 +3447,7 @@ class SecurityProfile(msrest.serialization.Model): :ivar uefi_settings: Specifies the security settings like secure boot used while creating the virtual machine. - :vartype uefi_settings: ~azure.mgmt.connectedvmware.models.UefiSettings + :vartype uefi_settings: ~azure_arc_vmware_management_service_api.models.UefiSettings """ _attribute_map = { @@ -3084,7 +3461,7 @@ def __init__( """ :keyword uefi_settings: Specifies the security settings like secure boot used while creating the virtual machine. - :paramtype uefi_settings: ~azure.mgmt.connectedvmware.models.UefiSettings + :paramtype uefi_settings: ~azure_arc_vmware_management_service_api.models.UefiSettings """ super(SecurityProfile, self).__init__(**kwargs) self.uefi_settings = kwargs.get('uefi_settings', None) @@ -3118,15 +3495,16 @@ def __init__( class StorageProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the storage settings for the virtual machine disks. Variables are only populated by the server, and will be ignored when sending a request. :ivar disks: Gets or sets the list of virtual disks associated with the virtual machine. - :vartype disks: list[~azure.mgmt.connectedvmware.models.VirtualDisk] + :vartype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDisk] :ivar scsi_controllers: Gets or sets the list of virtual SCSI controllers associated with the virtual machine. - :vartype scsi_controllers: list[~azure.mgmt.connectedvmware.models.VirtualSCSIController] + :vartype scsi_controllers: + list[~azure_arc_vmware_management_service_api.models.VirtualSCSIController] """ _validation = { @@ -3144,7 +3522,7 @@ def __init__( ): """ :keyword disks: Gets or sets the list of virtual disks associated with the virtual machine. - :paramtype disks: list[~azure.mgmt.connectedvmware.models.VirtualDisk] + :paramtype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDisk] """ super(StorageProfile, self).__init__(**kwargs) self.disks = kwargs.get('disks', None) @@ -3152,10 +3530,10 @@ def __init__( class StorageProfileUpdate(msrest.serialization.Model): - """Defines the resource update properties. + """Specifies the storage settings for the virtual machine disks. :ivar disks: Gets or sets the list of virtual disks associated with the virtual machine. - :vartype disks: list[~azure.mgmt.connectedvmware.models.VirtualDiskUpdate] + :vartype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDiskUpdate] """ _attribute_map = { @@ -3168,7 +3546,7 @@ def __init__( ): """ :keyword disks: Gets or sets the list of virtual disks associated with the virtual machine. - :paramtype disks: list[~azure.mgmt.connectedvmware.models.VirtualDiskUpdate] + :paramtype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDiskUpdate] """ super(StorageProfileUpdate, self).__init__(**kwargs) self.disks = kwargs.get('disks', None) @@ -3181,14 +3559,15 @@ class SystemData(msrest.serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :vartype created_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :vartype created_by_type: str or ~azure_arc_vmware_management_service_api.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. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :vartype last_modified_by_type: str or + ~azure_arc_vmware_management_service_api.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -3211,14 +3590,16 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :paramtype created_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :paramtype created_by_type: str or + ~azure_arc_vmware_management_service_api.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :paramtype last_modified_by_type: str or + ~azure_arc_vmware_management_service_api.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -3266,9 +3647,9 @@ class VCenter(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -3296,9 +3677,9 @@ class VCenter(msrest.serialization.Model): :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar credentials: Username / Password Credentials to connect to vcenter. - :vartype credentials: ~azure.mgmt.connectedvmware.models.VICredential + :vartype credentials: ~azure_arc_vmware_management_service_api.models.VICredential :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -3349,7 +3730,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -3361,7 +3742,7 @@ def __init__( :keyword port: Gets or sets the port of the vCenter. :paramtype port: int :keyword credentials: Username / Password Credentials to connect to vcenter. - :paramtype credentials: ~azure.mgmt.connectedvmware.models.VICredential + :paramtype credentials: ~azure_arc_vmware_management_service_api.models.VICredential """ super(VCenter, self).__init__(**kwargs) self.location = kwargs['location'] @@ -3392,7 +3773,7 @@ class VCentersList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VCenters. :vartype next_link: str :ivar value: Required. Array of VCenters. - :vartype value: list[~azure.mgmt.connectedvmware.models.VCenter] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VCenter] """ _validation = { @@ -3412,7 +3793,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VCenters. :paramtype next_link: str :keyword value: Required. Array of VCenters. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VCenter] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VCenter] """ super(VCentersList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -3465,7 +3846,7 @@ class VirtualDisk(msrest.serialization.Model): :vartype device_key: int :ivar disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :vartype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :vartype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :ivar controller_key: Gets or sets the controller id. :vartype controller_key: int :ivar unit_number: Gets or sets the unit number of the disk on the controller. @@ -3474,7 +3855,7 @@ class VirtualDisk(msrest.serialization.Model): :vartype device_name: str :ivar disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :vartype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :vartype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ _validation = { @@ -3508,7 +3889,7 @@ def __init__( :paramtype device_key: int :keyword disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :paramtype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :paramtype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :keyword controller_key: Gets or sets the controller id. :paramtype controller_key: int :keyword unit_number: Gets or sets the unit number of the disk on the controller. @@ -3517,7 +3898,7 @@ def __init__( :paramtype device_name: str :keyword disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :paramtype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :paramtype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ super(VirtualDisk, self).__init__(**kwargs) self.name = kwargs.get('name', None) @@ -3543,7 +3924,7 @@ class VirtualDiskUpdate(msrest.serialization.Model): :vartype device_key: int :ivar disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :vartype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :vartype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :ivar controller_key: Gets or sets the controller id. :vartype controller_key: int :ivar unit_number: Gets or sets the unit number of the disk on the controller. @@ -3552,7 +3933,7 @@ class VirtualDiskUpdate(msrest.serialization.Model): :vartype device_name: str :ivar disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :vartype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :vartype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ _attribute_map = { @@ -3579,7 +3960,7 @@ def __init__( :paramtype device_key: int :keyword disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :paramtype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :paramtype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :keyword controller_key: Gets or sets the controller id. :paramtype controller_key: int :keyword unit_number: Gets or sets the unit number of the disk on the controller. @@ -3588,7 +3969,7 @@ def __init__( :paramtype device_name: str :keyword disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :paramtype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :paramtype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ super(VirtualDiskUpdate, self).__init__(**kwargs) self.name = kwargs.get('name', None) @@ -3611,9 +3992,9 @@ class VirtualMachine(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -3627,7 +4008,7 @@ class VirtualMachine(msrest.serialization.Model): the resource provider must validate and persist this value. :vartype kind: str :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.connectedvmware.models.Identity + :vartype identity: ~azure_arc_vmware_management_service_api.models.Identity :ivar resource_pool_id: Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. @@ -3639,19 +4020,19 @@ class VirtualMachine(msrest.serialization.Model): resides. :vartype v_center_id: str :ivar placement_profile: Placement properties. - :vartype placement_profile: ~azure.mgmt.connectedvmware.models.PlacementProfile + :vartype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile :ivar os_profile: OS properties. - :vartype os_profile: ~azure.mgmt.connectedvmware.models.OsProfile + :vartype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfile :ivar hardware_profile: Hardware properties. - :vartype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :ivar network_profile: Network properties. - :vartype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfile + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile :ivar storage_profile: Storage properties. - :vartype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfile + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile :ivar guest_agent_profile: Guest agent status properties. - :vartype guest_agent_profile: ~azure.mgmt.connectedvmware.models.GuestAgentProfile + :vartype guest_agent_profile: ~azure_arc_vmware_management_service_api.models.GuestAgentProfile :ivar security_profile: Gets the security profile. - :vartype security_profile: ~azure.mgmt.connectedvmware.models.SecurityProfile + :vartype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile :ivar mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. :vartype mo_ref_id: str @@ -3666,7 +4047,7 @@ class VirtualMachine(msrest.serialization.Model): :ivar smbios_uuid: Gets or sets the SMBIOS UUID of the vm. :vartype smbios_uuid: str :ivar firmware_type: Firmware type. Possible values include: "bios", "efi". - :vartype firmware_type: str or ~azure.mgmt.connectedvmware.models.FirmwareType + :vartype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType :ivar power_state: Gets the power state of the virtual machine. :vartype power_state: str :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. @@ -3674,7 +4055,7 @@ class VirtualMachine(msrest.serialization.Model): :ivar uuid: Gets or sets a unique identifier for this resource. :vartype uuid: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str :ivar vm_id: Gets or sets a unique identifier for the vm resource. @@ -3741,7 +4122,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -3749,7 +4130,7 @@ def __init__( the resource provider must validate and persist this value. :paramtype kind: str :keyword identity: The identity of the resource. - :paramtype identity: ~azure.mgmt.connectedvmware.models.Identity + :paramtype identity: ~azure_arc_vmware_management_service_api.models.Identity :keyword resource_pool_id: Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. @@ -3761,19 +4142,20 @@ def __init__( pool resides. :paramtype v_center_id: str :keyword placement_profile: Placement properties. - :paramtype placement_profile: ~azure.mgmt.connectedvmware.models.PlacementProfile + :paramtype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile :keyword os_profile: OS properties. - :paramtype os_profile: ~azure.mgmt.connectedvmware.models.OsProfile + :paramtype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfile :keyword hardware_profile: Hardware properties. - :paramtype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :keyword network_profile: Network properties. - :paramtype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfile + :paramtype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile :keyword storage_profile: Storage properties. - :paramtype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfile + :paramtype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile :keyword guest_agent_profile: Guest agent status properties. - :paramtype guest_agent_profile: ~azure.mgmt.connectedvmware.models.GuestAgentProfile + :paramtype guest_agent_profile: + ~azure_arc_vmware_management_service_api.models.GuestAgentProfile :keyword security_profile: Gets the security profile. - :paramtype security_profile: ~azure.mgmt.connectedvmware.models.SecurityProfile + :paramtype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile :keyword mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. :paramtype mo_ref_id: str @@ -3782,7 +4164,7 @@ def __init__( :keyword smbios_uuid: Gets or sets the SMBIOS UUID of the vm. :paramtype smbios_uuid: str :keyword firmware_type: Firmware type. Possible values include: "bios", "efi". - :paramtype firmware_type: str or ~azure.mgmt.connectedvmware.models.FirmwareType + :paramtype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType """ super(VirtualMachine, self).__init__(**kwargs) self.location = kwargs['location'] @@ -3828,7 +4210,7 @@ class VirtualMachineAssessPatchesResult(msrest.serialization.Model): until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", "Succeeded", "CompletedWithWarnings". - :vartype status: str or ~azure.mgmt.connectedvmware.models.PatchOperationStatus + :vartype status: str or ~azure_arc_vmware_management_service_api.models.PatchOperationStatus :ivar assessment_activity_id: The activity ID of the operation that produced this result. :vartype assessment_activity_id: str :ivar reboot_pending: The overall reboot status of the VM. It will be true when partially @@ -3838,23 +4220,25 @@ class VirtualMachineAssessPatchesResult(msrest.serialization.Model): :ivar available_patch_count_by_classification: Summarization of patches available for installation on the machine by classification. :vartype available_patch_count_by_classification: - ~azure.mgmt.connectedvmware.models.AvailablePatchCountByClassification + ~azure_arc_vmware_management_service_api.models.AvailablePatchCountByClassification :ivar start_date_time: The UTC timestamp when the operation began. :vartype start_date_time: ~datetime.datetime :ivar last_modified_date_time: The UTC timestamp when the operation finished. :vartype last_modified_date_time: ~datetime.datetime :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values include: "User", "Platform". - :vartype started_by: str or ~azure.mgmt.connectedvmware.models.PatchOperationStartedBy + :vartype started_by: str or + ~azure_arc_vmware_management_service_api.models.PatchOperationStartedBy :ivar patch_service_used: Specifies the patch service used for the operation. Possible values include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". - :vartype patch_service_used: str or ~azure.mgmt.connectedvmware.models.PatchServiceUsed + :vartype patch_service_used: str or + ~azure_arc_vmware_management_service_api.models.PatchServiceUsed :ivar os_type: The operating system type of the machine. Possible values include: "Windows", "Linux". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsTypeUM + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsTypeUM :ivar error_details: The errors that were encountered during execution of the operation. The details array contains the list of them. - :vartype error_details: ~azure.mgmt.connectedvmware.models.ErrorDetail + :vartype error_details: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ _validation = { @@ -3890,7 +4274,7 @@ def __init__( :keyword available_patch_count_by_classification: Summarization of patches available for installation on the machine by classification. :paramtype available_patch_count_by_classification: - ~azure.mgmt.connectedvmware.models.AvailablePatchCountByClassification + ~azure_arc_vmware_management_service_api.models.AvailablePatchCountByClassification """ super(VirtualMachineAssessPatchesResult, self).__init__(**kwargs) self.status = None @@ -3915,13 +4299,14 @@ class VirtualMachineInstallPatchesParameters(msrest.serialization.Model): :vartype maximum_duration: str :ivar reboot_setting: Required. Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: "IfRequired", "Never", "Always". - :vartype reboot_setting: str or ~azure.mgmt.connectedvmware.models.VMGuestPatchRebootSetting + :vartype reboot_setting: str or + ~azure_arc_vmware_management_service_api.models.VMGuestPatchRebootSetting :ivar windows_parameters: Input for InstallPatches on a Windows VM, as directly received by the API. - :vartype windows_parameters: ~azure.mgmt.connectedvmware.models.WindowsParameters + :vartype windows_parameters: ~azure_arc_vmware_management_service_api.models.WindowsParameters :ivar linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the API. - :vartype linux_parameters: ~azure.mgmt.connectedvmware.models.LinuxParameters + :vartype linux_parameters: ~azure_arc_vmware_management_service_api.models.LinuxParameters """ _validation = { @@ -3946,13 +4331,15 @@ def __init__( :paramtype maximum_duration: str :keyword reboot_setting: Required. Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: "IfRequired", "Never", "Always". - :paramtype reboot_setting: str or ~azure.mgmt.connectedvmware.models.VMGuestPatchRebootSetting + :paramtype reboot_setting: str or + ~azure_arc_vmware_management_service_api.models.VMGuestPatchRebootSetting :keyword windows_parameters: Input for InstallPatches on a Windows VM, as directly received by the API. - :paramtype windows_parameters: ~azure.mgmt.connectedvmware.models.WindowsParameters + :paramtype windows_parameters: + ~azure_arc_vmware_management_service_api.models.WindowsParameters :keyword linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the API. - :paramtype linux_parameters: ~azure.mgmt.connectedvmware.models.LinuxParameters + :paramtype linux_parameters: ~azure_arc_vmware_management_service_api.models.LinuxParameters """ super(VirtualMachineInstallPatchesParameters, self).__init__(**kwargs) self.maximum_duration = kwargs['maximum_duration'] @@ -3970,12 +4357,13 @@ class VirtualMachineInstallPatchesResult(msrest.serialization.Model): until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", "Succeeded", "CompletedWithWarnings". - :vartype status: str or ~azure.mgmt.connectedvmware.models.PatchOperationStatus + :vartype status: str or ~azure_arc_vmware_management_service_api.models.PatchOperationStatus :ivar installation_activity_id: The activity ID of the operation that produced this result. :vartype installation_activity_id: str :ivar reboot_status: The reboot state of the VM following completion of the operation. Possible values include: "Unknown", "NotNeeded", "Required", "Started", "Failed", "Completed". - :vartype reboot_status: str or ~azure.mgmt.connectedvmware.models.VMGuestPatchRebootStatus + :vartype reboot_status: str or + ~azure_arc_vmware_management_service_api.models.VMGuestPatchRebootStatus :ivar maintenance_window_exceeded: Whether the operation ran out of time before it completed all its intended actions. :vartype maintenance_window_exceeded: bool @@ -4000,16 +4388,18 @@ class VirtualMachineInstallPatchesResult(msrest.serialization.Model): :vartype last_modified_date_time: ~datetime.datetime :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values include: "User", "Platform". - :vartype started_by: str or ~azure.mgmt.connectedvmware.models.PatchOperationStartedBy + :vartype started_by: str or + ~azure_arc_vmware_management_service_api.models.PatchOperationStartedBy :ivar patch_service_used: Specifies the patch service used for the operation. Possible values include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". - :vartype patch_service_used: str or ~azure.mgmt.connectedvmware.models.PatchServiceUsed + :vartype patch_service_used: str or + ~azure_arc_vmware_management_service_api.models.PatchServiceUsed :ivar os_type: The operating system type of the machine. Possible values include: "Windows", "Linux". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsTypeUM + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsTypeUM :ivar error_details: The errors that were encountered during execution of the operation. The details array contains the list of them. - :vartype error_details: ~azure.mgmt.connectedvmware.models.ErrorDetail + :vartype error_details: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ _validation = { @@ -4072,6 +4462,183 @@ def __init__( self.error_details = None +class VirtualMachineInstance(ProxyResource): + """Define the virtualMachineInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData + :ivar extended_location: Gets or sets the extended location. + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation + :ivar placement_profile: Placement properties. + :vartype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile + :ivar os_profile: OS properties. + :vartype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileForVMInstance + :ivar hardware_profile: Hardware properties. + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :ivar network_profile: Network properties. + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile + :ivar storage_profile: Storage properties. + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile + :ivar security_profile: Gets the security profile. + :vartype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile + :ivar infrastructure_profile: Gets the infrastructure profile. + :vartype infrastructure_profile: + ~azure_arc_vmware_management_service_api.models.InfrastructureProfile + :ivar power_state: Gets the power state of the virtual machine. + :vartype power_state: str + :ivar statuses: The resource status information. + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] + :ivar provisioning_state: Gets or sets the provisioning state. + :vartype provisioning_state: str + :ivar resource_uid: Gets or sets a unique identifier for the vm resource. + :vartype resource_uid: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'power_state': {'readonly': True}, + 'statuses': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_uid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'placement_profile': {'key': 'properties.placementProfile', 'type': 'PlacementProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OsProfileForVMInstance'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'security_profile': {'key': 'properties.securityProfile', 'type': 'SecurityProfile'}, + 'infrastructure_profile': {'key': 'properties.infrastructureProfile', 'type': 'InfrastructureProfile'}, + 'power_state': {'key': 'properties.powerState', 'type': 'str'}, + 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_uid': {'key': 'properties.resourceUid', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword extended_location: Gets or sets the extended location. + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation + :keyword placement_profile: Placement properties. + :paramtype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile + :keyword os_profile: OS properties. + :paramtype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileForVMInstance + :keyword hardware_profile: Hardware properties. + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :keyword network_profile: Network properties. + :paramtype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile + :keyword storage_profile: Storage properties. + :paramtype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile + :keyword security_profile: Gets the security profile. + :paramtype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile + :keyword infrastructure_profile: Gets the infrastructure profile. + :paramtype infrastructure_profile: + ~azure_arc_vmware_management_service_api.models.InfrastructureProfile + """ + super(VirtualMachineInstance, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.placement_profile = kwargs.get('placement_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.security_profile = kwargs.get('security_profile', None) + self.infrastructure_profile = kwargs.get('infrastructure_profile', None) + self.power_state = None + self.statuses = None + self.provisioning_state = None + self.resource_uid = None + + +class VirtualMachineInstancesList(msrest.serialization.Model): + """List of VirtualMachineInstances. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. Array of VirtualMachines. + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineInstance]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Required. Array of VirtualMachines. + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + """ + super(VirtualMachineInstancesList, self).__init__(**kwargs) + self.value = kwargs['value'] + + +class VirtualMachineInstanceUpdate(msrest.serialization.Model): + """Defines the virtualMachineInstanceUpdate. + + :ivar hardware_profile: Specifies the hardware settings for the virtual machine. + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :ivar storage_profile: Specifies the storage settings for the virtual machine disks. + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :ivar network_profile: Specifies the network interfaces of the virtual machine. + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + """ + + _attribute_map = { + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfileUpdate'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfileUpdate'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword hardware_profile: Specifies the hardware settings for the virtual machine. + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :keyword storage_profile: Specifies the storage settings for the virtual machine disks. + :paramtype storage_profile: + ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :keyword network_profile: Specifies the network interfaces of the virtual machine. + :paramtype network_profile: + ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + """ + super(VirtualMachineInstanceUpdate, self).__init__(**kwargs) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.network_profile = kwargs.get('network_profile', None) + + class VirtualMachineInventoryItem(InventoryItemProperties): """The VM inventory item. @@ -4082,7 +4649,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -4094,7 +4661,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :vartype provisioning_state: str :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str :ivar ip_addresses: Gets or sets the nic ip addresses. @@ -4102,9 +4669,11 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :ivar folder_path: Gets or sets the folder path of the vm. :vartype folder_path: str :ivar host: Host inventory resource details. - :vartype host: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype host: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :ivar resource_pool: ResourcePool inventory resource details. - :vartype resource_pool: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype resource_pool: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails + :ivar cluster: Cluster inventory resource details. + :vartype cluster: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :ivar instance_uuid: Gets or sets the instance uuid of the vm. :vartype instance_uuid: str :ivar smbios_uuid: Gets or sets the SMBIOS UUID of the vm. @@ -4142,6 +4711,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): 'folder_path': {'key': 'folderPath', 'type': 'str'}, 'host': {'key': 'host', 'type': 'InventoryItemDetails'}, 'resource_pool': {'key': 'resourcePool', 'type': 'InventoryItemDetails'}, + 'cluster': {'key': 'cluster', 'type': 'InventoryItemDetails'}, 'instance_uuid': {'key': 'instanceUuid', 'type': 'str'}, 'smbios_uuid': {'key': 'smbiosUuid', 'type': 'str'}, 'power_state': {'key': 'powerState', 'type': 'str'}, @@ -4165,7 +4735,7 @@ def __init__( :paramtype mo_name: str :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :paramtype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :keyword os_name: Gets or sets os name. :paramtype os_name: str :keyword ip_addresses: Gets or sets the nic ip addresses. @@ -4173,9 +4743,11 @@ def __init__( :keyword folder_path: Gets or sets the folder path of the vm. :paramtype folder_path: str :keyword host: Host inventory resource details. - :paramtype host: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype host: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :keyword resource_pool: ResourcePool inventory resource details. - :paramtype resource_pool: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype resource_pool: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails + :keyword cluster: Cluster inventory resource details. + :paramtype cluster: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :keyword instance_uuid: Gets or sets the instance uuid of the vm. :paramtype instance_uuid: str :keyword smbios_uuid: Gets or sets the SMBIOS UUID of the vm. @@ -4189,6 +4761,7 @@ def __init__( self.folder_path = kwargs.get('folder_path', None) self.host = kwargs.get('host', None) self.resource_pool = kwargs.get('resource_pool', None) + self.cluster = kwargs.get('cluster', None) self.instance_uuid = kwargs.get('instance_uuid', None) self.smbios_uuid = kwargs.get('smbios_uuid', None) self.power_state = None @@ -4205,7 +4778,7 @@ class VirtualMachinesList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VirtualMachines. :vartype next_link: str :ivar value: Required. Array of VirtualMachines. - :vartype value: list[~azure.mgmt.connectedvmware.models.VirtualMachine] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachine] """ _validation = { @@ -4225,7 +4798,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VirtualMachines. :paramtype next_link: str :keyword value: Required. Array of VirtualMachines. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VirtualMachine] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachine] """ super(VirtualMachinesList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -4242,9 +4815,9 @@ class VirtualMachineTemplate(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -4279,15 +4852,16 @@ class VirtualMachineTemplate(msrest.serialization.Model): :vartype num_cores_per_socket: int :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str :ivar folder_path: Gets or sets the folder path of the template. :vartype folder_path: str :ivar network_interfaces: Gets or sets the network interfaces of the template. - :vartype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterface] + :vartype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterface] :ivar disks: Gets or sets the disks the template. - :vartype disks: list[~azure.mgmt.connectedvmware.models.VirtualDisk] + :vartype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDisk] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar tools_version_status: Gets or sets the current version status of VMware Tools installed @@ -4296,9 +4870,9 @@ class VirtualMachineTemplate(msrest.serialization.Model): :ivar tools_version: Gets or sets the current version of VMware Tools. :vartype tools_version: str :ivar firmware_type: Firmware type. Possible values include: "bios", "efi". - :vartype firmware_type: str or ~azure.mgmt.connectedvmware.models.FirmwareType + :vartype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -4365,7 +4939,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -4423,7 +4997,7 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -4442,9 +5016,14 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): :vartype num_cores_per_socket: int :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str + :ivar tools_version_status: Gets or sets the current version status of VMware Tools installed + in the guest operating system. + :vartype tools_version_status: str + :ivar tools_version: Gets or sets the current version of VMware Tools. + :vartype tools_version: str :ivar folder_path: Gets or sets the folder path of the template. :vartype folder_path: str """ @@ -4452,6 +5031,8 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): _validation = { 'inventory_type': {'required': True}, 'provisioning_state': {'readonly': True}, + 'tools_version_status': {'readonly': True}, + 'tools_version': {'readonly': True}, } _attribute_map = { @@ -4465,6 +5046,8 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): 'num_cores_per_socket': {'key': 'numCoresPerSocket', 'type': 'int'}, 'os_type': {'key': 'osType', 'type': 'str'}, 'os_name': {'key': 'osName', 'type': 'str'}, + 'tools_version_status': {'key': 'toolsVersionStatus', 'type': 'str'}, + 'tools_version': {'key': 'toolsVersion', 'type': 'str'}, 'folder_path': {'key': 'folderPath', 'type': 'str'}, } @@ -4490,7 +5073,7 @@ def __init__( :paramtype num_cores_per_socket: int :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :paramtype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :keyword os_name: Gets or sets os name. :paramtype os_name: str :keyword folder_path: Gets or sets the folder path of the template. @@ -4503,6 +5086,8 @@ def __init__( self.num_cores_per_socket = kwargs.get('num_cores_per_socket', None) self.os_type = kwargs.get('os_type', None) self.os_name = kwargs.get('os_name', None) + self.tools_version_status = None + self.tools_version = None self.folder_path = kwargs.get('folder_path', None) @@ -4514,7 +5099,7 @@ class VirtualMachineTemplatesList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VirtualMachineTemplates. :vartype next_link: str :ivar value: Required. Array of VirtualMachineTemplates. - :vartype value: list[~azure.mgmt.connectedvmware.models.VirtualMachineTemplate] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate] """ _validation = { @@ -4534,7 +5119,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VirtualMachineTemplates. :paramtype next_link: str :keyword value: Required. Array of VirtualMachineTemplates. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VirtualMachineTemplate] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate] """ super(VirtualMachineTemplatesList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -4547,15 +5132,18 @@ class VirtualMachineUpdate(msrest.serialization.Model): :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.connectedvmware.models.Identity - :ivar hardware_profile: Defines the resource properties. - :vartype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :vartype identity: ~azure_arc_vmware_management_service_api.models.Identity + :ivar hardware_profile: Specifies the hardware settings for the virtual machine. + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :ivar os_profile: OS properties. - :vartype os_profile: ~azure.mgmt.connectedvmware.models.OsProfileUpdate - :ivar storage_profile: Defines the resource update properties. - :vartype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfileUpdate - :ivar network_profile: Defines the update resource properties. - :vartype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfileUpdate + :vartype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileUpdate + :ivar storage_profile: Specifies the storage settings for the virtual machine disks. + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :ivar network_profile: Specifies the network interfaces of the virtual machine. + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + :ivar guest_agent_profile: Specifies the guest agent settings for the virtual machine. + :vartype guest_agent_profile: + ~azure_arc_vmware_management_service_api.models.GuestAgentProfileUpdate """ _attribute_map = { @@ -4565,6 +5153,7 @@ class VirtualMachineUpdate(msrest.serialization.Model): 'os_profile': {'key': 'properties.osProfile', 'type': 'OsProfileUpdate'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfileUpdate'}, 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfileUpdate'}, + 'guest_agent_profile': {'key': 'properties.guestAgentProfile', 'type': 'GuestAgentProfileUpdate'}, } def __init__( @@ -4575,15 +5164,20 @@ def __init__( :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword identity: The identity of the resource. - :paramtype identity: ~azure.mgmt.connectedvmware.models.Identity - :keyword hardware_profile: Defines the resource properties. - :paramtype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :paramtype identity: ~azure_arc_vmware_management_service_api.models.Identity + :keyword hardware_profile: Specifies the hardware settings for the virtual machine. + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :keyword os_profile: OS properties. - :paramtype os_profile: ~azure.mgmt.connectedvmware.models.OsProfileUpdate - :keyword storage_profile: Defines the resource update properties. - :paramtype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfileUpdate - :keyword network_profile: Defines the update resource properties. - :paramtype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfileUpdate + :paramtype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileUpdate + :keyword storage_profile: Specifies the storage settings for the virtual machine disks. + :paramtype storage_profile: + ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :keyword network_profile: Specifies the network interfaces of the virtual machine. + :paramtype network_profile: + ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + :keyword guest_agent_profile: Specifies the guest agent settings for the virtual machine. + :paramtype guest_agent_profile: + ~azure_arc_vmware_management_service_api.models.GuestAgentProfileUpdate """ super(VirtualMachineUpdate, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) @@ -4592,6 +5186,7 @@ def __init__( self.os_profile = kwargs.get('os_profile', None) self.storage_profile = kwargs.get('storage_profile', None) self.network_profile = kwargs.get('network_profile', None) + self.guest_agent_profile = kwargs.get('guest_agent_profile', None) class VirtualNetwork(msrest.serialization.Model): @@ -4604,9 +5199,9 @@ class VirtualNetwork(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -4634,7 +5229,7 @@ class VirtualNetwork(msrest.serialization.Model): :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -4679,7 +5274,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -4724,7 +5319,7 @@ class VirtualNetworkInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -4775,7 +5370,7 @@ class VirtualNetworksList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VirtualNetworks. :vartype next_link: str :ivar value: Required. Array of VirtualNetworks. - :vartype value: list[~azure.mgmt.connectedvmware.models.VirtualNetwork] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualNetwork] """ _validation = { @@ -4795,7 +5390,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VirtualNetworks. :paramtype next_link: str :keyword value: Required. Array of VirtualNetworks. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VirtualNetwork] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualNetwork] """ super(VirtualNetworksList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -4807,7 +5402,7 @@ class VirtualSCSIController(msrest.serialization.Model): :ivar type: Gets or sets the controller type. Possible values include: "lsilogic", "buslogic", "pvscsi", "lsilogicsas". - :vartype type: str or ~azure.mgmt.connectedvmware.models.SCSIControllerType + :vartype type: str or ~azure_arc_vmware_management_service_api.models.SCSIControllerType :ivar controller_key: Gets or sets the key of the controller. :vartype controller_key: int :ivar bus_number: Gets or sets the bus number of the controller. @@ -4816,7 +5411,7 @@ class VirtualSCSIController(msrest.serialization.Model): :vartype scsi_ctlr_unit_number: int :ivar sharing: Gets or sets the sharing mode. Possible values include: "noSharing", "physicalSharing", "virtualSharing". - :vartype sharing: str or ~azure.mgmt.connectedvmware.models.VirtualSCSISharing + :vartype sharing: str or ~azure_arc_vmware_management_service_api.models.VirtualSCSISharing """ _attribute_map = { @@ -4834,7 +5429,7 @@ def __init__( """ :keyword type: Gets or sets the controller type. Possible values include: "lsilogic", "buslogic", "pvscsi", "lsilogicsas". - :paramtype type: str or ~azure.mgmt.connectedvmware.models.SCSIControllerType + :paramtype type: str or ~azure_arc_vmware_management_service_api.models.SCSIControllerType :keyword controller_key: Gets or sets the key of the controller. :paramtype controller_key: int :keyword bus_number: Gets or sets the bus number of the controller. @@ -4843,7 +5438,7 @@ def __init__( :paramtype scsi_ctlr_unit_number: int :keyword sharing: Gets or sets the sharing mode. Possible values include: "noSharing", "physicalSharing", "virtualSharing". - :paramtype sharing: str or ~azure.mgmt.connectedvmware.models.VirtualSCSISharing + :paramtype sharing: str or ~azure_arc_vmware_management_service_api.models.VirtualSCSISharing """ super(VirtualSCSIController, self).__init__(**kwargs) self.type = kwargs.get('type', None) @@ -4853,13 +5448,108 @@ def __init__( self.sharing = kwargs.get('sharing', None) +class VmInstanceHybridIdentityMetadata(ProxyResource): + """Defines the HybridIdentityMetadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData + :ivar resource_uid: The unique identifier for the resource. + :vartype resource_uid: str + :ivar public_key: Gets or sets the Public Key. + :vartype public_key: str + :ivar provisioning_state: Gets or sets the provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'resource_uid': {'key': 'properties.resourceUid', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword resource_uid: The unique identifier for the resource. + :paramtype resource_uid: str + :keyword public_key: Gets or sets the Public Key. + :paramtype public_key: str + """ + super(VmInstanceHybridIdentityMetadata, self).__init__(**kwargs) + self.resource_uid = kwargs.get('resource_uid', None) + self.public_key = kwargs.get('public_key', None) + self.provisioning_state = None + + +class VmInstanceHybridIdentityMetadataList(msrest.serialization.Model): + """List of HybridIdentityMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: Url to follow for getting next page of HybridIdentityMetadata. + :vartype next_link: str + :ivar value: Required. Array of HybridIdentityMetadata. + :vartype value: + list[~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadata] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[VmInstanceHybridIdentityMetadata]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: Url to follow for getting next page of HybridIdentityMetadata. + :paramtype next_link: str + :keyword value: Required. Array of HybridIdentityMetadata. + :paramtype value: + list[~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadata] + """ + super(VmInstanceHybridIdentityMetadataList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs['value'] + + class WindowsParameters(msrest.serialization.Model): """Input for InstallPatches on a Windows VM, as directly received by the API. :ivar classifications_to_include: The update classifications to select when installing patches for Windows. :vartype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationWindows] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationWindows] :ivar kb_numbers_to_include: Kbs to include in the patch operation. :vartype kb_numbers_to_include: list[str] :ivar kb_numbers_to_exclude: Kbs to exclude in the patch operation. @@ -4888,7 +5578,7 @@ def __init__( :keyword classifications_to_include: The update classifications to select when installing patches for Windows. :paramtype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationWindows] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationWindows] :keyword kb_numbers_to_include: Kbs to include in the patch operation. :paramtype kb_numbers_to_include: list[str] :keyword kb_numbers_to_exclude: Kbs to exclude in the patch operation. diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_models_py3.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_models_py3.py similarity index 77% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_models_py3.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_models_py3.py index 567161a5dd8..2dee072b7ca 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/models/_models_py3.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/models/_models_py3.py @@ -92,9 +92,9 @@ class Cluster(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -119,14 +119,22 @@ class Cluster(msrest.serialization.Model): :ivar mo_name: Gets or sets the vCenter Managed Object name for the cluster. :vartype mo_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str - :ivar datastore_ids: Gets or sets the datastore ARM ids. + :ivar used_memory_gb: Gets the used physical memory on the cluster in GB. + :vartype used_memory_gb: str + :ivar total_memory_gb: Gets the total amount of physical memory on the cluster in GB. + :vartype total_memory_gb: str + :ivar used_cpum_hz: Gets the used CPU usage across all cores on the cluster in MHz. + :vartype used_cpum_hz: str + :ivar total_cpum_hz: Gets the max CPU usage across all cores on the cluster in MHz. + :vartype total_cpum_hz: str + :ivar datastore_ids: Gets the datastore ARM ids. :vartype datastore_ids: list[str] - :ivar network_ids: Gets or sets the network ARM ids. + :ivar network_ids: Gets the network ARM ids. :vartype network_ids: list[str] - :ivar provisioning_state: Gets or sets the provisioning state. + :ivar provisioning_state: Gets the provisioning state. :vartype provisioning_state: str """ @@ -140,6 +148,10 @@ class Cluster(msrest.serialization.Model): 'mo_name': {'readonly': True}, 'statuses': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'used_memory_gb': {'readonly': True}, + 'total_memory_gb': {'readonly': True}, + 'used_cpum_hz': {'readonly': True}, + 'total_cpum_hz': {'readonly': True}, 'datastore_ids': {'readonly': True}, 'network_ids': {'readonly': True}, 'provisioning_state': {'readonly': True}, @@ -161,6 +173,10 @@ class Cluster(msrest.serialization.Model): 'mo_name': {'key': 'properties.moName', 'type': 'str'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'used_memory_gb': {'key': 'properties.usedMemoryGB', 'type': 'str'}, + 'total_memory_gb': {'key': 'properties.totalMemoryGB', 'type': 'str'}, + 'used_cpum_hz': {'key': 'properties.usedCPUMHz', 'type': 'str'}, + 'total_cpum_hz': {'key': 'properties.totalCPUMHz', 'type': 'str'}, 'datastore_ids': {'key': 'properties.datastoreIds', 'type': '[str]'}, 'network_ids': {'key': 'properties.networkIds', 'type': '[str]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -182,7 +198,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -214,13 +230,17 @@ def __init__( self.mo_name = None self.statuses = None self.custom_resource_name = None + self.used_memory_gb = None + self.total_memory_gb = None + self.used_cpum_hz = None + self.total_cpum_hz = None self.datastore_ids = None self.network_ids = None self.provisioning_state = None class InventoryItemProperties(msrest.serialization.Model): - """Defines the resource properties. + """Describes the properties of an Inventory Item. You probably want to use the sub-classes and not this class directly. Known sub-classes are: ClusterInventoryItem, DatastoreInventoryItem, HostInventoryItem, ResourcePoolInventoryItem, VirtualMachineInventoryItem, VirtualMachineTemplateInventoryItem, VirtualNetworkInventoryItem. @@ -232,7 +252,7 @@ class InventoryItemProperties(msrest.serialization.Model): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -297,7 +317,7 @@ class ClusterInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -352,7 +372,7 @@ class ClustersList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of Clusters. :vartype next_link: str :ivar value: Required. Array of Clusters. - :vartype value: list[~azure.mgmt.connectedvmware.models.Cluster] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Cluster] """ _validation = { @@ -375,7 +395,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of Clusters. :paramtype next_link: str :keyword value: Required. Array of Clusters. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Cluster] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Cluster] """ super(ClustersList, self).__init__(**kwargs) self.next_link = next_link @@ -434,9 +454,9 @@ class Datastore(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -462,13 +482,18 @@ class Datastore(msrest.serialization.Model): :ivar mo_name: Gets or sets the vCenter Managed Object name for the datastore. :vartype mo_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str + :ivar capacity_gb: Gets or sets Maximum capacity of this datastore in GBs. + :vartype capacity_gb: long + :ivar free_space_gb: Gets or sets Available space of this datastore in GBs. + :vartype free_space_gb: long :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.connectedvmware.models.ProvisioningState + :vartype provisioning_state: str or + ~azure_arc_vmware_management_service_api.models.ProvisioningState """ _validation = { @@ -481,6 +506,8 @@ class Datastore(msrest.serialization.Model): 'mo_name': {'readonly': True}, 'statuses': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'capacity_gb': {'readonly': True}, + 'free_space_gb': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -500,6 +527,8 @@ class Datastore(msrest.serialization.Model): 'mo_name': {'key': 'properties.moName', 'type': 'str'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'capacity_gb': {'key': 'properties.capacityGB', 'type': 'long'}, + 'free_space_gb': {'key': 'properties.freeSpaceGB', 'type': 'long'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -519,7 +548,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -551,6 +580,8 @@ def __init__( self.mo_name = None self.statuses = None self.custom_resource_name = None + self.capacity_gb = None + self.free_space_gb = None self.provisioning_state = None @@ -564,7 +595,7 @@ class DatastoreInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -633,7 +664,7 @@ class DatastoresList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of Datastores. :vartype next_link: str :ivar value: Required. Array of Datastores. - :vartype value: list[~azure.mgmt.connectedvmware.models.Datastore] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Datastore] """ _validation = { @@ -656,36 +687,32 @@ def __init__( :keyword next_link: Url to follow for getting next page of Datastores. :paramtype next_link: str :keyword value: Required. Array of Datastores. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Datastore] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Datastore] """ super(DatastoresList, self).__init__(**kwargs) self.next_link = next_link self.value = value -class ErrorDefinition(msrest.serialization.Model): - """Error definition. +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Service specific error code which serves as the substatus for the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar details: Internal error details. - :vartype details: list[~azure.mgmt.connectedvmware.models.ErrorDefinition] + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -694,30 +721,35 @@ def __init__( ): """ """ - super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None class ErrorDetail(msrest.serialization.Model): - """Error details. + """The error detail. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Required. The error's code. + :ivar code: The error code. :vartype code: str - :ivar message: Required. A human readable error message. + :ivar message: The error message. :vartype message: str - :ivar target: Indicates which property in the request is responsible for the error. + :ivar target: The error target. :vartype target: str - :ivar details: Additional error details. - :vartype details: list[~azure.mgmt.connectedvmware.models.ErrorDetail] + :ivar details: The error details. + :vartype details: list[~azure_arc_vmware_management_service_api.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure_arc_vmware_management_service_api.models.ErrorAdditionalInfo] """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, } _attribute_map = { @@ -725,54 +757,43 @@ class ErrorDetail(msrest.serialization.Model): 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__( self, - *, - code: str, - message: str, - target: Optional[str] = None, - details: Optional[List["ErrorDetail"]] = None, **kwargs ): """ - :keyword code: Required. The error's code. - :paramtype code: str - :keyword message: Required. A human readable error message. - :paramtype message: str - :keyword target: Indicates which property in the request is responsible for the error. - :paramtype target: str - :keyword details: Additional error details. - :paramtype details: list[~azure.mgmt.connectedvmware.models.ErrorDetail] """ super(ErrorDetail, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None class ErrorResponse(msrest.serialization.Model): - """Error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - :ivar error: The error details. - :vartype error: ~azure.mgmt.connectedvmware.models.ErrorDefinition + :ivar error: The error object. + :vartype error: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, *, - error: Optional["ErrorDefinition"] = None, + error: Optional["ErrorDetail"] = None, **kwargs ): """ - :keyword error: The error details. - :paramtype error: ~azure.mgmt.connectedvmware.models.ErrorDefinition + :keyword error: The error object. + :paramtype error: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -810,31 +831,61 @@ def __init__( self.name = name +class ExtensionTargetProperties(msrest.serialization.Model): + """Describes the Machine Extension Target Version Properties. + + :ivar target_version: Properties for the specified Extension to Upgrade. + :vartype target_version: str + """ + + _attribute_map = { + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + target_version: Optional[str] = None, + **kwargs + ): + """ + :keyword target_version: Properties for the specified Extension to Upgrade. + :paramtype target_version: str + """ + super(ExtensionTargetProperties, self).__init__(**kwargs) + self.target_version = target_version + + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -847,6 +898,7 @@ def __init__( self.id = None self.name = None self.type = None + self.system_data = None class ProxyResource(Resource): @@ -854,26 +906,31 @@ class ProxyResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -890,31 +947,37 @@ class GuestAgent(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar uuid: Gets or sets a unique identifier for this resource. :vartype uuid: str :ivar credentials: Username / Password Credentials to provision guest agent. - :vartype credentials: ~azure.mgmt.connectedvmware.models.GuestCredential + :vartype credentials: ~azure_arc_vmware_management_service_api.models.GuestCredential + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str :ivar http_proxy_config: HTTP Proxy configuration for the VM. - :vartype http_proxy_config: ~azure.mgmt.connectedvmware.models.HttpProxyConfiguration + :vartype http_proxy_config: + ~azure_arc_vmware_management_service_api.models.HttpProxyConfiguration :ivar provisioning_action: Gets or sets the guest agent provisioning action. Possible values include: "install", "uninstall", "repair". - :vartype provisioning_action: str or ~azure.mgmt.connectedvmware.models.ProvisioningAction + :vartype provisioning_action: str or + ~azure_arc_vmware_management_service_api.models.ProvisioningAction :ivar status: Gets or sets the guest agent status. :vartype status: str :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -938,6 +1001,7 @@ class GuestAgent(ProxyResource): 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'uuid': {'key': 'properties.uuid', 'type': 'str'}, 'credentials': {'key': 'properties.credentials', 'type': 'GuestCredential'}, + 'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'}, 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'HttpProxyConfiguration'}, 'provisioning_action': {'key': 'properties.provisioningAction', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, @@ -950,23 +1014,29 @@ def __init__( self, *, credentials: Optional["GuestCredential"] = None, + private_link_scope_resource_id: Optional[str] = None, http_proxy_config: Optional["HttpProxyConfiguration"] = None, provisioning_action: Optional[Union[str, "ProvisioningAction"]] = None, **kwargs ): """ :keyword credentials: Username / Password Credentials to provision guest agent. - :paramtype credentials: ~azure.mgmt.connectedvmware.models.GuestCredential + :paramtype credentials: ~azure_arc_vmware_management_service_api.models.GuestCredential + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str :keyword http_proxy_config: HTTP Proxy configuration for the VM. - :paramtype http_proxy_config: ~azure.mgmt.connectedvmware.models.HttpProxyConfiguration + :paramtype http_proxy_config: + ~azure_arc_vmware_management_service_api.models.HttpProxyConfiguration :keyword provisioning_action: Gets or sets the guest agent provisioning action. Possible values include: "install", "uninstall", "repair". - :paramtype provisioning_action: str or ~azure.mgmt.connectedvmware.models.ProvisioningAction + :paramtype provisioning_action: str or + ~azure_arc_vmware_management_service_api.models.ProvisioningAction """ super(GuestAgent, self).__init__(**kwargs) - self.system_data = None self.uuid = None self.credentials = credentials + self.private_link_scope_resource_id = private_link_scope_resource_id self.http_proxy_config = http_proxy_config self.provisioning_action = provisioning_action self.status = None @@ -983,7 +1053,7 @@ class GuestAgentList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of GuestAgent. :vartype next_link: str :ivar value: Required. Array of GuestAgent. - :vartype value: list[~azure.mgmt.connectedvmware.models.GuestAgent] + :vartype value: list[~azure_arc_vmware_management_service_api.models.GuestAgent] """ _validation = { @@ -1006,7 +1076,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of GuestAgent. :paramtype next_link: str :keyword value: Required. Array of GuestAgent. - :paramtype value: list[~azure.mgmt.connectedvmware.models.GuestAgent] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.GuestAgent] """ super(GuestAgentList, self).__init__(**kwargs) self.next_link = next_link @@ -1014,7 +1084,7 @@ def __init__( class GuestAgentProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the guest agent settings for the virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -1022,19 +1092,25 @@ class GuestAgentProfile(msrest.serialization.Model): :vartype vm_uuid: str :ivar status: The status of the hybrid machine agent. Possible values include: "Connected", "Disconnected", "Error". - :vartype status: str or ~azure.mgmt.connectedvmware.models.StatusTypes + :vartype status: str or ~azure_arc_vmware_management_service_api.models.StatusTypes :ivar last_status_change: The time of the last status change. :vartype last_status_change: ~datetime.datetime + :ivar client_public_key: Gets or sets the Public Key provided by the client for enabling guest + management. + :vartype client_public_key: str + :ivar mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :vartype mssql_discovered: str :ivar agent_version: The hybrid machine agent full version. :vartype agent_version: str :ivar error_details: Details about the error state. - :vartype error_details: list[~azure.mgmt.connectedvmware.models.ErrorDetail] + :vartype error_details: list[~azure_arc_vmware_management_service_api.models.ErrorDetail] """ _validation = { 'vm_uuid': {'readonly': True}, 'status': {'readonly': True}, 'last_status_change': {'readonly': True}, + 'mssql_discovered': {'readonly': True}, 'agent_version': {'readonly': True}, 'error_details': {'readonly': True}, } @@ -1043,24 +1119,60 @@ class GuestAgentProfile(msrest.serialization.Model): 'vm_uuid': {'key': 'vmUuid', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, 'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'}, + 'client_public_key': {'key': 'clientPublicKey', 'type': 'str'}, + 'mssql_discovered': {'key': 'mssqlDiscovered', 'type': 'str'}, 'agent_version': {'key': 'agentVersion', 'type': 'str'}, 'error_details': {'key': 'errorDetails', 'type': '[ErrorDetail]'}, } def __init__( self, + *, + client_public_key: Optional[str] = None, **kwargs ): """ + :keyword client_public_key: Gets or sets the Public Key provided by the client for enabling + guest management. + :paramtype client_public_key: str """ super(GuestAgentProfile, self).__init__(**kwargs) self.vm_uuid = None self.status = None self.last_status_change = None + self.client_public_key = client_public_key + self.mssql_discovered = None self.agent_version = None self.error_details = None +class GuestAgentProfileUpdate(msrest.serialization.Model): + """Specifies the guest agent settings for the virtual machine. + + :ivar client_public_key: Gets or sets the Public Key provided by the client for enabling guest + management. + :vartype client_public_key: str + """ + + _attribute_map = { + 'client_public_key': {'key': 'clientPublicKey', 'type': 'str'}, + } + + def __init__( + self, + *, + client_public_key: Optional[str] = None, + **kwargs + ): + """ + :keyword client_public_key: Gets or sets the Public Key provided by the client for enabling + guest management. + :paramtype client_public_key: str + """ + super(GuestAgentProfileUpdate, self).__init__(**kwargs) + self.client_public_key = client_public_key + + class GuestCredential(msrest.serialization.Model): """Username / Password Credentials to connect to guest. @@ -1094,7 +1206,7 @@ def __init__( class HardwareProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the hardware settings for the virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -1167,9 +1279,9 @@ class Host(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -1193,10 +1305,22 @@ class Host(msrest.serialization.Model): :ivar mo_name: Gets or sets the vCenter Managed Object name for the host. :vartype mo_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str - :ivar provisioning_state: Gets or sets the provisioning state. + :ivar overall_memory_usage_gb: Gets the used physical memory on the host in GB. + :vartype overall_memory_usage_gb: str + :ivar memory_size_gb: Gets the total amount of physical memory on the host in GB. + :vartype memory_size_gb: str + :ivar overall_cpu_usage_m_hz: Gets the used CPU usage across all cores in MHz. + :vartype overall_cpu_usage_m_hz: str + :ivar cpu_mhz: Gets the max CPU usage across all cores in MHz. + :vartype cpu_mhz: str + :ivar datastore_ids: Gets the datastore ARM ids. + :vartype datastore_ids: list[str] + :ivar network_ids: Gets the network ARM ids. + :vartype network_ids: list[str] + :ivar provisioning_state: Gets the provisioning state. :vartype provisioning_state: str """ @@ -1210,6 +1334,12 @@ class Host(msrest.serialization.Model): 'mo_name': {'readonly': True}, 'statuses': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'overall_memory_usage_gb': {'readonly': True}, + 'memory_size_gb': {'readonly': True}, + 'overall_cpu_usage_m_hz': {'readonly': True}, + 'cpu_mhz': {'readonly': True}, + 'datastore_ids': {'readonly': True}, + 'network_ids': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1229,6 +1359,12 @@ class Host(msrest.serialization.Model): 'mo_name': {'key': 'properties.moName', 'type': 'str'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'overall_memory_usage_gb': {'key': 'properties.overallMemoryUsageGB', 'type': 'str'}, + 'memory_size_gb': {'key': 'properties.memorySizeGB', 'type': 'str'}, + 'overall_cpu_usage_m_hz': {'key': 'properties.overallCPUUsageMHz', 'type': 'str'}, + 'cpu_mhz': {'key': 'properties.CPUMhz', 'type': 'str'}, + 'datastore_ids': {'key': 'properties.datastoreIds', 'type': '[str]'}, + 'network_ids': {'key': 'properties.networkIds', 'type': '[str]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -1248,7 +1384,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -1279,6 +1415,12 @@ def __init__( self.mo_name = None self.statuses = None self.custom_resource_name = None + self.overall_memory_usage_gb = None + self.memory_size_gb = None + self.overall_cpu_usage_m_hz = None + self.cpu_mhz = None + self.datastore_ids = None + self.network_ids = None self.provisioning_state = None @@ -1292,7 +1434,7 @@ class HostInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -1303,7 +1445,7 @@ class HostInventoryItem(InventoryItemProperties): :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str :ivar parent: Parent host inventory resource details. - :vartype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ _validation = { @@ -1339,7 +1481,7 @@ def __init__( :keyword mo_name: Gets or sets the vCenter Managed Object name for the inventory item. :paramtype mo_name: str :keyword parent: Parent host inventory resource details. - :paramtype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ super(HostInventoryItem, self).__init__(managed_resource_id=managed_resource_id, mo_ref_id=mo_ref_id, mo_name=mo_name, **kwargs) self.inventory_type = 'Host' # type: str @@ -1354,7 +1496,7 @@ class HostsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of Hosts. :vartype next_link: str :ivar value: Required. Array of Hosts. - :vartype value: list[~azure.mgmt.connectedvmware.models.Host] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Host] """ _validation = { @@ -1377,7 +1519,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of Hosts. :paramtype next_link: str :keyword value: Required. Array of Hosts. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Host] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Host] """ super(HostsList, self).__init__(**kwargs) self.next_link = next_link @@ -1414,22 +1556,23 @@ class HybridIdentityMetadata(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar vm_id: Gets or sets the Vm Id. :vartype vm_id: str :ivar public_key: Gets or sets the Public Key. :vartype public_key: str :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.connectedvmware.models.Identity + :vartype identity: ~azure_arc_vmware_management_service_api.models.Identity :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -1468,7 +1611,6 @@ def __init__( :paramtype public_key: str """ super(HybridIdentityMetadata, self).__init__(**kwargs) - self.system_data = None self.vm_id = vm_id self.public_key = public_key self.identity = None @@ -1483,7 +1625,7 @@ class HybridIdentityMetadataList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of HybridIdentityMetadata. :vartype next_link: str :ivar value: Required. Array of HybridIdentityMetadata. - :vartype value: list[~azure.mgmt.connectedvmware.models.HybridIdentityMetadata] + :vartype value: list[~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata] """ _validation = { @@ -1506,7 +1648,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of HybridIdentityMetadata. :paramtype next_link: str :keyword value: Required. Array of HybridIdentityMetadata. - :paramtype value: list[~azure.mgmt.connectedvmware.models.HybridIdentityMetadata] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata] """ super(HybridIdentityMetadataList, self).__init__(**kwargs) self.next_link = next_link @@ -1526,7 +1668,7 @@ class Identity(msrest.serialization.Model): :vartype tenant_id: str :ivar type: Required. The type of managed service identity. Possible values include: "None", "SystemAssigned". - :vartype type: str or ~azure.mgmt.connectedvmware.models.IdentityType + :vartype type: str or ~azure_arc_vmware_management_service_api.models.IdentityType """ _validation = { @@ -1550,7 +1692,7 @@ def __init__( """ :keyword type: Required. The type of managed service identity. Possible values include: "None", "SystemAssigned". - :paramtype type: str or ~azure.mgmt.connectedvmware.models.IdentityType + :paramtype type: str or ~azure_arc_vmware_management_service_api.models.IdentityType """ super(Identity, self).__init__(**kwargs) self.principal_id = None @@ -1558,6 +1700,94 @@ def __init__( self.type = type +class InfrastructureProfile(msrest.serialization.Model): + """Specifies the vCenter infrastructure specific settings for the virtual machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar template_id: Gets or sets the ARM Id of the template resource to deploy the virtual + machine. + :vartype template_id: str + :ivar v_center_id: Gets or sets the ARM Id of the vCenter resource in which this resource pool + resides. + :vartype v_center_id: str + :ivar mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual + machine. + :vartype mo_ref_id: str + :ivar inventory_item_id: Gets or sets the inventory Item ID for the virtual machine. + :vartype inventory_item_id: str + :ivar mo_name: Gets or sets the vCenter Managed Object name for the virtual machine. + :vartype mo_name: str + :ivar folder_path: Gets or sets the folder path of the vm. + :vartype folder_path: str + :ivar instance_uuid: Gets or sets the instance uuid of the vm. + :vartype instance_uuid: str + :ivar smbios_uuid: Gets or sets the SMBIOS UUID of the vm. + :vartype smbios_uuid: str + :ivar firmware_type: Firmware type. Possible values include: "bios", "efi". + :vartype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType + :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. + :vartype custom_resource_name: str + """ + + _validation = { + 'mo_ref_id': {'readonly': True}, + 'mo_name': {'readonly': True}, + 'folder_path': {'readonly': True}, + 'instance_uuid': {'readonly': True}, + 'custom_resource_name': {'readonly': True}, + } + + _attribute_map = { + 'template_id': {'key': 'templateId', 'type': 'str'}, + 'v_center_id': {'key': 'vCenterId', 'type': 'str'}, + 'mo_ref_id': {'key': 'moRefId', 'type': 'str'}, + 'inventory_item_id': {'key': 'inventoryItemId', 'type': 'str'}, + 'mo_name': {'key': 'moName', 'type': 'str'}, + 'folder_path': {'key': 'folderPath', 'type': 'str'}, + 'instance_uuid': {'key': 'instanceUuid', 'type': 'str'}, + 'smbios_uuid': {'key': 'smbiosUuid', 'type': 'str'}, + 'firmware_type': {'key': 'firmwareType', 'type': 'str'}, + 'custom_resource_name': {'key': 'customResourceName', 'type': 'str'}, + } + + def __init__( + self, + *, + template_id: Optional[str] = None, + v_center_id: Optional[str] = None, + inventory_item_id: Optional[str] = None, + smbios_uuid: Optional[str] = None, + firmware_type: Optional[Union[str, "FirmwareType"]] = None, + **kwargs + ): + """ + :keyword template_id: Gets or sets the ARM Id of the template resource to deploy the virtual + machine. + :paramtype template_id: str + :keyword v_center_id: Gets or sets the ARM Id of the vCenter resource in which this resource + pool resides. + :paramtype v_center_id: str + :keyword inventory_item_id: Gets or sets the inventory Item ID for the virtual machine. + :paramtype inventory_item_id: str + :keyword smbios_uuid: Gets or sets the SMBIOS UUID of the vm. + :paramtype smbios_uuid: str + :keyword firmware_type: Firmware type. Possible values include: "bios", "efi". + :paramtype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType + """ + super(InfrastructureProfile, self).__init__(**kwargs) + self.template_id = template_id + self.v_center_id = v_center_id + self.mo_ref_id = None + self.inventory_item_id = inventory_item_id + self.mo_name = None + self.folder_path = None + self.instance_uuid = None + self.smbios_uuid = smbios_uuid + self.firmware_type = firmware_type + self.custom_resource_name = None + + class InventoryItem(ProxyResource): """Defines the inventory item. @@ -1565,16 +1795,17 @@ class InventoryItem(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. @@ -1582,7 +1813,7 @@ class InventoryItem(ProxyResource): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -1640,7 +1871,6 @@ def __init__( :paramtype mo_name: str """ super(InventoryItem, self).__init__(**kwargs) - self.system_data = None self.kind = kind self.inventory_type = None # type: Optional[str] self.managed_resource_id = managed_resource_id @@ -1650,17 +1880,21 @@ def __init__( class InventoryItemDetails(msrest.serialization.Model): - """Defines the resource properties. + """Describes the properties of an Inventory Item reference. :ivar inventory_item_id: Gets or sets the inventory Item ID for the resource. :vartype inventory_item_id: str :ivar mo_name: Gets or sets the vCenter Managed Object name for the resource. :vartype mo_name: str + :ivar inventory_type: The inventory type. Possible values include: "ResourcePool", + "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType """ _attribute_map = { 'inventory_item_id': {'key': 'inventoryItemId', 'type': 'str'}, 'mo_name': {'key': 'moName', 'type': 'str'}, + 'inventory_type': {'key': 'inventoryType', 'type': 'str'}, } def __init__( @@ -1668,6 +1902,7 @@ def __init__( *, inventory_item_id: Optional[str] = None, mo_name: Optional[str] = None, + inventory_type: Optional[Union[str, "InventoryType"]] = None, **kwargs ): """ @@ -1675,10 +1910,14 @@ def __init__( :paramtype inventory_item_id: str :keyword mo_name: Gets or sets the vCenter Managed Object name for the resource. :paramtype mo_name: str + :keyword inventory_type: The inventory type. Possible values include: "ResourcePool", + "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". + :paramtype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType """ super(InventoryItemDetails, self).__init__(**kwargs) self.inventory_item_id = inventory_item_id self.mo_name = mo_name + self.inventory_type = inventory_type class InventoryItemsList(msrest.serialization.Model): @@ -1689,7 +1928,7 @@ class InventoryItemsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of InventoryItems. :vartype next_link: str :ivar value: Required. Array of InventoryItems. - :vartype value: list[~azure.mgmt.connectedvmware.models.InventoryItem] + :vartype value: list[~azure_arc_vmware_management_service_api.models.InventoryItem] """ _validation = { @@ -1712,7 +1951,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of InventoryItems. :paramtype next_link: str :keyword value: Required. Array of InventoryItems. - :paramtype value: list[~azure.mgmt.connectedvmware.models.InventoryItem] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.InventoryItem] """ super(InventoryItemsList, self).__init__(**kwargs) self.next_link = next_link @@ -1725,7 +1964,7 @@ class LinuxParameters(msrest.serialization.Model): :ivar classifications_to_include: The update classifications to select when installing patches for Linux. :vartype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationLinux] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationLinux] :ivar package_name_masks_to_include: packages to include in the patch operation. Format: packageName_packageVersion. :vartype package_name_masks_to_include: list[str] @@ -1752,7 +1991,7 @@ def __init__( :keyword classifications_to_include: The update classifications to select when installing patches for Linux. :paramtype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationLinux] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationLinux] :keyword package_name_masks_to_include: packages to include in the patch operation. Format: packageName_packageVersion. :paramtype package_name_masks_to_include: list[str] @@ -1774,7 +2013,7 @@ class MachineExtension(msrest.serialization.Model): :ivar location: Gets or sets the location. :vartype location: str :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -1809,7 +2048,7 @@ class MachineExtension(msrest.serialization.Model): :vartype provisioning_state: str :ivar instance_view: The machine extension instance view. :vartype instance_view: - ~azure.mgmt.connectedvmware.models.MachineExtensionPropertiesInstanceView + ~azure_arc_vmware_management_service_api.models.MachineExtensionPropertiesInstanceView """ _validation = { @@ -1884,7 +2123,7 @@ def __init__( :paramtype protected_settings: any :keyword instance_view: The machine extension instance view. :paramtype instance_view: - ~azure.mgmt.connectedvmware.models.MachineExtensionPropertiesInstanceView + ~azure_arc_vmware_management_service_api.models.MachineExtensionPropertiesInstanceView """ super(MachineExtension, self).__init__(**kwargs) self.location = location @@ -1917,7 +2156,8 @@ class MachineExtensionInstanceView(msrest.serialization.Model): :ivar type_handler_version: Specifies the version of the script handler. :vartype type_handler_version: str :ivar status: Instance view status. - :vartype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :vartype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ _validation = { @@ -1941,7 +2181,8 @@ def __init__( ): """ :keyword status: Instance view status. - :paramtype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :paramtype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ super(MachineExtensionInstanceView, self).__init__(**kwargs) self.name = None @@ -1958,7 +2199,7 @@ class MachineExtensionInstanceViewStatus(msrest.serialization.Model): :ivar code: The status code. :vartype code: str :ivar level: The level code. Possible values include: "Info", "Warning", "Error". - :vartype level: str or ~azure.mgmt.connectedvmware.models.StatusLevelTypes + :vartype level: str or ~azure_arc_vmware_management_service_api.models.StatusLevelTypes :ivar display_status: The short localizable label for the status. :vartype display_status: str :ivar message: The detailed status message, including for alerts and error messages. @@ -2009,7 +2250,8 @@ class MachineExtensionPropertiesInstanceView(MachineExtensionInstanceView): :ivar type_handler_version: Specifies the version of the script handler. :vartype type_handler_version: str :ivar status: Instance view status. - :vartype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :vartype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ _validation = { @@ -2033,7 +2275,8 @@ def __init__( ): """ :keyword status: Instance view status. - :paramtype status: ~azure.mgmt.connectedvmware.models.MachineExtensionInstanceViewStatus + :paramtype status: + ~azure_arc_vmware_management_service_api.models.MachineExtensionInstanceViewStatus """ super(MachineExtensionPropertiesInstanceView, self).__init__(status=status, **kwargs) @@ -2042,7 +2285,7 @@ class MachineExtensionsListResult(msrest.serialization.Model): """Describes the Machine Extensions List Result. :ivar value: The list of extensions. - :vartype value: list[~azure.mgmt.connectedvmware.models.MachineExtension] + :vartype value: list[~azure_arc_vmware_management_service_api.models.MachineExtension] :ivar next_link: The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. :vartype next_link: str @@ -2062,7 +2305,7 @@ def __init__( ): """ :keyword value: The list of extensions. - :paramtype value: list[~azure.mgmt.connectedvmware.models.MachineExtension] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.MachineExtension] :keyword next_link: The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. :paramtype next_link: str @@ -2187,6 +2430,33 @@ def __init__( self.protected_settings = protected_settings +class MachineExtensionUpgrade(msrest.serialization.Model): + """Describes the Machine Extension Upgrade Properties. + + :ivar extension_targets: Describes the Extension Target Properties. + :vartype extension_targets: dict[str, + ~azure_arc_vmware_management_service_api.models.ExtensionTargetProperties] + """ + + _attribute_map = { + 'extension_targets': {'key': 'extensionTargets', 'type': '{ExtensionTargetProperties}'}, + } + + def __init__( + self, + *, + extension_targets: Optional[Dict[str, "ExtensionTargetProperties"]] = None, + **kwargs + ): + """ + :keyword extension_targets: Describes the Extension Target Properties. + :paramtype extension_targets: dict[str, + ~azure_arc_vmware_management_service_api.models.ExtensionTargetProperties] + """ + super(MachineExtensionUpgrade, self).__init__(**kwargs) + self.extension_targets = extension_targets + + class NetworkInterface(msrest.serialization.Model): """Network Interface model. @@ -2206,10 +2476,11 @@ class NetworkInterface(msrest.serialization.Model): :vartype network_id: str :ivar nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :vartype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :vartype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :ivar power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :vartype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :vartype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :ivar network_mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual network that the nic is connected to. @@ -2220,7 +2491,7 @@ class NetworkInterface(msrest.serialization.Model): :ivar device_key: Gets or sets the device key value. :vartype device_key: int :ivar ip_settings: Gets or sets the ipsettings. - :vartype ip_settings: ~azure.mgmt.connectedvmware.models.NicIPSettings + :vartype ip_settings: ~azure_arc_vmware_management_service_api.models.NicIPSettings """ _validation = { @@ -2264,14 +2535,15 @@ def __init__( :paramtype network_id: str :keyword nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :paramtype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :paramtype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :keyword power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :paramtype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :paramtype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :keyword device_key: Gets or sets the device key value. :paramtype device_key: int :keyword ip_settings: Gets or sets the ipsettings. - :paramtype ip_settings: ~azure.mgmt.connectedvmware.models.NicIPSettings + :paramtype ip_settings: ~azure_arc_vmware_management_service_api.models.NicIPSettings """ super(NetworkInterface, self).__init__(**kwargs) self.name = name @@ -2297,10 +2569,11 @@ class NetworkInterfaceUpdate(msrest.serialization.Model): :vartype network_id: str :ivar nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :vartype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :vartype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :ivar power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :vartype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :vartype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :ivar device_key: Gets or sets the device key value. :vartype device_key: int """ @@ -2331,10 +2604,11 @@ def __init__( :paramtype network_id: str :keyword nic_type: NIC type. Possible values include: "vmxnet3", "vmxnet2", "vmxnet", "e1000", "e1000e", "pcnet32". - :paramtype nic_type: str or ~azure.mgmt.connectedvmware.models.NICType + :paramtype nic_type: str or ~azure_arc_vmware_management_service_api.models.NICType :keyword power_on_boot: Gets or sets the power on boot. Possible values include: "enabled", "disabled". - :paramtype power_on_boot: str or ~azure.mgmt.connectedvmware.models.PowerOnBootOption + :paramtype power_on_boot: str or + ~azure_arc_vmware_management_service_api.models.PowerOnBootOption :keyword device_key: Gets or sets the device key value. :paramtype device_key: int """ @@ -2347,11 +2621,12 @@ def __init__( class NetworkProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the network interfaces of the virtual machine. :ivar network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :vartype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterface] + :vartype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterface] """ _attribute_map = { @@ -2367,18 +2642,20 @@ def __init__( """ :keyword network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :paramtype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterface] + :paramtype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterface] """ super(NetworkProfile, self).__init__(**kwargs) self.network_interfaces = network_interfaces class NetworkProfileUpdate(msrest.serialization.Model): - """Defines the update resource properties. + """Specifies the network interfaces of the virtual machine. :ivar network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :vartype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterfaceUpdate] + :vartype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterfaceUpdate] """ _attribute_map = { @@ -2394,7 +2671,8 @@ def __init__( """ :keyword network_interfaces: Gets or sets the list of network interfaces associated with the virtual machine. - :paramtype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterfaceUpdate] + :paramtype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterfaceUpdate] """ super(NetworkProfileUpdate, self).__init__(**kwargs) self.network_interfaces = network_interfaces @@ -2444,7 +2722,8 @@ class NicIPSettings(msrest.serialization.Model): :ivar allocation_method: Gets or sets the nic allocation method. Possible values include: "unset", "dynamic", "static", "linklayer", "random", "other". - :vartype allocation_method: str or ~azure.mgmt.connectedvmware.models.IPAddressAllocationMethod + :vartype allocation_method: str or + ~azure_arc_vmware_management_service_api.models.IPAddressAllocationMethod :ivar dns_servers: Gets or sets the dns servers. :vartype dns_servers: list[str] :ivar gateway: Gets or sets the gateway. @@ -2459,7 +2738,8 @@ class NicIPSettings(msrest.serialization.Model): :vartype secondary_wins_server: str :ivar ip_address_info: Gets or sets the IP address information being reported for this NIC. This contains the same IPv4 information above plus IPV6 information. - :vartype ip_address_info: list[~azure.mgmt.connectedvmware.models.NicIPAddressSettings] + :vartype ip_address_info: + list[~azure_arc_vmware_management_service_api.models.NicIPAddressSettings] """ _validation = { @@ -2493,7 +2773,7 @@ def __init__( :keyword allocation_method: Gets or sets the nic allocation method. Possible values include: "unset", "dynamic", "static", "linklayer", "random", "other". :paramtype allocation_method: str or - ~azure.mgmt.connectedvmware.models.IPAddressAllocationMethod + ~azure_arc_vmware_management_service_api.models.IPAddressAllocationMethod :keyword dns_servers: Gets or sets the dns servers. :paramtype dns_servers: list[str] :keyword gateway: Gets or sets the gateway. @@ -2522,7 +2802,7 @@ class Operation(msrest.serialization.Model): :ivar is_data_action: Indicates whether the operation is data action or not. :vartype is_data_action: bool :ivar display: Properties of the operation. - :vartype display: ~azure.mgmt.connectedvmware.models.OperationDisplay + :vartype display: ~azure_arc_vmware_management_service_api.models.OperationDisplay """ _attribute_map = { @@ -2545,7 +2825,7 @@ def __init__( :keyword is_data_action: Indicates whether the operation is data action or not. :paramtype is_data_action: bool :keyword display: Properties of the operation. - :paramtype display: ~azure.mgmt.connectedvmware.models.OperationDisplay + :paramtype display: ~azure_arc_vmware_management_service_api.models.OperationDisplay """ super(Operation, self).__init__(**kwargs) self.name = name @@ -2607,7 +2887,7 @@ class OperationsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of operations. :vartype next_link: str :ivar value: Required. Array of operations. - :vartype value: list[~azure.mgmt.connectedvmware.models.Operation] + :vartype value: list[~azure_arc_vmware_management_service_api.models.Operation] """ _validation = { @@ -2630,7 +2910,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of operations. :paramtype next_link: str :keyword value: Required. Array of operations. - :paramtype value: list[~azure.mgmt.connectedvmware.models.Operation] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.Operation] """ super(OperationsList, self).__init__(**kwargs) self.next_link = next_link @@ -2638,7 +2918,7 @@ def __init__( class OsProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the operating system settings for the virtual machine. Variables are only populated by the server, and will be ignored when sending a request. @@ -2655,7 +2935,7 @@ class OsProfile(msrest.serialization.Model): :vartype allow_extension_operations: bool :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str :ivar tools_running_status: Gets or sets the current running status of VMware Tools running in @@ -2668,9 +2948,10 @@ class OsProfile(msrest.serialization.Model): :vartype tools_version: str :ivar windows_configuration: Specifies the windows configuration for update management. :vartype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileWindowsConfiguration :ivar linux_configuration: Specifies the linux configuration for update management. - :vartype linux_configuration: ~azure.mgmt.connectedvmware.models.OsProfileLinuxConfiguration + :vartype linux_configuration: + ~azure_arc_vmware_management_service_api.models.OsProfileLinuxConfiguration """ _validation = { @@ -2719,12 +3000,13 @@ def __init__( :paramtype guest_id: str :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :paramtype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :keyword windows_configuration: Specifies the windows configuration for update management. :paramtype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileWindowsConfiguration :keyword linux_configuration: Specifies the linux configuration for update management. - :paramtype linux_configuration: ~azure.mgmt.connectedvmware.models.OsProfileLinuxConfiguration + :paramtype linux_configuration: + ~azure_arc_vmware_management_service_api.models.OsProfileLinuxConfiguration """ super(OsProfile, self).__init__(**kwargs) self.computer_name = computer_name @@ -2741,6 +3023,88 @@ def __init__( self.linux_configuration = linux_configuration +class OsProfileForVMInstance(msrest.serialization.Model): + """Specifies the operating system settings for the virtual machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar computer_name: Gets or sets computer name. + :vartype computer_name: str + :ivar admin_username: Gets or sets administrator username. + :vartype admin_username: str + :ivar admin_password: Sets administrator password. + :vartype admin_password: str + :ivar guest_id: Gets or sets the guestId. + :vartype guest_id: str + :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", + "Other". + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType + :ivar os_sku: Gets or sets os sku. + :vartype os_sku: str + :ivar tools_running_status: Gets or sets the current running status of VMware Tools running in + the guest operating system. + :vartype tools_running_status: str + :ivar tools_version_status: Gets or sets the current version status of VMware Tools installed + in the guest operating system. + :vartype tools_version_status: str + :ivar tools_version: Gets or sets the current version of VMware Tools. + :vartype tools_version: str + """ + + _validation = { + 'os_sku': {'readonly': True}, + 'tools_running_status': {'readonly': True}, + 'tools_version_status': {'readonly': True}, + 'tools_version': {'readonly': True}, + } + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'guest_id': {'key': 'guestId', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'os_sku': {'key': 'osSku', 'type': 'str'}, + 'tools_running_status': {'key': 'toolsRunningStatus', 'type': 'str'}, + 'tools_version_status': {'key': 'toolsVersionStatus', 'type': 'str'}, + 'tools_version': {'key': 'toolsVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + computer_name: Optional[str] = None, + admin_username: Optional[str] = None, + admin_password: Optional[str] = None, + guest_id: Optional[str] = None, + os_type: Optional[Union[str, "OsType"]] = None, + **kwargs + ): + """ + :keyword computer_name: Gets or sets computer name. + :paramtype computer_name: str + :keyword admin_username: Gets or sets administrator username. + :paramtype admin_username: str + :keyword admin_password: Sets administrator password. + :paramtype admin_password: str + :keyword guest_id: Gets or sets the guestId. + :paramtype guest_id: str + :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", + "Other". + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType + """ + super(OsProfileForVMInstance, self).__init__(**kwargs) + self.computer_name = computer_name + self.admin_username = admin_username + self.admin_password = admin_password + self.guest_id = guest_id + self.os_type = os_type + self.os_sku = None + self.tools_running_status = None + self.tools_version_status = None + self.tools_version = None + + class OsProfileLinuxConfiguration(msrest.serialization.Model): """Specifies the linux configuration for update management. @@ -2774,14 +3138,14 @@ def __init__( class OsProfileUpdate(msrest.serialization.Model): - """Defines the os update properties. + """Specifies the operating system settings for the virtual machine. :ivar windows_configuration: Specifies the windows configuration for update management. :vartype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateWindowsConfiguration :ivar linux_configuration: Specifies the linux configuration for update management. :vartype linux_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateLinuxConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateLinuxConfiguration """ _attribute_map = { @@ -2799,10 +3163,10 @@ def __init__( """ :keyword windows_configuration: Specifies the windows configuration for update management. :paramtype windows_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateWindowsConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateWindowsConfiguration :keyword linux_configuration: Specifies the linux configuration for update management. :paramtype linux_configuration: - ~azure.mgmt.connectedvmware.models.OsProfileUpdateLinuxConfiguration + ~azure_arc_vmware_management_service_api.models.OsProfileUpdateLinuxConfiguration """ super(OsProfileUpdate, self).__init__(**kwargs) self.windows_configuration = windows_configuration @@ -2906,7 +3270,7 @@ def __init__( class PlacementProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the compute and storage placement settings for the virtual machine. :ivar resource_pool_id: Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. @@ -2969,9 +3333,9 @@ class ResourcePool(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -3018,11 +3382,23 @@ class ResourcePool(msrest.serialization.Model): :ivar mem_limit_mb: Gets or sets MemLimitMB specifies a memory usage limit in megabytes. Utilization will not exceed the specified limit even if there are available resources. :vartype mem_limit_mb: long + :ivar mem_overall_usage_gb: Gets the used physical memory on the pool in GB. + :vartype mem_overall_usage_gb: long + :ivar mem_capacity_gb: Gets the total amount of physical memory on the pool in GB. + :vartype mem_capacity_gb: long + :ivar cpu_overall_usage_m_hz: Gets the used CPU usage across all cores on the pool in MHz. + :vartype cpu_overall_usage_m_hz: long + :ivar cpu_capacity_m_hz: Gets the max CPU usage across all cores on the pool in MHz. + :vartype cpu_capacity_m_hz: long :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str + :ivar datastore_ids: Gets the datastore ARM ids. + :vartype datastore_ids: list[str] + :ivar network_ids: Gets the network ARM ids. + :vartype network_ids: list[str] :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] - :ivar provisioning_state: Gets or sets the provisioning state. + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] + :ivar provisioning_state: Gets the provisioning state. :vartype provisioning_state: str """ @@ -3040,7 +3416,13 @@ class ResourcePool(msrest.serialization.Model): 'mem_shares_level': {'readonly': True}, 'mem_reservation_mb': {'readonly': True}, 'mem_limit_mb': {'readonly': True}, + 'mem_overall_usage_gb': {'readonly': True}, + 'mem_capacity_gb': {'readonly': True}, + 'cpu_overall_usage_m_hz': {'readonly': True}, + 'cpu_capacity_m_hz': {'readonly': True}, 'custom_resource_name': {'readonly': True}, + 'datastore_ids': {'readonly': True}, + 'network_ids': {'readonly': True}, 'statuses': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -3065,7 +3447,13 @@ class ResourcePool(msrest.serialization.Model): 'mem_shares_level': {'key': 'properties.memSharesLevel', 'type': 'str'}, 'mem_reservation_mb': {'key': 'properties.memReservationMB', 'type': 'long'}, 'mem_limit_mb': {'key': 'properties.memLimitMB', 'type': 'long'}, + 'mem_overall_usage_gb': {'key': 'properties.memOverallUsageGB', 'type': 'long'}, + 'mem_capacity_gb': {'key': 'properties.memCapacityGB', 'type': 'long'}, + 'cpu_overall_usage_m_hz': {'key': 'properties.CPUOverallUsageMHz', 'type': 'long'}, + 'cpu_capacity_m_hz': {'key': 'properties.CPUCapacityMHz', 'type': 'long'}, 'custom_resource_name': {'key': 'properties.customResourceName', 'type': 'str'}, + 'datastore_ids': {'key': 'properties.datastoreIds', 'type': '[str]'}, + 'network_ids': {'key': 'properties.networkIds', 'type': '[str]'}, 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -3086,7 +3474,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -3122,7 +3510,13 @@ def __init__( self.mem_shares_level = None self.mem_reservation_mb = None self.mem_limit_mb = None + self.mem_overall_usage_gb = None + self.mem_capacity_gb = None + self.cpu_overall_usage_m_hz = None + self.cpu_capacity_m_hz = None self.custom_resource_name = None + self.datastore_ids = None + self.network_ids = None self.statuses = None self.provisioning_state = None @@ -3137,7 +3531,7 @@ class ResourcePoolInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -3148,7 +3542,7 @@ class ResourcePoolInventoryItem(InventoryItemProperties): :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str :ivar parent: Parent resourcePool inventory resource details. - :vartype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ _validation = { @@ -3184,7 +3578,7 @@ def __init__( :keyword mo_name: Gets or sets the vCenter Managed Object name for the inventory item. :paramtype mo_name: str :keyword parent: Parent resourcePool inventory resource details. - :paramtype parent: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype parent: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails """ super(ResourcePoolInventoryItem, self).__init__(managed_resource_id=managed_resource_id, mo_ref_id=mo_ref_id, mo_name=mo_name, **kwargs) self.inventory_type = 'ResourcePool' # type: str @@ -3199,7 +3593,7 @@ class ResourcePoolsList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of ResourcePools. :vartype next_link: str :ivar value: Required. Array of ResourcePools. - :vartype value: list[~azure.mgmt.connectedvmware.models.ResourcePool] + :vartype value: list[~azure_arc_vmware_management_service_api.models.ResourcePool] """ _validation = { @@ -3222,7 +3616,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of ResourcePools. :paramtype next_link: str :keyword value: Required. Array of ResourcePools. - :paramtype value: list[~azure.mgmt.connectedvmware.models.ResourcePool] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.ResourcePool] """ super(ResourcePoolsList, self).__init__(**kwargs) self.next_link = next_link @@ -3286,7 +3680,7 @@ class SecurityProfile(msrest.serialization.Model): :ivar uefi_settings: Specifies the security settings like secure boot used while creating the virtual machine. - :vartype uefi_settings: ~azure.mgmt.connectedvmware.models.UefiSettings + :vartype uefi_settings: ~azure_arc_vmware_management_service_api.models.UefiSettings """ _attribute_map = { @@ -3302,7 +3696,7 @@ def __init__( """ :keyword uefi_settings: Specifies the security settings like secure boot used while creating the virtual machine. - :paramtype uefi_settings: ~azure.mgmt.connectedvmware.models.UefiSettings + :paramtype uefi_settings: ~azure_arc_vmware_management_service_api.models.UefiSettings """ super(SecurityProfile, self).__init__(**kwargs) self.uefi_settings = uefi_settings @@ -3338,15 +3732,16 @@ def __init__( class StorageProfile(msrest.serialization.Model): - """Defines the resource properties. + """Specifies the storage settings for the virtual machine disks. Variables are only populated by the server, and will be ignored when sending a request. :ivar disks: Gets or sets the list of virtual disks associated with the virtual machine. - :vartype disks: list[~azure.mgmt.connectedvmware.models.VirtualDisk] + :vartype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDisk] :ivar scsi_controllers: Gets or sets the list of virtual SCSI controllers associated with the virtual machine. - :vartype scsi_controllers: list[~azure.mgmt.connectedvmware.models.VirtualSCSIController] + :vartype scsi_controllers: + list[~azure_arc_vmware_management_service_api.models.VirtualSCSIController] """ _validation = { @@ -3366,7 +3761,7 @@ def __init__( ): """ :keyword disks: Gets or sets the list of virtual disks associated with the virtual machine. - :paramtype disks: list[~azure.mgmt.connectedvmware.models.VirtualDisk] + :paramtype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDisk] """ super(StorageProfile, self).__init__(**kwargs) self.disks = disks @@ -3374,10 +3769,10 @@ def __init__( class StorageProfileUpdate(msrest.serialization.Model): - """Defines the resource update properties. + """Specifies the storage settings for the virtual machine disks. :ivar disks: Gets or sets the list of virtual disks associated with the virtual machine. - :vartype disks: list[~azure.mgmt.connectedvmware.models.VirtualDiskUpdate] + :vartype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDiskUpdate] """ _attribute_map = { @@ -3392,7 +3787,7 @@ def __init__( ): """ :keyword disks: Gets or sets the list of virtual disks associated with the virtual machine. - :paramtype disks: list[~azure.mgmt.connectedvmware.models.VirtualDiskUpdate] + :paramtype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDiskUpdate] """ super(StorageProfileUpdate, self).__init__(**kwargs) self.disks = disks @@ -3405,14 +3800,15 @@ class SystemData(msrest.serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :vartype created_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :vartype created_by_type: str or ~azure_arc_vmware_management_service_api.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. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :vartype last_modified_by_type: str or + ~azure_arc_vmware_management_service_api.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -3442,14 +3838,16 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :paramtype created_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :paramtype created_by_type: str or + ~azure_arc_vmware_management_service_api.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.connectedvmware.models.CreatedByType + :paramtype last_modified_by_type: str or + ~azure_arc_vmware_management_service_api.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -3499,9 +3897,9 @@ class VCenter(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -3529,9 +3927,9 @@ class VCenter(msrest.serialization.Model): :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar credentials: Username / Password Credentials to connect to vcenter. - :vartype credentials: ~azure.mgmt.connectedvmware.models.VICredential + :vartype credentials: ~azure_arc_vmware_management_service_api.models.VICredential :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -3590,7 +3988,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -3602,7 +4000,7 @@ def __init__( :keyword port: Gets or sets the port of the vCenter. :paramtype port: int :keyword credentials: Username / Password Credentials to connect to vcenter. - :paramtype credentials: ~azure.mgmt.connectedvmware.models.VICredential + :paramtype credentials: ~azure_arc_vmware_management_service_api.models.VICredential """ super(VCenter, self).__init__(**kwargs) self.location = location @@ -3633,7 +4031,7 @@ class VCentersList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VCenters. :vartype next_link: str :ivar value: Required. Array of VCenters. - :vartype value: list[~azure.mgmt.connectedvmware.models.VCenter] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VCenter] """ _validation = { @@ -3656,7 +4054,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VCenters. :paramtype next_link: str :keyword value: Required. Array of VCenters. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VCenter] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VCenter] """ super(VCentersList, self).__init__(**kwargs) self.next_link = next_link @@ -3712,7 +4110,7 @@ class VirtualDisk(msrest.serialization.Model): :vartype device_key: int :ivar disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :vartype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :vartype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :ivar controller_key: Gets or sets the controller id. :vartype controller_key: int :ivar unit_number: Gets or sets the unit number of the disk on the controller. @@ -3721,7 +4119,7 @@ class VirtualDisk(msrest.serialization.Model): :vartype device_name: str :ivar disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :vartype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :vartype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ _validation = { @@ -3764,7 +4162,7 @@ def __init__( :paramtype device_key: int :keyword disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :paramtype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :paramtype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :keyword controller_key: Gets or sets the controller id. :paramtype controller_key: int :keyword unit_number: Gets or sets the unit number of the disk on the controller. @@ -3773,7 +4171,7 @@ def __init__( :paramtype device_name: str :keyword disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :paramtype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :paramtype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ super(VirtualDisk, self).__init__(**kwargs) self.name = name @@ -3799,7 +4197,7 @@ class VirtualDiskUpdate(msrest.serialization.Model): :vartype device_key: int :ivar disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :vartype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :vartype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :ivar controller_key: Gets or sets the controller id. :vartype controller_key: int :ivar unit_number: Gets or sets the unit number of the disk on the controller. @@ -3808,7 +4206,7 @@ class VirtualDiskUpdate(msrest.serialization.Model): :vartype device_name: str :ivar disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :vartype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :vartype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ _attribute_map = { @@ -3844,7 +4242,7 @@ def __init__( :paramtype device_key: int :keyword disk_mode: Gets or sets the disk mode. Possible values include: "persistent", "independent_persistent", "independent_nonpersistent". - :paramtype disk_mode: str or ~azure.mgmt.connectedvmware.models.DiskMode + :paramtype disk_mode: str or ~azure_arc_vmware_management_service_api.models.DiskMode :keyword controller_key: Gets or sets the controller id. :paramtype controller_key: int :keyword unit_number: Gets or sets the unit number of the disk on the controller. @@ -3853,7 +4251,7 @@ def __init__( :paramtype device_name: str :keyword disk_type: Gets or sets the disk backing type. Possible values include: "flat", "pmem", "rawphysical", "rawvirtual", "sparse", "sesparse", "unknown". - :paramtype disk_type: str or ~azure.mgmt.connectedvmware.models.DiskType + :paramtype disk_type: str or ~azure_arc_vmware_management_service_api.models.DiskType """ super(VirtualDiskUpdate, self).__init__(**kwargs) self.name = name @@ -3876,9 +4274,9 @@ class VirtualMachine(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -3892,7 +4290,7 @@ class VirtualMachine(msrest.serialization.Model): the resource provider must validate and persist this value. :vartype kind: str :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.connectedvmware.models.Identity + :vartype identity: ~azure_arc_vmware_management_service_api.models.Identity :ivar resource_pool_id: Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. @@ -3904,19 +4302,19 @@ class VirtualMachine(msrest.serialization.Model): resides. :vartype v_center_id: str :ivar placement_profile: Placement properties. - :vartype placement_profile: ~azure.mgmt.connectedvmware.models.PlacementProfile + :vartype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile :ivar os_profile: OS properties. - :vartype os_profile: ~azure.mgmt.connectedvmware.models.OsProfile + :vartype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfile :ivar hardware_profile: Hardware properties. - :vartype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :ivar network_profile: Network properties. - :vartype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfile + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile :ivar storage_profile: Storage properties. - :vartype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfile + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile :ivar guest_agent_profile: Guest agent status properties. - :vartype guest_agent_profile: ~azure.mgmt.connectedvmware.models.GuestAgentProfile + :vartype guest_agent_profile: ~azure_arc_vmware_management_service_api.models.GuestAgentProfile :ivar security_profile: Gets the security profile. - :vartype security_profile: ~azure.mgmt.connectedvmware.models.SecurityProfile + :vartype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile :ivar mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. :vartype mo_ref_id: str @@ -3931,7 +4329,7 @@ class VirtualMachine(msrest.serialization.Model): :ivar smbios_uuid: Gets or sets the SMBIOS UUID of the vm. :vartype smbios_uuid: str :ivar firmware_type: Firmware type. Possible values include: "bios", "efi". - :vartype firmware_type: str or ~azure.mgmt.connectedvmware.models.FirmwareType + :vartype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType :ivar power_state: Gets the power state of the virtual machine. :vartype power_state: str :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. @@ -3939,7 +4337,7 @@ class VirtualMachine(msrest.serialization.Model): :ivar uuid: Gets or sets a unique identifier for this resource. :vartype uuid: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str :ivar vm_id: Gets or sets a unique identifier for the vm resource. @@ -4026,7 +4424,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -4034,7 +4432,7 @@ def __init__( the resource provider must validate and persist this value. :paramtype kind: str :keyword identity: The identity of the resource. - :paramtype identity: ~azure.mgmt.connectedvmware.models.Identity + :paramtype identity: ~azure_arc_vmware_management_service_api.models.Identity :keyword resource_pool_id: Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy. @@ -4046,19 +4444,20 @@ def __init__( pool resides. :paramtype v_center_id: str :keyword placement_profile: Placement properties. - :paramtype placement_profile: ~azure.mgmt.connectedvmware.models.PlacementProfile + :paramtype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile :keyword os_profile: OS properties. - :paramtype os_profile: ~azure.mgmt.connectedvmware.models.OsProfile + :paramtype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfile :keyword hardware_profile: Hardware properties. - :paramtype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :keyword network_profile: Network properties. - :paramtype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfile + :paramtype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile :keyword storage_profile: Storage properties. - :paramtype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfile + :paramtype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile :keyword guest_agent_profile: Guest agent status properties. - :paramtype guest_agent_profile: ~azure.mgmt.connectedvmware.models.GuestAgentProfile + :paramtype guest_agent_profile: + ~azure_arc_vmware_management_service_api.models.GuestAgentProfile :keyword security_profile: Gets the security profile. - :paramtype security_profile: ~azure.mgmt.connectedvmware.models.SecurityProfile + :paramtype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile :keyword mo_ref_id: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine. :paramtype mo_ref_id: str @@ -4067,7 +4466,7 @@ def __init__( :keyword smbios_uuid: Gets or sets the SMBIOS UUID of the vm. :paramtype smbios_uuid: str :keyword firmware_type: Firmware type. Possible values include: "bios", "efi". - :paramtype firmware_type: str or ~azure.mgmt.connectedvmware.models.FirmwareType + :paramtype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType """ super(VirtualMachine, self).__init__(**kwargs) self.location = location @@ -4113,7 +4512,7 @@ class VirtualMachineAssessPatchesResult(msrest.serialization.Model): until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", "Succeeded", "CompletedWithWarnings". - :vartype status: str or ~azure.mgmt.connectedvmware.models.PatchOperationStatus + :vartype status: str or ~azure_arc_vmware_management_service_api.models.PatchOperationStatus :ivar assessment_activity_id: The activity ID of the operation that produced this result. :vartype assessment_activity_id: str :ivar reboot_pending: The overall reboot status of the VM. It will be true when partially @@ -4123,23 +4522,25 @@ class VirtualMachineAssessPatchesResult(msrest.serialization.Model): :ivar available_patch_count_by_classification: Summarization of patches available for installation on the machine by classification. :vartype available_patch_count_by_classification: - ~azure.mgmt.connectedvmware.models.AvailablePatchCountByClassification + ~azure_arc_vmware_management_service_api.models.AvailablePatchCountByClassification :ivar start_date_time: The UTC timestamp when the operation began. :vartype start_date_time: ~datetime.datetime :ivar last_modified_date_time: The UTC timestamp when the operation finished. :vartype last_modified_date_time: ~datetime.datetime :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values include: "User", "Platform". - :vartype started_by: str or ~azure.mgmt.connectedvmware.models.PatchOperationStartedBy + :vartype started_by: str or + ~azure_arc_vmware_management_service_api.models.PatchOperationStartedBy :ivar patch_service_used: Specifies the patch service used for the operation. Possible values include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". - :vartype patch_service_used: str or ~azure.mgmt.connectedvmware.models.PatchServiceUsed + :vartype patch_service_used: str or + ~azure_arc_vmware_management_service_api.models.PatchServiceUsed :ivar os_type: The operating system type of the machine. Possible values include: "Windows", "Linux". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsTypeUM + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsTypeUM :ivar error_details: The errors that were encountered during execution of the operation. The details array contains the list of them. - :vartype error_details: ~azure.mgmt.connectedvmware.models.ErrorDetail + :vartype error_details: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ _validation = { @@ -4177,7 +4578,7 @@ def __init__( :keyword available_patch_count_by_classification: Summarization of patches available for installation on the machine by classification. :paramtype available_patch_count_by_classification: - ~azure.mgmt.connectedvmware.models.AvailablePatchCountByClassification + ~azure_arc_vmware_management_service_api.models.AvailablePatchCountByClassification """ super(VirtualMachineAssessPatchesResult, self).__init__(**kwargs) self.status = None @@ -4202,13 +4603,14 @@ class VirtualMachineInstallPatchesParameters(msrest.serialization.Model): :vartype maximum_duration: str :ivar reboot_setting: Required. Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: "IfRequired", "Never", "Always". - :vartype reboot_setting: str or ~azure.mgmt.connectedvmware.models.VMGuestPatchRebootSetting + :vartype reboot_setting: str or + ~azure_arc_vmware_management_service_api.models.VMGuestPatchRebootSetting :ivar windows_parameters: Input for InstallPatches on a Windows VM, as directly received by the API. - :vartype windows_parameters: ~azure.mgmt.connectedvmware.models.WindowsParameters + :vartype windows_parameters: ~azure_arc_vmware_management_service_api.models.WindowsParameters :ivar linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the API. - :vartype linux_parameters: ~azure.mgmt.connectedvmware.models.LinuxParameters + :vartype linux_parameters: ~azure_arc_vmware_management_service_api.models.LinuxParameters """ _validation = { @@ -4238,13 +4640,15 @@ def __init__( :paramtype maximum_duration: str :keyword reboot_setting: Required. Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: "IfRequired", "Never", "Always". - :paramtype reboot_setting: str or ~azure.mgmt.connectedvmware.models.VMGuestPatchRebootSetting + :paramtype reboot_setting: str or + ~azure_arc_vmware_management_service_api.models.VMGuestPatchRebootSetting :keyword windows_parameters: Input for InstallPatches on a Windows VM, as directly received by the API. - :paramtype windows_parameters: ~azure.mgmt.connectedvmware.models.WindowsParameters + :paramtype windows_parameters: + ~azure_arc_vmware_management_service_api.models.WindowsParameters :keyword linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the API. - :paramtype linux_parameters: ~azure.mgmt.connectedvmware.models.LinuxParameters + :paramtype linux_parameters: ~azure_arc_vmware_management_service_api.models.LinuxParameters """ super(VirtualMachineInstallPatchesParameters, self).__init__(**kwargs) self.maximum_duration = maximum_duration @@ -4262,12 +4666,13 @@ class VirtualMachineInstallPatchesResult(msrest.serialization.Model): until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", "Succeeded", "CompletedWithWarnings". - :vartype status: str or ~azure.mgmt.connectedvmware.models.PatchOperationStatus + :vartype status: str or ~azure_arc_vmware_management_service_api.models.PatchOperationStatus :ivar installation_activity_id: The activity ID of the operation that produced this result. :vartype installation_activity_id: str :ivar reboot_status: The reboot state of the VM following completion of the operation. Possible values include: "Unknown", "NotNeeded", "Required", "Started", "Failed", "Completed". - :vartype reboot_status: str or ~azure.mgmt.connectedvmware.models.VMGuestPatchRebootStatus + :vartype reboot_status: str or + ~azure_arc_vmware_management_service_api.models.VMGuestPatchRebootStatus :ivar maintenance_window_exceeded: Whether the operation ran out of time before it completed all its intended actions. :vartype maintenance_window_exceeded: bool @@ -4292,16 +4697,18 @@ class VirtualMachineInstallPatchesResult(msrest.serialization.Model): :vartype last_modified_date_time: ~datetime.datetime :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values include: "User", "Platform". - :vartype started_by: str or ~azure.mgmt.connectedvmware.models.PatchOperationStartedBy + :vartype started_by: str or + ~azure_arc_vmware_management_service_api.models.PatchOperationStartedBy :ivar patch_service_used: Specifies the patch service used for the operation. Possible values include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". - :vartype patch_service_used: str or ~azure.mgmt.connectedvmware.models.PatchServiceUsed + :vartype patch_service_used: str or + ~azure_arc_vmware_management_service_api.models.PatchServiceUsed :ivar os_type: The operating system type of the machine. Possible values include: "Windows", "Linux". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsTypeUM + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsTypeUM :ivar error_details: The errors that were encountered during execution of the operation. The details array contains the list of them. - :vartype error_details: ~azure.mgmt.connectedvmware.models.ErrorDetail + :vartype error_details: ~azure_arc_vmware_management_service_api.models.ErrorDetail """ _validation = { @@ -4364,6 +4771,198 @@ def __init__( self.error_details = None +class VirtualMachineInstance(ProxyResource): + """Define the virtualMachineInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData + :ivar extended_location: Gets or sets the extended location. + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation + :ivar placement_profile: Placement properties. + :vartype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile + :ivar os_profile: OS properties. + :vartype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileForVMInstance + :ivar hardware_profile: Hardware properties. + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :ivar network_profile: Network properties. + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile + :ivar storage_profile: Storage properties. + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile + :ivar security_profile: Gets the security profile. + :vartype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile + :ivar infrastructure_profile: Gets the infrastructure profile. + :vartype infrastructure_profile: + ~azure_arc_vmware_management_service_api.models.InfrastructureProfile + :ivar power_state: Gets the power state of the virtual machine. + :vartype power_state: str + :ivar statuses: The resource status information. + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] + :ivar provisioning_state: Gets or sets the provisioning state. + :vartype provisioning_state: str + :ivar resource_uid: Gets or sets a unique identifier for the vm resource. + :vartype resource_uid: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'power_state': {'readonly': True}, + 'statuses': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_uid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'placement_profile': {'key': 'properties.placementProfile', 'type': 'PlacementProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OsProfileForVMInstance'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'security_profile': {'key': 'properties.securityProfile', 'type': 'SecurityProfile'}, + 'infrastructure_profile': {'key': 'properties.infrastructureProfile', 'type': 'InfrastructureProfile'}, + 'power_state': {'key': 'properties.powerState', 'type': 'str'}, + 'statuses': {'key': 'properties.statuses', 'type': '[ResourceStatus]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_uid': {'key': 'properties.resourceUid', 'type': 'str'}, + } + + def __init__( + self, + *, + extended_location: Optional["ExtendedLocation"] = None, + placement_profile: Optional["PlacementProfile"] = None, + os_profile: Optional["OsProfileForVMInstance"] = None, + hardware_profile: Optional["HardwareProfile"] = None, + network_profile: Optional["NetworkProfile"] = None, + storage_profile: Optional["StorageProfile"] = None, + security_profile: Optional["SecurityProfile"] = None, + infrastructure_profile: Optional["InfrastructureProfile"] = None, + **kwargs + ): + """ + :keyword extended_location: Gets or sets the extended location. + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation + :keyword placement_profile: Placement properties. + :paramtype placement_profile: ~azure_arc_vmware_management_service_api.models.PlacementProfile + :keyword os_profile: OS properties. + :paramtype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileForVMInstance + :keyword hardware_profile: Hardware properties. + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :keyword network_profile: Network properties. + :paramtype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfile + :keyword storage_profile: Storage properties. + :paramtype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfile + :keyword security_profile: Gets the security profile. + :paramtype security_profile: ~azure_arc_vmware_management_service_api.models.SecurityProfile + :keyword infrastructure_profile: Gets the infrastructure profile. + :paramtype infrastructure_profile: + ~azure_arc_vmware_management_service_api.models.InfrastructureProfile + """ + super(VirtualMachineInstance, self).__init__(**kwargs) + self.extended_location = extended_location + self.placement_profile = placement_profile + self.os_profile = os_profile + self.hardware_profile = hardware_profile + self.network_profile = network_profile + self.storage_profile = storage_profile + self.security_profile = security_profile + self.infrastructure_profile = infrastructure_profile + self.power_state = None + self.statuses = None + self.provisioning_state = None + self.resource_uid = None + + +class VirtualMachineInstancesList(msrest.serialization.Model): + """List of VirtualMachineInstances. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. Array of VirtualMachines. + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineInstance]'}, + } + + def __init__( + self, + *, + value: List["VirtualMachineInstance"], + **kwargs + ): + """ + :keyword value: Required. Array of VirtualMachines. + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + """ + super(VirtualMachineInstancesList, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineInstanceUpdate(msrest.serialization.Model): + """Defines the virtualMachineInstanceUpdate. + + :ivar hardware_profile: Specifies the hardware settings for the virtual machine. + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :ivar storage_profile: Specifies the storage settings for the virtual machine disks. + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :ivar network_profile: Specifies the network interfaces of the virtual machine. + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + """ + + _attribute_map = { + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfileUpdate'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfileUpdate'}, + } + + def __init__( + self, + *, + hardware_profile: Optional["HardwareProfile"] = None, + storage_profile: Optional["StorageProfileUpdate"] = None, + network_profile: Optional["NetworkProfileUpdate"] = None, + **kwargs + ): + """ + :keyword hardware_profile: Specifies the hardware settings for the virtual machine. + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile + :keyword storage_profile: Specifies the storage settings for the virtual machine disks. + :paramtype storage_profile: + ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :keyword network_profile: Specifies the network interfaces of the virtual machine. + :paramtype network_profile: + ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + """ + super(VirtualMachineInstanceUpdate, self).__init__(**kwargs) + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.network_profile = network_profile + + class VirtualMachineInventoryItem(InventoryItemProperties): """The VM inventory item. @@ -4374,7 +4973,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -4386,7 +4985,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :vartype provisioning_state: str :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str :ivar ip_addresses: Gets or sets the nic ip addresses. @@ -4394,9 +4993,11 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :ivar folder_path: Gets or sets the folder path of the vm. :vartype folder_path: str :ivar host: Host inventory resource details. - :vartype host: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype host: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :ivar resource_pool: ResourcePool inventory resource details. - :vartype resource_pool: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :vartype resource_pool: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails + :ivar cluster: Cluster inventory resource details. + :vartype cluster: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :ivar instance_uuid: Gets or sets the instance uuid of the vm. :vartype instance_uuid: str :ivar smbios_uuid: Gets or sets the SMBIOS UUID of the vm. @@ -4434,6 +5035,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): 'folder_path': {'key': 'folderPath', 'type': 'str'}, 'host': {'key': 'host', 'type': 'InventoryItemDetails'}, 'resource_pool': {'key': 'resourcePool', 'type': 'InventoryItemDetails'}, + 'cluster': {'key': 'cluster', 'type': 'InventoryItemDetails'}, 'instance_uuid': {'key': 'instanceUuid', 'type': 'str'}, 'smbios_uuid': {'key': 'smbiosUuid', 'type': 'str'}, 'power_state': {'key': 'powerState', 'type': 'str'}, @@ -4454,6 +5056,7 @@ def __init__( folder_path: Optional[str] = None, host: Optional["InventoryItemDetails"] = None, resource_pool: Optional["InventoryItemDetails"] = None, + cluster: Optional["InventoryItemDetails"] = None, instance_uuid: Optional[str] = None, smbios_uuid: Optional[str] = None, **kwargs @@ -4469,7 +5072,7 @@ def __init__( :paramtype mo_name: str :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :paramtype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :keyword os_name: Gets or sets os name. :paramtype os_name: str :keyword ip_addresses: Gets or sets the nic ip addresses. @@ -4477,9 +5080,11 @@ def __init__( :keyword folder_path: Gets or sets the folder path of the vm. :paramtype folder_path: str :keyword host: Host inventory resource details. - :paramtype host: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype host: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :keyword resource_pool: ResourcePool inventory resource details. - :paramtype resource_pool: ~azure.mgmt.connectedvmware.models.InventoryItemDetails + :paramtype resource_pool: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails + :keyword cluster: Cluster inventory resource details. + :paramtype cluster: ~azure_arc_vmware_management_service_api.models.InventoryItemDetails :keyword instance_uuid: Gets or sets the instance uuid of the vm. :paramtype instance_uuid: str :keyword smbios_uuid: Gets or sets the SMBIOS UUID of the vm. @@ -4493,6 +5098,7 @@ def __init__( self.folder_path = folder_path self.host = host self.resource_pool = resource_pool + self.cluster = cluster self.instance_uuid = instance_uuid self.smbios_uuid = smbios_uuid self.power_state = None @@ -4509,7 +5115,7 @@ class VirtualMachinesList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VirtualMachines. :vartype next_link: str :ivar value: Required. Array of VirtualMachines. - :vartype value: list[~azure.mgmt.connectedvmware.models.VirtualMachine] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachine] """ _validation = { @@ -4532,7 +5138,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VirtualMachines. :paramtype next_link: str :keyword value: Required. Array of VirtualMachines. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VirtualMachine] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachine] """ super(VirtualMachinesList, self).__init__(**kwargs) self.next_link = next_link @@ -4549,9 +5155,9 @@ class VirtualMachineTemplate(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -4586,15 +5192,16 @@ class VirtualMachineTemplate(msrest.serialization.Model): :vartype num_cores_per_socket: int :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str :ivar folder_path: Gets or sets the folder path of the template. :vartype folder_path: str :ivar network_interfaces: Gets or sets the network interfaces of the template. - :vartype network_interfaces: list[~azure.mgmt.connectedvmware.models.NetworkInterface] + :vartype network_interfaces: + list[~azure_arc_vmware_management_service_api.models.NetworkInterface] :ivar disks: Gets or sets the disks the template. - :vartype disks: list[~azure.mgmt.connectedvmware.models.VirtualDisk] + :vartype disks: list[~azure_arc_vmware_management_service_api.models.VirtualDisk] :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar tools_version_status: Gets or sets the current version status of VMware Tools installed @@ -4603,9 +5210,9 @@ class VirtualMachineTemplate(msrest.serialization.Model): :ivar tools_version: Gets or sets the current version of VMware Tools. :vartype tools_version: str :ivar firmware_type: Firmware type. Possible values include: "bios", "efi". - :vartype firmware_type: str or ~azure.mgmt.connectedvmware.models.FirmwareType + :vartype firmware_type: str or ~azure_arc_vmware_management_service_api.models.FirmwareType :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -4680,7 +5287,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -4738,7 +5345,7 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -4757,9 +5364,14 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): :vartype num_cores_per_socket: int :ivar os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :vartype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :vartype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :ivar os_name: Gets or sets os name. :vartype os_name: str + :ivar tools_version_status: Gets or sets the current version status of VMware Tools installed + in the guest operating system. + :vartype tools_version_status: str + :ivar tools_version: Gets or sets the current version of VMware Tools. + :vartype tools_version: str :ivar folder_path: Gets or sets the folder path of the template. :vartype folder_path: str """ @@ -4767,6 +5379,8 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): _validation = { 'inventory_type': {'required': True}, 'provisioning_state': {'readonly': True}, + 'tools_version_status': {'readonly': True}, + 'tools_version': {'readonly': True}, } _attribute_map = { @@ -4780,6 +5394,8 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): 'num_cores_per_socket': {'key': 'numCoresPerSocket', 'type': 'int'}, 'os_type': {'key': 'osType', 'type': 'str'}, 'os_name': {'key': 'osName', 'type': 'str'}, + 'tools_version_status': {'key': 'toolsVersionStatus', 'type': 'str'}, + 'tools_version': {'key': 'toolsVersion', 'type': 'str'}, 'folder_path': {'key': 'folderPath', 'type': 'str'}, } @@ -4815,7 +5431,7 @@ def __init__( :paramtype num_cores_per_socket: int :keyword os_type: Gets or sets the type of the os. Possible values include: "Windows", "Linux", "Other". - :paramtype os_type: str or ~azure.mgmt.connectedvmware.models.OsType + :paramtype os_type: str or ~azure_arc_vmware_management_service_api.models.OsType :keyword os_name: Gets or sets os name. :paramtype os_name: str :keyword folder_path: Gets or sets the folder path of the template. @@ -4828,6 +5444,8 @@ def __init__( self.num_cores_per_socket = num_cores_per_socket self.os_type = os_type self.os_name = os_name + self.tools_version_status = None + self.tools_version = None self.folder_path = folder_path @@ -4839,7 +5457,7 @@ class VirtualMachineTemplatesList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VirtualMachineTemplates. :vartype next_link: str :ivar value: Required. Array of VirtualMachineTemplates. - :vartype value: list[~azure.mgmt.connectedvmware.models.VirtualMachineTemplate] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate] """ _validation = { @@ -4862,7 +5480,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VirtualMachineTemplates. :paramtype next_link: str :keyword value: Required. Array of VirtualMachineTemplates. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VirtualMachineTemplate] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate] """ super(VirtualMachineTemplatesList, self).__init__(**kwargs) self.next_link = next_link @@ -4875,15 +5493,18 @@ class VirtualMachineUpdate(msrest.serialization.Model): :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.connectedvmware.models.Identity - :ivar hardware_profile: Defines the resource properties. - :vartype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :vartype identity: ~azure_arc_vmware_management_service_api.models.Identity + :ivar hardware_profile: Specifies the hardware settings for the virtual machine. + :vartype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :ivar os_profile: OS properties. - :vartype os_profile: ~azure.mgmt.connectedvmware.models.OsProfileUpdate - :ivar storage_profile: Defines the resource update properties. - :vartype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfileUpdate - :ivar network_profile: Defines the update resource properties. - :vartype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfileUpdate + :vartype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileUpdate + :ivar storage_profile: Specifies the storage settings for the virtual machine disks. + :vartype storage_profile: ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :ivar network_profile: Specifies the network interfaces of the virtual machine. + :vartype network_profile: ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + :ivar guest_agent_profile: Specifies the guest agent settings for the virtual machine. + :vartype guest_agent_profile: + ~azure_arc_vmware_management_service_api.models.GuestAgentProfileUpdate """ _attribute_map = { @@ -4893,6 +5514,7 @@ class VirtualMachineUpdate(msrest.serialization.Model): 'os_profile': {'key': 'properties.osProfile', 'type': 'OsProfileUpdate'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfileUpdate'}, 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfileUpdate'}, + 'guest_agent_profile': {'key': 'properties.guestAgentProfile', 'type': 'GuestAgentProfileUpdate'}, } def __init__( @@ -4904,21 +5526,27 @@ def __init__( os_profile: Optional["OsProfileUpdate"] = None, storage_profile: Optional["StorageProfileUpdate"] = None, network_profile: Optional["NetworkProfileUpdate"] = None, + guest_agent_profile: Optional["GuestAgentProfileUpdate"] = None, **kwargs ): """ :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword identity: The identity of the resource. - :paramtype identity: ~azure.mgmt.connectedvmware.models.Identity - :keyword hardware_profile: Defines the resource properties. - :paramtype hardware_profile: ~azure.mgmt.connectedvmware.models.HardwareProfile + :paramtype identity: ~azure_arc_vmware_management_service_api.models.Identity + :keyword hardware_profile: Specifies the hardware settings for the virtual machine. + :paramtype hardware_profile: ~azure_arc_vmware_management_service_api.models.HardwareProfile :keyword os_profile: OS properties. - :paramtype os_profile: ~azure.mgmt.connectedvmware.models.OsProfileUpdate - :keyword storage_profile: Defines the resource update properties. - :paramtype storage_profile: ~azure.mgmt.connectedvmware.models.StorageProfileUpdate - :keyword network_profile: Defines the update resource properties. - :paramtype network_profile: ~azure.mgmt.connectedvmware.models.NetworkProfileUpdate + :paramtype os_profile: ~azure_arc_vmware_management_service_api.models.OsProfileUpdate + :keyword storage_profile: Specifies the storage settings for the virtual machine disks. + :paramtype storage_profile: + ~azure_arc_vmware_management_service_api.models.StorageProfileUpdate + :keyword network_profile: Specifies the network interfaces of the virtual machine. + :paramtype network_profile: + ~azure_arc_vmware_management_service_api.models.NetworkProfileUpdate + :keyword guest_agent_profile: Specifies the guest agent settings for the virtual machine. + :paramtype guest_agent_profile: + ~azure_arc_vmware_management_service_api.models.GuestAgentProfileUpdate """ super(VirtualMachineUpdate, self).__init__(**kwargs) self.tags = tags @@ -4927,6 +5555,7 @@ def __init__( self.os_profile = os_profile self.storage_profile = storage_profile self.network_profile = network_profile + self.guest_agent_profile = guest_agent_profile class VirtualNetwork(msrest.serialization.Model): @@ -4939,9 +5568,9 @@ class VirtualNetwork(msrest.serialization.Model): :ivar location: Required. Gets or sets the location. :vartype location: str :ivar extended_location: Gets or sets the extended location. - :vartype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :vartype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :ivar system_data: The system data. - :vartype system_data: ~azure.mgmt.connectedvmware.models.SystemData + :vartype system_data: ~azure_arc_vmware_management_service_api.models.SystemData :ivar tags: A set of tags. Gets or sets the Resource tags. :vartype tags: dict[str, str] :ivar name: Gets or sets the name. @@ -4969,7 +5598,7 @@ class VirtualNetwork(msrest.serialization.Model): :ivar custom_resource_name: Gets the name of the corresponding resource in Kubernetes. :vartype custom_resource_name: str :ivar statuses: The resource status information. - :vartype statuses: list[~azure.mgmt.connectedvmware.models.ResourceStatus] + :vartype statuses: list[~azure_arc_vmware_management_service_api.models.ResourceStatus] :ivar provisioning_state: Gets or sets the provisioning state. :vartype provisioning_state: str """ @@ -5022,7 +5651,7 @@ def __init__( :keyword location: Required. Gets or sets the location. :paramtype location: str :keyword extended_location: Gets or sets the extended location. - :paramtype extended_location: ~azure.mgmt.connectedvmware.models.ExtendedLocation + :paramtype extended_location: ~azure_arc_vmware_management_service_api.models.ExtendedLocation :keyword tags: A set of tags. Gets or sets the Resource tags. :paramtype tags: dict[str, str] :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for @@ -5067,7 +5696,7 @@ class VirtualNetworkInventoryItem(InventoryItemProperties): :ivar inventory_type: Required. They inventory type.Constant filled by server. Possible values include: "ResourcePool", "VirtualMachine", "VirtualMachineTemplate", "VirtualNetwork", "Cluster", "Datastore", "Host". - :vartype inventory_type: str or ~azure.mgmt.connectedvmware.models.InventoryType + :vartype inventory_type: str or ~azure_arc_vmware_management_service_api.models.InventoryType :ivar managed_resource_id: Gets or sets the tracked resource id corresponding to the inventory resource. :vartype managed_resource_id: str @@ -5122,7 +5751,7 @@ class VirtualNetworksList(msrest.serialization.Model): :ivar next_link: Url to follow for getting next page of VirtualNetworks. :vartype next_link: str :ivar value: Required. Array of VirtualNetworks. - :vartype value: list[~azure.mgmt.connectedvmware.models.VirtualNetwork] + :vartype value: list[~azure_arc_vmware_management_service_api.models.VirtualNetwork] """ _validation = { @@ -5145,7 +5774,7 @@ def __init__( :keyword next_link: Url to follow for getting next page of VirtualNetworks. :paramtype next_link: str :keyword value: Required. Array of VirtualNetworks. - :paramtype value: list[~azure.mgmt.connectedvmware.models.VirtualNetwork] + :paramtype value: list[~azure_arc_vmware_management_service_api.models.VirtualNetwork] """ super(VirtualNetworksList, self).__init__(**kwargs) self.next_link = next_link @@ -5157,7 +5786,7 @@ class VirtualSCSIController(msrest.serialization.Model): :ivar type: Gets or sets the controller type. Possible values include: "lsilogic", "buslogic", "pvscsi", "lsilogicsas". - :vartype type: str or ~azure.mgmt.connectedvmware.models.SCSIControllerType + :vartype type: str or ~azure_arc_vmware_management_service_api.models.SCSIControllerType :ivar controller_key: Gets or sets the key of the controller. :vartype controller_key: int :ivar bus_number: Gets or sets the bus number of the controller. @@ -5166,7 +5795,7 @@ class VirtualSCSIController(msrest.serialization.Model): :vartype scsi_ctlr_unit_number: int :ivar sharing: Gets or sets the sharing mode. Possible values include: "noSharing", "physicalSharing", "virtualSharing". - :vartype sharing: str or ~azure.mgmt.connectedvmware.models.VirtualSCSISharing + :vartype sharing: str or ~azure_arc_vmware_management_service_api.models.VirtualSCSISharing """ _attribute_map = { @@ -5190,7 +5819,7 @@ def __init__( """ :keyword type: Gets or sets the controller type. Possible values include: "lsilogic", "buslogic", "pvscsi", "lsilogicsas". - :paramtype type: str or ~azure.mgmt.connectedvmware.models.SCSIControllerType + :paramtype type: str or ~azure_arc_vmware_management_service_api.models.SCSIControllerType :keyword controller_key: Gets or sets the key of the controller. :paramtype controller_key: int :keyword bus_number: Gets or sets the bus number of the controller. @@ -5199,7 +5828,7 @@ def __init__( :paramtype scsi_ctlr_unit_number: int :keyword sharing: Gets or sets the sharing mode. Possible values include: "noSharing", "physicalSharing", "virtualSharing". - :paramtype sharing: str or ~azure.mgmt.connectedvmware.models.VirtualSCSISharing + :paramtype sharing: str or ~azure_arc_vmware_management_service_api.models.VirtualSCSISharing """ super(VirtualSCSIController, self).__init__(**kwargs) self.type = type @@ -5209,13 +5838,114 @@ def __init__( self.sharing = sharing +class VmInstanceHybridIdentityMetadata(ProxyResource): + """Defines the HybridIdentityMetadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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_arc_vmware_management_service_api.models.SystemData + :ivar resource_uid: The unique identifier for the resource. + :vartype resource_uid: str + :ivar public_key: Gets or sets the Public Key. + :vartype public_key: str + :ivar provisioning_state: Gets or sets the provisioning state. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'resource_uid': {'key': 'properties.resourceUid', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_uid: Optional[str] = None, + public_key: Optional[str] = None, + **kwargs + ): + """ + :keyword resource_uid: The unique identifier for the resource. + :paramtype resource_uid: str + :keyword public_key: Gets or sets the Public Key. + :paramtype public_key: str + """ + super(VmInstanceHybridIdentityMetadata, self).__init__(**kwargs) + self.resource_uid = resource_uid + self.public_key = public_key + self.provisioning_state = None + + +class VmInstanceHybridIdentityMetadataList(msrest.serialization.Model): + """List of HybridIdentityMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: Url to follow for getting next page of HybridIdentityMetadata. + :vartype next_link: str + :ivar value: Required. Array of HybridIdentityMetadata. + :vartype value: + list[~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadata] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[VmInstanceHybridIdentityMetadata]'}, + } + + def __init__( + self, + *, + value: List["VmInstanceHybridIdentityMetadata"], + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword next_link: Url to follow for getting next page of HybridIdentityMetadata. + :paramtype next_link: str + :keyword value: Required. Array of HybridIdentityMetadata. + :paramtype value: + list[~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadata] + """ + super(VmInstanceHybridIdentityMetadataList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + class WindowsParameters(msrest.serialization.Model): """Input for InstallPatches on a Windows VM, as directly received by the API. :ivar classifications_to_include: The update classifications to select when installing patches for Windows. :vartype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationWindows] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationWindows] :ivar kb_numbers_to_include: Kbs to include in the patch operation. :vartype kb_numbers_to_include: list[str] :ivar kb_numbers_to_exclude: Kbs to exclude in the patch operation. @@ -5250,7 +5980,7 @@ def __init__( :keyword classifications_to_include: The update classifications to select when installing patches for Windows. :paramtype classifications_to_include: list[str or - ~azure.mgmt.connectedvmware.models.VMGuestPatchClassificationWindows] + ~azure_arc_vmware_management_service_api.models.VMGuestPatchClassificationWindows] :keyword kb_numbers_to_include: Kbs to include in the patch operation. :paramtype kb_numbers_to_include: list[str] :keyword kb_numbers_to_exclude: Kbs to exclude in the patch operation. diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/__init__.py similarity index 74% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/__init__.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/__init__.py index 81e185f271d..c6ae55da975 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/__init__.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/__init__.py @@ -18,7 +18,11 @@ from ._inventory_items_operations import InventoryItemsOperations from ._hybrid_identity_metadata_operations import HybridIdentityMetadataOperations from ._machine_extensions_operations import MachineExtensionsOperations +from ._azure_arc_vmware_management_service_api_operations import AzureArcVMwareManagementServiceAPIOperationsMixin from ._guest_agents_operations import GuestAgentsOperations +from ._virtual_machine_instances_operations import VirtualMachineInstancesOperations +from ._vm_instance_hybrid_identity_metadata_operations import VmInstanceHybridIdentityMetadataOperations +from ._vm_instance_guest_agents_operations import VMInstanceGuestAgentsOperations __all__ = [ 'Operations', @@ -33,5 +37,9 @@ 'InventoryItemsOperations', 'HybridIdentityMetadataOperations', 'MachineExtensionsOperations', + 'AzureArcVMwareManagementServiceAPIOperationsMixin', 'GuestAgentsOperations', + 'VirtualMachineInstancesOperations', + 'VmInstanceHybridIdentityMetadataOperations', + 'VMInstanceGuestAgentsOperations', ] diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_azure_arc_vmware_management_service_api_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_azure_arc_vmware_management_service_api_operations.py new file mode 100644 index 00000000000..010c76ca5a6 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_azure_arc_vmware_management_service_api_operations.py @@ -0,0 +1,193 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_upgrade_extensions_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + virtual_machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/upgradeExtensions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class AzureArcVMwareManagementServiceAPIOperationsMixin(object): + + def _upgrade_extensions_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + virtual_machine_name, # type: str + extension_upgrade_parameters, # type: "_models.MachineExtensionUpgrade" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_upgrade_parameters, 'MachineExtensionUpgrade') + + request = build_upgrade_extensions_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_machine_name=virtual_machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._upgrade_extensions_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _upgrade_extensions_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/upgradeExtensions"} # type: ignore + + + @distributed_trace + def begin_upgrade_extensions( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + virtual_machine_name, # type: str + extension_upgrade_parameters, # type: "_models.MachineExtensionUpgrade" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """The operation to Upgrade Machine Extensions. + + :param resource_group_name: The Resource Group Name. + :type resource_group_name: str + :param virtual_machine_name: The name of the machine containing the extension. + :type virtual_machine_name: str + :param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation. + :type extension_upgrade_parameters: + ~azure_arc_vmware_management_service_api.models.MachineExtensionUpgrade + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_extensions_initial( + resource_group_name=resource_group_name, + virtual_machine_name=virtual_machine_name, + extension_upgrade_parameters=extension_upgrade_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_upgrade_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/upgradeExtensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_clusters_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_clusters_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_clusters_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_clusters_operations.py index 7c1c54ab60d..816f294b7b4 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_clusters_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_clusters_operations.py @@ -40,7 +40,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -80,7 +80,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ def build_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str force = kwargs.pop('force', None) # type: Optional[bool] accept = "application/json" @@ -195,7 +195,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ class ClustersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -294,7 +294,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -357,7 +357,7 @@ def begin_create( :param cluster_name: Name of the cluster. :type cluster_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.Cluster + :type body: ~azure_arc_vmware_management_service_api.models.Cluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -367,10 +367,10 @@ def begin_create( :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.Cluster] + :rtype: ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.Cluster] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -431,7 +431,7 @@ def get( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Cluster + :rtype: ~azure_arc_vmware_management_service_api.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -440,7 +440,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -493,10 +493,10 @@ def update( :param cluster_name: Name of the cluster. :type cluster_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Cluster, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Cluster + :rtype: ~azure_arc_vmware_management_service_api.models.Cluster :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] @@ -505,7 +505,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -561,7 +561,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -623,7 +623,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -673,10 +673,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClustersList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.ClustersList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.ClustersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ClustersList"] error_map = { @@ -751,10 +752,11 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClustersList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.ClustersList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.ClustersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ClustersList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_datastores_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_datastores_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_datastores_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_datastores_operations.py index 4dabcc7d844..8f1f726048c 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_datastores_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_datastores_operations.py @@ -40,7 +40,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -80,7 +80,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ def build_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str force = kwargs.pop('force', None) # type: Optional[bool] accept = "application/json" @@ -195,7 +195,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ class DatastoresOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -294,7 +294,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -357,7 +357,7 @@ def begin_create( :param datastore_name: Name of the datastore. :type datastore_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.Datastore + :type body: ~azure_arc_vmware_management_service_api.models.Datastore :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -367,10 +367,11 @@ def begin_create( :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Datastore or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.Datastore] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.Datastore] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] @@ -431,7 +432,7 @@ def get( :type datastore_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Datastore, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Datastore + :rtype: ~azure_arc_vmware_management_service_api.models.Datastore :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] @@ -440,7 +441,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -493,10 +494,10 @@ def update( :param datastore_name: Name of the datastore. :type datastore_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Datastore, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Datastore + :rtype: ~azure_arc_vmware_management_service_api.models.Datastore :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Datastore"] @@ -505,7 +506,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -561,7 +562,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -623,7 +624,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -673,10 +674,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatastoresList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.DatastoresList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.DatastoresList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoresList"] error_map = { @@ -751,10 +753,11 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatastoresList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.DatastoresList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.DatastoresList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoresList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_guest_agents_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_guest_agents_operations.py similarity index 94% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_guest_agents_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_guest_agents_operations.py index 2ac4eed5b1b..d4e83d6670a 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_guest_agents_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_guest_agents_operations.py @@ -41,7 +41,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -83,7 +83,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -122,7 +122,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -153,14 +153,14 @@ def build_delete_request_initial( ) -def build_list_by_vm_request( +def build_list_request( subscription_id, # type: str resource_group_name, # type: str virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -197,7 +197,7 @@ class GuestAgentsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -227,7 +227,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -294,7 +294,7 @@ def begin_create( :param name: Name of the guestAgents. :type name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.GuestAgent + :type body: ~azure_arc_vmware_management_service_api.models.GuestAgent :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -304,10 +304,11 @@ def begin_create( :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either GuestAgent or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.GuestAgent] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.GuestAgent] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] @@ -372,7 +373,7 @@ def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestAgent, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.GuestAgent + :rtype: ~azure_arc_vmware_management_service_api.models.GuestAgent :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] @@ -381,7 +382,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -431,7 +432,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -493,7 +494,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -532,7 +533,7 @@ def get_long_running_output(pipeline_response): begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents/{name}"} # type: ignore @distributed_trace - def list_by_vm( + def list( self, resource_group_name, # type: str virtual_machine_name, # type: str @@ -549,10 +550,11 @@ def list_by_vm( :type virtual_machine_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GuestAgentList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.GuestAgentList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.GuestAgentList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgentList"] error_map = { @@ -562,19 +564,19 @@ def list_by_vm( def prepare_request(next_link=None): if not next_link: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, - template_url=self.list_by_vm.metadata['url'], + template_url=self.list.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, @@ -614,4 +616,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_vm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/guestAgents"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_hosts_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_hosts_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_hosts_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_hosts_operations.py index dbfb98387aa..080dfb5bafd 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_hosts_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_hosts_operations.py @@ -40,7 +40,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -80,7 +80,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ def build_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str force = kwargs.pop('force', None) # type: Optional[bool] accept = "application/json" @@ -195,7 +195,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ class HostsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -294,7 +294,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -357,7 +357,7 @@ def begin_create( :param host_name: Name of the host. :type host_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.Host + :type body: ~azure_arc_vmware_management_service_api.models.Host :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -367,10 +367,10 @@ def begin_create( :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Host or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.Host] + :rtype: ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.Host] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Host"] @@ -431,7 +431,7 @@ def get( :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Host, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Host + :rtype: ~azure_arc_vmware_management_service_api.models.Host :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Host"] @@ -440,7 +440,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -493,10 +493,10 @@ def update( :param host_name: Name of the host. :type host_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Host, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.Host + :rtype: ~azure_arc_vmware_management_service_api.models.Host :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Host"] @@ -505,7 +505,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -561,7 +561,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -623,7 +623,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -673,10 +673,10 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either HostsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.HostsList] + :rtype: ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.HostsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.HostsList"] error_map = { @@ -751,10 +751,10 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either HostsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.HostsList] + :rtype: ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.HostsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.HostsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_hybrid_identity_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_hybrid_identity_metadata_operations.py similarity index 93% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_hybrid_identity_metadata_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_hybrid_identity_metadata_operations.py index c17249f69de..0fc47ceb669 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_hybrid_identity_metadata_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_hybrid_identity_metadata_operations.py @@ -39,7 +39,7 @@ def build_create_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -81,7 +81,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -120,7 +120,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -151,14 +151,14 @@ def build_delete_request( ) -def build_list_by_vm_request( +def build_list_request( subscription_id, # type: str resource_group_name, # type: str virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ class HybridIdentityMetadataOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -231,10 +231,10 @@ def create( :param metadata_name: Name of the hybridIdentityMetadata. :type metadata_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.HybridIdentityMetadata + :type body: ~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata :keyword callable cls: A custom type or function that will be passed the direct response :return: HybridIdentityMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.HybridIdentityMetadata + :rtype: ~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadata"] @@ -243,7 +243,7 @@ def create( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -307,7 +307,7 @@ def get( :type metadata_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: HybridIdentityMetadata, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.HybridIdentityMetadata + :rtype: ~azure_arc_vmware_management_service_api.models.HybridIdentityMetadata :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadata"] @@ -316,7 +316,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -382,7 +382,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request( @@ -415,7 +415,7 @@ def delete( # pylint: disable=inconsistent-return-statements @distributed_trace - def list_by_vm( + def list( self, resource_group_name, # type: str virtual_machine_name, # type: str @@ -434,10 +434,10 @@ def list_by_vm( :return: An iterator like instance of either HybridIdentityMetadataList or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.HybridIdentityMetadataList] + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.HybridIdentityMetadataList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadataList"] error_map = { @@ -447,19 +447,19 @@ def list_by_vm( def prepare_request(next_link=None): if not next_link: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, - template_url=self.list_by_vm.metadata['url'], + template_url=self.list.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_by_vm_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, @@ -499,4 +499,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_vm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/hybridIdentityMetadata"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_inventory_items_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_inventory_items_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_inventory_items_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_inventory_items_operations.py index 965f643572e..bb24a66e312 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_inventory_items_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_inventory_items_operations.py @@ -39,7 +39,7 @@ def build_create_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -81,7 +81,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -120,7 +120,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -158,7 +158,7 @@ def build_list_by_v_center_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ class InventoryItemsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -231,10 +231,10 @@ def create( :param inventory_item_name: Name of the inventoryItem. :type inventory_item_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.InventoryItem + :type body: ~azure_arc_vmware_management_service_api.models.InventoryItem :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.InventoryItem + :rtype: ~azure_arc_vmware_management_service_api.models.InventoryItem :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItem"] @@ -243,7 +243,7 @@ def create( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -307,7 +307,7 @@ def get( :type inventory_item_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.InventoryItem + :rtype: ~azure_arc_vmware_management_service_api.models.InventoryItem :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItem"] @@ -316,7 +316,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -382,7 +382,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request( @@ -432,10 +432,11 @@ def list_by_v_center( :type vcenter_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InventoryItemsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.InventoryItemsList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.InventoryItemsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItemsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_machine_extensions_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_machine_extensions_operations.py similarity index 85% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_machine_extensions_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_machine_extensions_operations.py index 6fe83889b92..eba244ce128 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_machine_extensions_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_machine_extensions_operations.py @@ -36,21 +36,21 @@ def build_create_or_update_request_initial( subscription_id, # type: str resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}") # pylint: disable=line-too-long + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), } @@ -78,21 +78,21 @@ def build_create_or_update_request_initial( def build_update_request_initial( subscription_id, # type: str resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}") # pylint: disable=line-too-long + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), } @@ -120,20 +120,20 @@ def build_update_request_initial( def build_delete_request_initial( subscription_id, # type: str resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}") # pylint: disable=line-too-long + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), } @@ -159,20 +159,20 @@ def build_delete_request_initial( def build_get_request( subscription_id, # type: str resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}") # pylint: disable=line-too-long + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), } @@ -198,20 +198,20 @@ def build_get_request( def build_list_request( subscription_id, # type: str resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str expand = kwargs.pop('expand', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions") # pylint: disable=line-too-long + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), } _url = _format_url_section(_url, **path_format_arguments) @@ -242,7 +242,7 @@ class MachineExtensionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -260,7 +260,7 @@ def __init__(self, client, config, serializer, deserializer): def _create_or_update_initial( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str extension_parameters, # type: "_models.MachineExtension" **kwargs # type: Any @@ -272,7 +272,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(extension_parameters, 'MachineExtension') @@ -280,7 +280,7 @@ def _create_or_update_initial( request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, content_type=content_type, @@ -312,14 +312,14 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace def begin_create_or_update( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str extension_parameters, # type: "_models.MachineExtension" **kwargs # type: Any @@ -329,12 +329,13 @@ def begin_create_or_update( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine where the extension should be created or updated. - :type name: str + :param virtual_machine_name: The name of the machine where the extension should be created or + updated. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :param extension_parameters: Parameters supplied to the Create Machine Extension operation. - :type extension_parameters: ~azure.mgmt.connectedvmware.models.MachineExtension + :type extension_parameters: ~azure_arc_vmware_management_service_api.models.MachineExtension :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -345,10 +346,11 @@ def begin_create_or_update( Retry-After header is present. :return: An instance of LROPoller that returns either MachineExtension or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.MachineExtension] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.MachineExtension] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] @@ -360,7 +362,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, extension_parameters=extension_parameters, api_version=api_version, @@ -390,12 +392,12 @@ def get_long_running_output(pipeline_response): ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore def _update_initial( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str extension_parameters, # type: "_models.MachineExtensionUpdate" **kwargs # type: Any @@ -407,7 +409,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(extension_parameters, 'MachineExtensionUpdate') @@ -415,7 +417,7 @@ def _update_initial( request = build_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, content_type=content_type, @@ -447,14 +449,14 @@ def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace def begin_update( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str extension_parameters, # type: "_models.MachineExtensionUpdate" **kwargs # type: Any @@ -464,12 +466,14 @@ def begin_update( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine where the extension should be created or updated. - :type name: str + :param virtual_machine_name: The name of the machine where the extension should be created or + updated. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :param extension_parameters: Parameters supplied to the Create Machine Extension operation. - :type extension_parameters: ~azure.mgmt.connectedvmware.models.MachineExtensionUpdate + :type extension_parameters: + ~azure_arc_vmware_management_service_api.models.MachineExtensionUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -480,10 +484,11 @@ def begin_update( Retry-After header is present. :return: An instance of LROPoller that returns either MachineExtension or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.MachineExtension] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.MachineExtension] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] @@ -495,7 +500,7 @@ def begin_update( if cont_token is None: raw_result = self._update_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, extension_parameters=extension_parameters, api_version=api_version, @@ -525,12 +530,12 @@ def get_long_running_output(pipeline_response): ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str **kwargs # type: Any ): @@ -541,13 +546,13 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, template_url=self._delete_initial.metadata['url'], @@ -569,14 +574,14 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str **kwargs # type: Any ): @@ -585,8 +590,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine where the extension should be deleted. - :type name: str + :param virtual_machine_name: The name of the machine where the extension should be deleted. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -601,7 +606,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -612,7 +617,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, cls=lambda x,y,z: x, @@ -637,13 +642,13 @@ def get_long_running_output(pipeline_response): ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace def get( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str extension_name, # type: str **kwargs # type: Any ): @@ -652,13 +657,13 @@ def get( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine containing the extension. - :type name: str + :param virtual_machine_name: The name of the machine containing the extension. + :type virtual_machine_name: str :param extension_name: The name of the machine extension. :type extension_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MachineExtension, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.MachineExtension + :rtype: ~azure_arc_vmware_management_service_api.models.MachineExtension :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] @@ -667,13 +672,13 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, extension_name=extension_name, api_version=api_version, template_url=self.get.metadata['url'], @@ -700,14 +705,14 @@ def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions/{extensionName}"} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions/{extensionName}"} # type: ignore @distributed_trace def list( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str expand=None, # type: Optional[str] **kwargs # type: Any ): @@ -716,18 +721,18 @@ def list( :param resource_group_name: The Resource Group Name. :type resource_group_name: str - :param name: The name of the machine containing the extension. - :type name: str + :param virtual_machine_name: The name of the machine containing the extension. + :type virtual_machine_name: str :param expand: The expand expression to apply on the operation. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MachineExtensionsListResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.MachineExtensionsListResult] + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.MachineExtensionsListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtensionsListResult"] error_map = { @@ -740,7 +745,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, expand=expand, template_url=self.list.metadata['url'], @@ -753,7 +758,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, expand=expand, template_url=next_link, @@ -791,4 +796,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/extensions"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/extensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_operations.py similarity index 94% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_operations.py index 9a1758541bc..3d6bea9ebf4 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_operations.py @@ -35,7 +35,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -65,7 +65,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -90,10 +90,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.OperationsList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.OperationsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_resource_pools_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_resource_pools_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_resource_pools_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_resource_pools_operations.py index e176a00afd8..695faa92c56 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_resource_pools_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_resource_pools_operations.py @@ -40,7 +40,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -80,7 +80,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ def build_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str force = kwargs.pop('force', None) # type: Optional[bool] accept = "application/json" @@ -195,7 +195,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ class ResourcePoolsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -294,7 +294,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -357,7 +357,7 @@ def begin_create( :param resource_pool_name: Name of the resourcePool. :type resource_pool_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePool + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -368,10 +368,11 @@ def begin_create( Retry-After header is present. :return: An instance of LROPoller that returns either ResourcePool or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.ResourcePool] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.ResourcePool] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePool"] @@ -432,7 +433,7 @@ def get( :type resource_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourcePool, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.ResourcePool + :rtype: ~azure_arc_vmware_management_service_api.models.ResourcePool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePool"] @@ -441,7 +442,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -494,10 +495,10 @@ def update( :param resource_pool_name: Name of the resourcePool. :type resource_pool_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourcePool, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.ResourcePool + :rtype: ~azure_arc_vmware_management_service_api.models.ResourcePool :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePool"] @@ -506,7 +507,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -562,7 +563,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -624,7 +625,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -674,10 +675,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourcePoolsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.ResourcePoolsList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.ResourcePoolsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePoolsList"] error_map = { @@ -752,10 +754,11 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourcePoolsList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.ResourcePoolsList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.ResourcePoolsList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourcePoolsList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_vcenters_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vcenters_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_vcenters_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vcenters_operations.py index 71418b5f965..d2f3d1d4b08 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_vcenters_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vcenters_operations.py @@ -40,7 +40,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -80,7 +80,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ def build_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str force = kwargs.pop('force', None) # type: Optional[bool] accept = "application/json" @@ -195,7 +195,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ class VCentersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -294,7 +294,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -357,7 +357,7 @@ def begin_create( :param vcenter_name: Name of the vCenter. :type vcenter_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VCenter + :type body: ~azure_arc_vmware_management_service_api.models.VCenter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -367,10 +367,10 @@ def begin_create( :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VCenter or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.VCenter] + :rtype: ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VCenter] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VCenter"] @@ -431,7 +431,7 @@ def get( :type vcenter_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VCenter, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VCenter + :rtype: ~azure_arc_vmware_management_service_api.models.VCenter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VCenter"] @@ -440,7 +440,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -493,10 +493,10 @@ def update( :param vcenter_name: Name of the vCenter. :type vcenter_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: VCenter, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VCenter + :rtype: ~azure_arc_vmware_management_service_api.models.VCenter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VCenter"] @@ -505,7 +505,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -561,7 +561,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -623,7 +623,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -673,10 +673,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VCentersList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VCentersList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VCentersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VCentersList"] error_map = { @@ -751,10 +752,11 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VCentersList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VCentersList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VCentersList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VCentersList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machine_instances_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machine_instances_operations.py new file mode 100644 index 00000000000..144348a2e8c --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machine_instances_operations.py @@ -0,0 +1,1141 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + delete_from_host = kwargs.pop('delete_from_host', None) # type: Optional[bool] + force = kwargs.pop('force', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if delete_from_host is not None: + _query_parameters['deleteFromHost'] = _SERIALIZER.query("delete_from_host", delete_from_host, 'bool') + if force is not None: + _query_parameters['force'] = _SERIALIZER.query("force", force, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances") + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_stop_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_restart_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/restart") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class VirtualMachineInstancesOperations(object): + """VirtualMachineInstancesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure_arc_vmware_management_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_uri, # type: str + body=None, # type: Optional["_models.VirtualMachineInstance"] + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualMachineInstance" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'VirtualMachineInstance') + else: + _json = None + + request = build_create_or_update_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_uri, # type: str + body=None, # type: Optional["_models.VirtualMachineInstance"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VirtualMachineInstance"] + """Implements virtual machine PUT method. + + The operation to create or update a virtual machine instance. Please note some properties can + be set only during virtual machine instance creation. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Request payload. + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstance + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualMachineInstance or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + @distributed_trace + def get( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualMachineInstance" + """Gets a virtual machine. + + Retrieves information about a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachineInstance, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_get_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + def _update_initial( + self, + resource_uri, # type: str + body=None, # type: Optional["_models.VirtualMachineInstanceUpdate"] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VirtualMachineInstance"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualMachineInstance"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'VirtualMachineInstanceUpdate') + else: + _json = None + + request = build_update_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_uri, # type: str + body=None, # type: Optional["_models.VirtualMachineInstanceUpdate"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VirtualMachineInstance"] + """Updates a virtual machine. + + The operation to update a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Resource properties to update. + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstanceUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualMachineInstance or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineInstance] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualMachineInstance', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + delete_from_host=None, # type: Optional[bool] + force=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_delete_request_initial( + resource_uri=resource_uri, + api_version=api_version, + delete_from_host=delete_from_host, + force=force, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + delete_from_host=None, # type: Optional[bool] + force=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an virtual machine. + + The operation to delete a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param delete_from_host: Whether to delete the VM from the vCenter. + :type delete_from_host: bool + :param force: Whether force delete was specified. + :type force: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_uri=resource_uri, + delete_from_host=delete_from_host, + force=force, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default"} # type: ignore + + @distributed_trace + def list( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualMachineInstancesList" + """Implements List virtual machine instances. + + Lists all of the virtual machine instances within the specified parent resource. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachineInstancesList, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineInstancesList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstancesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachineInstancesList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances"} # type: ignore + + + def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + body=None, # type: Optional["_models.StopVirtualMachineOptions"] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'StopVirtualMachineOptions') + else: + _json = None + + request = build_stop_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop"} # type: ignore + + + @distributed_trace + def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + body=None, # type: Optional["_models.StopVirtualMachineOptions"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Implements the operation to stop a virtual machine. + + The operation to power off (stop) a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Virtualmachine stop action payload. + :type body: ~azure_arc_vmware_management_service_api.models.StopVirtualMachineOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/stop"} # type: ignore + + def _start_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_start_request_initial( + resource_uri=resource_uri, + api_version=api_version, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start"} # type: ignore + + + @distributed_trace + def begin_start( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Implements the operation to start a virtual machine. + + The operation to start a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_uri=resource_uri, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/start"} # type: ignore + + def _restart_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_restart_request_initial( + resource_uri=resource_uri, + api_version=api_version, + template_url=self._restart_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restart_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/restart"} # type: ignore + + + @distributed_trace + def begin_restart( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Implements the operation to restart a virtual machine. + + The operation to restart a virtual machine instance. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restart_initial( + resource_uri=resource_uri, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_restart.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/restart"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_machine_templates_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machine_templates_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_machine_templates_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machine_templates_operations.py index 41775a9c43a..e8fd018e21f 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_machine_templates_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machine_templates_operations.py @@ -40,7 +40,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -80,7 +80,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ def build_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str force = kwargs.pop('force', None) # type: Optional[bool] accept = "application/json" @@ -195,7 +195,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ class VirtualMachineTemplatesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -294,7 +294,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -357,7 +357,7 @@ def begin_create( :param virtual_machine_template_name: Name of the virtual machine template resource. :type virtual_machine_template_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VirtualMachineTemplate + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -369,10 +369,10 @@ def begin_create( :return: An instance of LROPoller that returns either VirtualMachineTemplate or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.VirtualMachineTemplate] + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] @@ -433,7 +433,7 @@ def get( :type virtual_machine_template_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineTemplate, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualMachineTemplate + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] @@ -442,7 +442,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -495,10 +495,10 @@ def update( :param virtual_machine_template_name: Name of the virtual machine template resource. :type virtual_machine_template_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineTemplate, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualMachineTemplate + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachineTemplate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] @@ -507,7 +507,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -563,7 +563,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -625,7 +625,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -677,10 +677,10 @@ def list( :return: An iterator like instance of either VirtualMachineTemplatesList or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachineTemplatesList] + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplatesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplatesList"] error_map = { @@ -757,10 +757,10 @@ def list_by_resource_group( :return: An iterator like instance of either VirtualMachineTemplatesList or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachineTemplatesList] + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachineTemplatesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplatesList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_machines_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machines_operations.py similarity index 91% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_machines_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machines_operations.py index 10b31232a8d..9d834c2e311 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_machines_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_machines_operations.py @@ -36,19 +36,19 @@ def build_assess_patches_request_initial( subscription_id, # type: str resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/assessPatches") # pylint: disable=line-too-long + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/assessPatches") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), } _url = _format_url_section(_url, **path_format_arguments) @@ -73,20 +73,20 @@ def build_assess_patches_request_initial( def build_install_patches_request_initial( subscription_id, # type: str resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/installPatches") # pylint: disable=line-too-long + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/installPatches") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "virtualMachineName": _SERIALIZER.url("virtual_machine_name", virtual_machine_name, 'str'), } _url = _format_url_section(_url, **path_format_arguments) @@ -110,14 +110,14 @@ def build_install_patches_request_initial( ) -def build_create_request_initial( +def build_create_or_update_request_initial( subscription_id, # type: str resource_group_name, # type: str virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ def build_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -234,9 +234,9 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + delete_from_host = kwargs.pop('delete_from_host', None) # type: Optional[bool] force = kwargs.pop('force', None) # type: Optional[bool] - retain = kwargs.pop('retain', None) # type: Optional[bool] accept = "application/json" # Construct URL @@ -252,10 +252,10 @@ def build_delete_request_initial( # Construct parameters _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if delete_from_host is not None: + _query_parameters['deleteFromHost'] = _SERIALIZER.query("delete_from_host", delete_from_host, 'bool') if force is not None: _query_parameters['force'] = _SERIALIZER.query("force", force, 'bool') - if retain is not None: - _query_parameters['retain'] = _SERIALIZER.query("retain", retain, 'bool') # Construct headers _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] @@ -277,7 +277,7 @@ def build_stop_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -317,7 +317,7 @@ def build_start_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -354,7 +354,7 @@ def build_restart_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -384,12 +384,12 @@ def build_restart_request_initial( ) -def build_list_request( +def build_list_all_request( subscription_id, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -417,13 +417,13 @@ def build_list_request( ) -def build_list_by_resource_group_request( +def build_list_request( subscription_id, # type: str resource_group_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -459,7 +459,7 @@ class VirtualMachinesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -477,7 +477,7 @@ def __init__(self, client, config, serializer, deserializer): def _assess_patches_initial( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> Optional["_models.VirtualMachineAssessPatchesResult"] @@ -487,13 +487,13 @@ def _assess_patches_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_assess_patches_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, template_url=self._assess_patches_initial.metadata['url'], ) @@ -520,14 +520,14 @@ def _assess_patches_initial( return deserialized - _assess_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/assessPatches"} # type: ignore + _assess_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/assessPatches"} # type: ignore @distributed_trace def begin_assess_patches( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller["_models.VirtualMachineAssessPatchesResult"] @@ -535,8 +535,8 @@ def begin_assess_patches( :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param name: The name of the vSphere VMware machine. - :type name: str + :param virtual_machine_name: The name of the vSphere VMware machine. + :type virtual_machine_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -548,10 +548,10 @@ def begin_assess_patches( :return: An instance of LROPoller that returns either VirtualMachineAssessPatchesResult or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.VirtualMachineAssessPatchesResult] + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineAssessPatchesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineAssessPatchesResult"] lro_delay = kwargs.pop( @@ -562,7 +562,7 @@ def begin_assess_patches( if cont_token is None: raw_result = self._assess_patches_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, cls=lambda x,y,z: x, **kwargs @@ -589,12 +589,12 @@ def get_long_running_output(pipeline_response): ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_assess_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/assessPatches"} # type: ignore + begin_assess_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/assessPatches"} # type: ignore def _install_patches_initial( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str install_patches_input, # type: "_models.VirtualMachineInstallPatchesParameters" **kwargs # type: Any ): @@ -605,7 +605,7 @@ def _install_patches_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(install_patches_input, 'VirtualMachineInstallPatchesParameters') @@ -613,7 +613,7 @@ def _install_patches_initial( request = build_install_patches_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, api_version=api_version, content_type=content_type, json=_json, @@ -642,14 +642,14 @@ def _install_patches_initial( return deserialized - _install_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/installPatches"} # type: ignore + _install_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/installPatches"} # type: ignore @distributed_trace def begin_install_patches( self, resource_group_name, # type: str - name, # type: str + virtual_machine_name, # type: str install_patches_input, # type: "_models.VirtualMachineInstallPatchesParameters" **kwargs # type: Any ): @@ -658,11 +658,11 @@ def begin_install_patches( :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param name: The name of the vSphere VMware machine. - :type name: str + :param virtual_machine_name: The name of the vSphere VMware machine. + :type virtual_machine_name: str :param install_patches_input: Input for InstallPatches as directly received by the API. :type install_patches_input: - ~azure.mgmt.connectedvmware.models.VirtualMachineInstallPatchesParameters + ~azure_arc_vmware_management_service_api.models.VirtualMachineInstallPatchesParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -674,10 +674,10 @@ def begin_install_patches( :return: An instance of LROPoller that returns either VirtualMachineInstallPatchesResult or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.VirtualMachineInstallPatchesResult] + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachineInstallPatchesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstallPatchesResult"] @@ -689,7 +689,7 @@ def begin_install_patches( if cont_token is None: raw_result = self._install_patches_initial( resource_group_name=resource_group_name, - name=name, + virtual_machine_name=virtual_machine_name, install_patches_input=install_patches_input, api_version=api_version, content_type=content_type, @@ -718,9 +718,9 @@ def get_long_running_output(pipeline_response): ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{name}/installPatches"} # type: ignore + begin_install_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/installPatches"} # type: ignore - def _create_initial( + def _create_or_update_initial( self, resource_group_name, # type: str virtual_machine_name, # type: str @@ -734,7 +734,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -742,14 +742,14 @@ def _create_initial( else: _json = None - request = build_create_request_initial( + request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, content_type=content_type, json=_json, - template_url=self._create_initial.metadata['url'], + template_url=self._create_or_update_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -776,11 +776,11 @@ def _create_initial( return deserialized - _create_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore @distributed_trace - def begin_create( + def begin_create_or_update( self, resource_group_name, # type: str virtual_machine_name, # type: str @@ -797,7 +797,7 @@ def begin_create( :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VirtualMachine + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachine :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -808,10 +808,11 @@ def begin_create( Retry-After header is present. :return: An instance of LROPoller that returns either VirtualMachine or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.VirtualMachine] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachine] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] @@ -821,7 +822,7 @@ def begin_create( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, body=body, @@ -852,7 +853,7 @@ def get_long_running_output(pipeline_response): ) return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}"} # type: ignore @distributed_trace def get( @@ -872,7 +873,7 @@ def get( :type virtual_machine_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachine, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualMachine + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualMachine :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] @@ -881,7 +882,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -930,7 +931,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -994,7 +995,7 @@ def begin_update( :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.VirtualMachineUpdate + :type body: ~azure_arc_vmware_management_service_api.models.VirtualMachineUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1005,10 +1006,11 @@ def begin_update( Retry-After header is present. :return: An instance of LROPoller that returns either VirtualMachine or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.VirtualMachine] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualMachine] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] @@ -1055,8 +1057,8 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name, # type: str virtual_machine_name, # type: str + delete_from_host=None, # type: Optional[bool] force=None, # type: Optional[bool] - retain=None, # type: Optional[bool] **kwargs # type: Any ): # type: (...) -> None @@ -1066,7 +1068,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -1074,8 +1076,8 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, api_version=api_version, + delete_from_host=delete_from_host, force=force, - retain=retain, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) @@ -1103,8 +1105,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name, # type: str virtual_machine_name, # type: str + delete_from_host=None, # type: Optional[bool] force=None, # type: Optional[bool] - retain=None, # type: Optional[bool] **kwargs # type: Any ): # type: (...) -> LROPoller[None] @@ -1116,10 +1118,10 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type resource_group_name: str :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str + :param delete_from_host: Whether to delete the VM from the vCenter. + :type delete_from_host: bool :param force: Whether force delete was specified. :type force: bool - :param retain: Whether to just disable the VM from azure and retain the VM in the VMM. - :type retain: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1132,7 +1134,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -1144,8 +1146,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements raw_result = self._delete_initial( resource_group_name=resource_group_name, virtual_machine_name=virtual_machine_name, + delete_from_host=delete_from_host, force=force, - retain=retain, api_version=api_version, cls=lambda x,y,z: x, **kwargs @@ -1185,7 +1187,7 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -1240,7 +1242,7 @@ def begin_stop( # pylint: disable=inconsistent-return-statements :param virtual_machine_name: Name of the virtual machine resource. :type virtual_machine_name: str :param body: Virtualmachine stop action payload. - :type body: ~azure.mgmt.connectedvmware.models.StopVirtualMachineOptions + :type body: ~azure_arc_vmware_management_service_api.models.StopVirtualMachineOptions :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1253,7 +1255,7 @@ def begin_stop( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -1279,7 +1281,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1306,7 +1308,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_start_request_initial( @@ -1364,7 +1366,7 @@ def begin_start( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -1387,7 +1389,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1414,7 +1416,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_restart_request_initial( @@ -1472,7 +1474,7 @@ def begin_restart( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -1495,7 +1497,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1510,7 +1512,7 @@ def get_long_running_output(pipeline_response): begin_restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}/restart"} # type: ignore @distributed_trace - def list( + def list_all( self, **kwargs # type: Any ): @@ -1521,10 +1523,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachinesList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachinesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] error_map = { @@ -1534,17 +1537,17 @@ def list( def prepare_request(next_link=None): if not next_link: - request = build_list_request( + request = build_list_all_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list.metadata['url'], + template_url=self.list_all.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_request( + request = build_list_all_request( subscription_id=self._config.subscription_id, api_version=api_version, template_url=next_link, @@ -1582,10 +1585,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore @distributed_trace - def list_by_resource_group( + def list( self, resource_group_name, # type: str **kwargs # type: Any @@ -1599,10 +1602,11 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VirtualMachinesList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VirtualMachinesList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] error_map = { @@ -1612,18 +1616,18 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, api_version=api_version, - template_url=self.list_by_resource_group.metadata['url'], + template_url=self.list.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) else: - request = build_list_by_resource_group_request( + request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, api_version=api_version, @@ -1662,4 +1666,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_networks_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_networks_operations.py similarity index 95% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_networks_operations.py rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_networks_operations.py index 2ec2f35dbb2..cda42657951 100644 --- a/src/connectedvmware/azext_connectedvmware/vendored_sdks/operations/_virtual_networks_operations.py +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_virtual_networks_operations.py @@ -40,7 +40,7 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -80,7 +80,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ def build_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -157,7 +157,7 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str force = kwargs.pop('force', None) # type: Optional[bool] accept = "application/json" @@ -195,7 +195,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -229,7 +229,7 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str accept = "application/json" # Construct URL @@ -265,7 +265,7 @@ class VirtualNetworksOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.connectedvmware.models + :type models: ~azure_arc_vmware_management_service_api.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -294,7 +294,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -357,7 +357,7 @@ def begin_create( :param virtual_network_name: Name of the virtual network resource. :type virtual_network_name: str :param body: Request payload. - :type body: ~azure.mgmt.connectedvmware.models.VirtualNetwork + :type body: ~azure_arc_vmware_management_service_api.models.VirtualNetwork :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -368,10 +368,11 @@ def begin_create( Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.connectedvmware.models.VirtualNetwork] + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.VirtualNetwork] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -432,7 +433,7 @@ def get( :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualNetwork + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualNetwork :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -441,7 +442,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_get_request( @@ -494,10 +495,10 @@ def update( :param virtual_network_name: Name of the virtual network resource. :type virtual_network_name: str :param body: Resource properties to update. - :type body: ~azure.mgmt.connectedvmware.models.ResourcePatch + :type body: ~azure_arc_vmware_management_service_api.models.ResourcePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.connectedvmware.models.VirtualNetwork + :rtype: ~azure_arc_vmware_management_service_api.models.VirtualNetwork :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -506,7 +507,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if body is not None: @@ -562,7 +563,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str request = build_delete_request_initial( @@ -624,7 +625,7 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( @@ -674,10 +675,11 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworksList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VirtualNetworksList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VirtualNetworksList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworksList"] error_map = { @@ -752,10 +754,11 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworksList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.connectedvmware.models.VirtualNetworksList] + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VirtualNetworksList] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2022-01-10-preview") # type: str + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworksList"] error_map = { diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_guest_agents_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_guest_agents_operations.py new file mode 100644 index 00000000000..84d63458ec0 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_guest_agents_operations.py @@ -0,0 +1,559 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class VMInstanceGuestAgentsOperations(object): + """VMInstanceGuestAgentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure_arc_vmware_management_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_initial( + self, + resource_uri, # type: str + body=None, # type: Optional["_models.GuestAgent"] + **kwargs # type: Any + ): + # type: (...) -> "_models.GuestAgent" + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'GuestAgent') + else: + _json = None + + request = build_create_request_initial( + resource_uri=resource_uri, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('GuestAgent', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('GuestAgent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + + @distributed_trace + def begin_create( + self, + resource_uri, # type: str + body=None, # type: Optional["_models.GuestAgent"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.GuestAgent"] + """Implements GuestAgent PUT method. + + Create Or Update GuestAgent. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :param body: Request payload. + :type body: ~azure_arc_vmware_management_service_api.models.GuestAgent + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GuestAgent or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure_arc_vmware_management_service_api.models.GuestAgent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_uri=resource_uri, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('GuestAgent', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + @distributed_trace + def get( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.GuestAgent" + """Gets GuestAgent. + + Implements GuestAgent GET method. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GuestAgent, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.GuestAgent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_get_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GuestAgent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_delete_request_initial( + resource_uri=resource_uri, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an GuestAgent. + + Implements GuestAgent DELETE method. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_uri=resource_uri, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents/default"} # type: ignore + + @distributed_trace + def list( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.GuestAgentList"] + """Implements GET GuestAgent in a vm. + + Returns the list of GuestAgent of the given vm. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either GuestAgentList or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.GuestAgentList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgentList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("GuestAgentList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/guestAgents"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_hybrid_identity_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_hybrid_identity_metadata_operations.py new file mode 100644 index 00000000000..83a5c124ae7 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/operations/_vm_instance_hybrid_identity_metadata_operations.py @@ -0,0 +1,259 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + resource_uri, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata") # pylint: disable=line-too-long + path_format_arguments = { + "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class VmInstanceHybridIdentityMetadataOperations(object): + """VmInstanceHybridIdentityMetadataOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure_arc_vmware_management_service_api.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VmInstanceHybridIdentityMetadata" + """Gets HybridIdentityMetadata. + + Implements HybridIdentityMetadata GET method. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VmInstanceHybridIdentityMetadata, or the result of cls(response) + :rtype: ~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VmInstanceHybridIdentityMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + + request = build_get_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VmInstanceHybridIdentityMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata/default"} # type: ignore + + + @distributed_trace + def list( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.VmInstanceHybridIdentityMetadataList"] + """Implements GET HybridIdentityMetadata in a vm. + + Returns the list of HybridIdentityMetadata of the given vm. + + :param resource_uri: The fully qualified Azure Resource manager identifier of the Hybrid + Compute machine resource to be extended. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VmInstanceHybridIdentityMetadataList or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure_arc_vmware_management_service_api.models.VmInstanceHybridIdentityMetadataList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VmInstanceHybridIdentityMetadataList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_uri=resource_uri, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VmInstanceHybridIdentityMetadataList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default/hybridIdentityMetadata"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/py.typed b/src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/py.typed similarity index 100% rename from src/connectedvmware/azext_connectedvmware/vendored_sdks/py.typed rename to src/connectedvmware/azext_connectedvmware/vendored_sdks/connectedvmware/py.typed diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/__init__.py new file mode 100644 index 00000000000..9c696aede38 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._hybrid_compute_management_client import HybridComputeManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['HybridComputeManagementClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_configuration.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_configuration.py new file mode 100644 index 00000000000..54fb16898f7 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_configuration.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class HybridComputeManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for HybridComputeManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :keyword api_version: Api Version. The default value is "2023-04-25-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + super(HybridComputeManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-hybridcompute/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_hybrid_compute_management_client.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_hybrid_compute_management_client.py new file mode 100644 index 00000000000..1bbe62cde9b --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_hybrid_compute_management_client.py @@ -0,0 +1,134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.mgmt.core import ARMPipelineClient + +from . import models +from ._configuration import HybridComputeManagementClientConfiguration +from .operations import AgentVersionOperations, ExtensionMetadataOperations, HybridComputeManagementClientOperationsMixin, HybridIdentityMetadataOperations, MachineExtensionsOperations, MachineRunCommandsOperations, MachinesOperations, NetworkProfileOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, PrivateLinkScopesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class HybridComputeManagementClient(HybridComputeManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """The Hybrid Compute Management Client. + + :ivar machines: MachinesOperations operations + :vartype machines: azure.mgmt.hybridcompute.operations.MachinesOperations + :ivar machine_extensions: MachineExtensionsOperations operations + :vartype machine_extensions: azure.mgmt.hybridcompute.operations.MachineExtensionsOperations + :ivar extension_metadata: ExtensionMetadataOperations operations + :vartype extension_metadata: azure.mgmt.hybridcompute.operations.ExtensionMetadataOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.hybridcompute.operations.Operations + :ivar network_profile: NetworkProfileOperations operations + :vartype network_profile: azure.mgmt.hybridcompute.operations.NetworkProfileOperations + :ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations + :vartype hybrid_identity_metadata: + azure.mgmt.hybridcompute.operations.HybridIdentityMetadataOperations + :ivar agent_version: AgentVersionOperations operations + :vartype agent_version: azure.mgmt.hybridcompute.operations.AgentVersionOperations + :ivar machine_run_commands: MachineRunCommandsOperations operations + :vartype machine_run_commands: azure.mgmt.hybridcompute.operations.MachineRunCommandsOperations + :ivar private_link_scopes: PrivateLinkScopesOperations operations + :vartype private_link_scopes: azure.mgmt.hybridcompute.operations.PrivateLinkScopesOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.hybridcompute.operations.PrivateLinkResourcesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.hybridcompute.operations.PrivateEndpointConnectionsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword api_version: Api Version. The default value is "2023-04-25-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url="https://management.azure.com", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = HybridComputeManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.machines = MachinesOperations(self._client, self._config, self._serialize, self._deserialize) + self.machine_extensions = MachineExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.extension_metadata = ExtensionMetadataOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.network_profile = NetworkProfileOperations(self._client, self._config, self._serialize, self._deserialize) + self.hybrid_identity_metadata = HybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize) + self.agent_version = AgentVersionOperations(self._client, self._config, self._serialize, self._deserialize) + self.machine_run_commands = MachineRunCommandsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_scopes = PrivateLinkScopesOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> HybridComputeManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_patch.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_vendor.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_vendor.py new file mode 100644 index 00000000000..138f663c53a --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_version.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_version.py new file mode 100644 index 00000000000..e5754a47ce6 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/__init__.py new file mode 100644 index 00000000000..3c21e23a168 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._hybrid_compute_management_client import HybridComputeManagementClient +__all__ = ['HybridComputeManagementClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_configuration.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_configuration.py new file mode 100644 index 00000000000..bb4085528c7 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_configuration.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class HybridComputeManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for HybridComputeManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :keyword api_version: Api Version. The default value is "2023-04-25-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(HybridComputeManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-hybridcompute/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_hybrid_compute_management_client.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_hybrid_compute_management_client.py new file mode 100644 index 00000000000..3c96e5964c0 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_hybrid_compute_management_client.py @@ -0,0 +1,131 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models +from ._configuration import HybridComputeManagementClientConfiguration +from .operations import AgentVersionOperations, ExtensionMetadataOperations, HybridComputeManagementClientOperationsMixin, HybridIdentityMetadataOperations, MachineExtensionsOperations, MachineRunCommandsOperations, MachinesOperations, NetworkProfileOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, PrivateLinkScopesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class HybridComputeManagementClient(HybridComputeManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """The Hybrid Compute Management Client. + + :ivar machines: MachinesOperations operations + :vartype machines: azure.mgmt.hybridcompute.aio.operations.MachinesOperations + :ivar machine_extensions: MachineExtensionsOperations operations + :vartype machine_extensions: + azure.mgmt.hybridcompute.aio.operations.MachineExtensionsOperations + :ivar extension_metadata: ExtensionMetadataOperations operations + :vartype extension_metadata: + azure.mgmt.hybridcompute.aio.operations.ExtensionMetadataOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.hybridcompute.aio.operations.Operations + :ivar network_profile: NetworkProfileOperations operations + :vartype network_profile: azure.mgmt.hybridcompute.aio.operations.NetworkProfileOperations + :ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations + :vartype hybrid_identity_metadata: + azure.mgmt.hybridcompute.aio.operations.HybridIdentityMetadataOperations + :ivar agent_version: AgentVersionOperations operations + :vartype agent_version: azure.mgmt.hybridcompute.aio.operations.AgentVersionOperations + :ivar machine_run_commands: MachineRunCommandsOperations operations + :vartype machine_run_commands: + azure.mgmt.hybridcompute.aio.operations.MachineRunCommandsOperations + :ivar private_link_scopes: PrivateLinkScopesOperations operations + :vartype private_link_scopes: + azure.mgmt.hybridcompute.aio.operations.PrivateLinkScopesOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.hybridcompute.aio.operations.PrivateLinkResourcesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.hybridcompute.aio.operations.PrivateEndpointConnectionsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword api_version: Api Version. The default value is "2023-04-25-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = HybridComputeManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.machines = MachinesOperations(self._client, self._config, self._serialize, self._deserialize) + self.machine_extensions = MachineExtensionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.extension_metadata = ExtensionMetadataOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.network_profile = NetworkProfileOperations(self._client, self._config, self._serialize, self._deserialize) + self.hybrid_identity_metadata = HybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize) + self.agent_version = AgentVersionOperations(self._client, self._config, self._serialize, self._deserialize) + self.machine_run_commands = MachineRunCommandsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_scopes = PrivateLinkScopesOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "HybridComputeManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_patch.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_patch.py new file mode 100644 index 00000000000..f99e77fef98 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/__init__.py new file mode 100644 index 00000000000..8364a3a2a0b --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/__init__.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._machines_operations import MachinesOperations +from ._machine_extensions_operations import MachineExtensionsOperations +from ._hybrid_compute_management_client_operations import HybridComputeManagementClientOperationsMixin +from ._extension_metadata_operations import ExtensionMetadataOperations +from ._operations import Operations +from ._network_profile_operations import NetworkProfileOperations +from ._hybrid_identity_metadata_operations import HybridIdentityMetadataOperations +from ._agent_version_operations import AgentVersionOperations +from ._machine_run_commands_operations import MachineRunCommandsOperations +from ._private_link_scopes_operations import PrivateLinkScopesOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations + +__all__ = [ + 'MachinesOperations', + 'MachineExtensionsOperations', + 'HybridComputeManagementClientOperationsMixin', + 'ExtensionMetadataOperations', + 'Operations', + 'NetworkProfileOperations', + 'HybridIdentityMetadataOperations', + 'AgentVersionOperations', + 'MachineRunCommandsOperations', + 'PrivateLinkScopesOperations', + 'PrivateLinkResourcesOperations', + 'PrivateEndpointConnectionsOperations', +] diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_agent_version_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_agent_version_operations.py new file mode 100644 index 00000000000..3e81b5482cf --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_agent_version_operations.py @@ -0,0 +1,157 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._agent_version_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentVersionOperations: + """AgentVersionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + os_type: str, + **kwargs: Any + ) -> "_models.AgentVersionsList": + """Gets all Agent Versions along with the download link currently present. + + :param os_type: Defines the os type. + :type os_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentVersionsList, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.AgentVersionsList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentVersionsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_list_request( + os_type=os_type, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentVersionsList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions"} # type: ignore + + + @distributed_trace_async + async def get( + self, + os_type: str, + version: str, + **kwargs: Any + ) -> "_models.AgentVersion": + """Gets an Agent Version along with the download link currently present. + + :param os_type: Defines the os type. + :type os_type: str + :param version: Defines the agent version. To get latest, use latest or else a specific agent + version. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentVersion, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.AgentVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + os_type=os_type, + version=version, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions/{version}"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_extension_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_extension_metadata_operations.py new file mode 100644 index 00000000000..1a97b8503ca --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_extension_metadata_operations.py @@ -0,0 +1,202 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._extension_metadata_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExtensionMetadataOperations: + """ExtensionMetadataOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + location: str, + publisher: str, + extension_type: str, + version: str, + **kwargs: Any + ) -> "_models.ExtensionValue": + """Gets an Extension Metadata based on location, publisher, extensionType and version. + + :param location: The location of the Extension being received. + :type location: str + :param publisher: The publisher of the Extension being received. + :type publisher: str + :param extension_type: The extensionType of the Extension being received. + :type extension_type: str + :param version: The version of the Extension being received. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExtensionValue, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.ExtensionValue + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExtensionValue"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + location=location, + publisher=publisher, + extension_type=extension_type, + version=version, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExtensionValue', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}"} # type: ignore + + + @distributed_trace + def list( + self, + location: str, + publisher: str, + extension_type: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExtensionValueListResult"]: + """Gets all Extension versions based on location, publisher, extensionType. + + :param location: The location of the Extension being received. + :type location: str + :param publisher: The publisher of the Extension being received. + :type publisher: str + :param extension_type: The extensionType of the Extension being received. + :type extension_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExtensionValueListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.ExtensionValueListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExtensionValueListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + publisher=publisher, + extension_type=extension_type, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + publisher=publisher, + extension_type=extension_type, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExtensionValueListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_compute_management_client_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_compute_management_client_operations.py new file mode 100644 index 00000000000..119d0024bbc --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_compute_management_client_operations.py @@ -0,0 +1,148 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar, Union + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._hybrid_compute_management_client_operations import build_upgrade_extensions_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class HybridComputeManagementClientOperationsMixin: + + async def _upgrade_extensions_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + machine_name: str, + extension_upgrade_parameters: "_models.MachineExtensionUpgrade", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_upgrade_parameters, 'MachineExtensionUpgrade') + + request = build_upgrade_extensions_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._upgrade_extensions_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _upgrade_extensions_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions"} # type: ignore + + + @distributed_trace_async + async def begin_upgrade_extensions( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + machine_name: str, + extension_upgrade_parameters: "_models.MachineExtensionUpgrade", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """The operation to Upgrade Machine Extensions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation. + :type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_extensions_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_upgrade_parameters=extension_upgrade_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_upgrade_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_identity_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_identity_metadata_operations.py new file mode 100644 index 00000000000..efdab59953a --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_hybrid_identity_metadata_operations.py @@ -0,0 +1,197 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._hybrid_identity_metadata_operations import build_get_request, build_list_by_machines_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class HybridIdentityMetadataOperations: + """HybridIdentityMetadataOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + machine_name: str, + metadata_name: str, + **kwargs: Any + ) -> "_models.HybridIdentityMetadata": + """Gets HybridIdentityMetadata. + + Implements HybridIdentityMetadata GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param metadata_name: Name of the HybridIdentityMetadata. + :type metadata_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridIdentityMetadata, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridIdentityMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + metadata_name=metadata_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridIdentityMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata/{metadataName}"} # type: ignore + + + @distributed_trace + def list_by_machines( + self, + resource_group_name: str, + machine_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.HybridIdentityMetadataList"]: + """Implements GET HybridIdentityMetadata in a machine. + + Returns the list of HybridIdentityMetadata of the given machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridIdentityMetadataList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.HybridIdentityMetadataList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadataList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_machines_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.list_by_machines.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_machines_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("HybridIdentityMetadataList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_machines.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_extensions_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_extensions_operations.py new file mode 100644 index 00000000000..461101edc30 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_extensions_operations.py @@ -0,0 +1,586 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._machine_extensions_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_request, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MachineExtensionsOperations: + """MachineExtensionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + machine_name: str, + extension_name: str, + extension_parameters: "_models.MachineExtension", + **kwargs: Any + ) -> Optional["_models.MachineExtension"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineExtension"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_parameters, 'MachineExtension') + + request = build_create_or_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MachineExtension', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + machine_name: str, + extension_name: str, + extension_parameters: "_models.MachineExtension", + **kwargs: Any + ) -> AsyncLROPoller["_models.MachineExtension"]: + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine where the extension should be created or updated. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :param extension_parameters: Parameters supplied to the Create Machine Extension operation. + :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtension + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MachineExtension or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.hybridcompute.models.MachineExtension] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + extension_parameters=extension_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineExtension', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + machine_name: str, + extension_name: str, + extension_parameters: "_models.MachineExtensionUpdate", + **kwargs: Any + ) -> Optional["_models.MachineExtension"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineExtension"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_parameters, 'MachineExtensionUpdate') + + request = build_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineExtension', pipeline_response) + + 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + machine_name: str, + extension_name: str, + extension_parameters: "_models.MachineExtensionUpdate", + **kwargs: Any + ) -> AsyncLROPoller["_models.MachineExtension"]: + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine where the extension should be created or updated. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :param extension_parameters: Parameters supplied to the Create Machine Extension operation. + :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MachineExtension or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.hybridcompute.models.MachineExtension] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + extension_parameters=extension_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineExtension', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + machine_name: str, + extension_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + machine_name: str, + extension_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine where the extension should be deleted. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + machine_name: str, + extension_name: str, + **kwargs: Any + ) -> "_models.MachineExtension": + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine containing the extension. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MachineExtension, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.MachineExtension + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MachineExtension', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + machine_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.MachineExtensionsListResult"]: + """The operation to get all extensions of a non-Azure machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine containing the extension. + :type machine_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineExtensionsListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.MachineExtensionsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtensionsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("MachineExtensionsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_run_commands_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_run_commands_operations.py new file mode 100644 index 00000000000..f0d8bfa240d --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machine_run_commands_operations.py @@ -0,0 +1,593 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._machine_run_commands_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_request, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MachineRunCommandsOperations: + """MachineRunCommandsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + machine_name: str, + run_command_name: str, + run_command_properties: "_models.MachineRunCommand", + **kwargs: Any + ) -> "_models.MachineRunCommand": + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(run_command_properties, 'MachineRunCommand') + + request = build_create_or_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + if response.status_code == 201: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + machine_name: str, + run_command_name: str, + run_command_properties: "_models.MachineRunCommand", + **kwargs: Any + ) -> AsyncLROPoller["_models.MachineRunCommand"]: + """The operation to create or update a run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :param run_command_properties: Parameters supplied to the Create Run Command. + :type run_command_properties: ~azure.mgmt.hybridcompute.models.MachineRunCommand + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MachineRunCommand or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + run_command_properties=run_command_properties, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + machine_name: str, + run_command_name: str, + run_command_properties: "_models.MachineRunCommandUpdate", + **kwargs: Any + ) -> Optional["_models.MachineRunCommand"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineRunCommand"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(run_command_properties, 'MachineRunCommandUpdate') + + request = build_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + machine_name: str, + run_command_name: str, + run_command_properties: "_models.MachineRunCommandUpdate", + **kwargs: Any + ) -> AsyncLROPoller["_models.MachineRunCommand"]: + """The operation to update the run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :param run_command_properties: Parameters supplied to the Create Run Command. + :type run_command_properties: ~azure.mgmt.hybridcompute.models.MachineRunCommandUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MachineRunCommand or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + run_command_properties=run_command_properties, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + machine_name: str, + run_command_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + machine_name: str, + run_command_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """The operation to delete a run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + machine_name: str, + run_command_name: str, + **kwargs: Any + ) -> "_models.MachineRunCommand": + """The operation to get a run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MachineRunCommand, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.MachineRunCommand + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + machine_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.MachineRunCommandsListResult"]: + """The operation to get all the run commands of a non-Azure machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineRunCommandsListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.MachineRunCommandsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommandsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("MachineRunCommandsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machines_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machines_operations.py new file mode 100644 index 00000000000..6bd4025668e --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_machines_operations.py @@ -0,0 +1,703 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._machines_operations import build_assess_patches_request_initial, build_create_or_update_request, build_delete_request, build_get_request, build_install_patches_request_initial, build_list_by_resource_group_request, build_list_by_subscription_request, build_update_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MachinesOperations: + """MachinesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + machine_name: str, + parameters: "_models.Machine", + **kwargs: Any + ) -> "_models.Machine": + """The operation to create or update a hybrid machine. Please note some properties can be set only + during machine creation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param parameters: Parameters supplied to the Create hybrid machine operation. + :type parameters: ~azure.mgmt.hybridcompute.models.Machine + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Machine, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.Machine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Machine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'Machine') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Machine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + machine_name: str, + parameters: "_models.MachineUpdate", + **kwargs: Any + ) -> "_models.Machine": + """The operation to update a hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param parameters: Parameters supplied to the Update hybrid machine operation. + :type parameters: ~azure.mgmt.hybridcompute.models.MachineUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Machine, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.Machine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Machine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'MachineUpdate') + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Machine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + machine_name: str, + **kwargs: Any + ) -> None: + """The operation to delete a hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + machine_name: str, + expand: Optional[Union[str, "_models.InstanceViewTypes"]] = None, + **kwargs: Any + ) -> "_models.Machine": + """Retrieves information about the model view or the instance view of a hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str or ~azure.mgmt.hybridcompute.models.InstanceViewTypes + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Machine, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.Machine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Machine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Machine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + async def _assess_patches_initial( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> Optional["_models.MachineAssessPatchesResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineAssessPatchesResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_assess_patches_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + name=name, + api_version=api_version, + template_url=self._assess_patches_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineAssessPatchesResult', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _assess_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches"} # type: ignore + + + @distributed_trace_async + async def begin_assess_patches( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.MachineAssessPatchesResult"]: + """The operation to assess patches on a hybrid machine identity in Azure. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the hybrid machine. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MachineAssessPatchesResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.hybridcompute.models.MachineAssessPatchesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineAssessPatchesResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._assess_patches_initial( + resource_group_name=resource_group_name, + name=name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineAssessPatchesResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_assess_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches"} # type: ignore + + async def _install_patches_initial( + self, + resource_group_name: str, + name: str, + install_patches_input: "_models.MachineInstallPatchesParameters", + **kwargs: Any + ) -> Optional["_models.MachineInstallPatchesResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineInstallPatchesResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(install_patches_input, 'MachineInstallPatchesParameters') + + request = build_install_patches_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + name=name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._install_patches_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineInstallPatchesResult', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _install_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches"} # type: ignore + + + @distributed_trace_async + async def begin_install_patches( + self, + resource_group_name: str, + name: str, + install_patches_input: "_models.MachineInstallPatchesParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.MachineInstallPatchesResult"]: + """The operation to install patches on a hybrid machine identity in Azure. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the hybrid machine. + :type name: str + :param install_patches_input: Input for InstallPatches as directly received by the API. + :type install_patches_input: ~azure.mgmt.hybridcompute.models.MachineInstallPatchesParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MachineInstallPatchesResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.hybridcompute.models.MachineInstallPatchesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineInstallPatchesResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._install_patches_initial( + resource_group_name=resource_group_name, + name=name, + install_patches_input=install_patches_input, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineInstallPatchesResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_install_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MachineListResult"]: + """Lists all the hybrid machines in the specified resource group. Use the nextLink property in the + response to get the next page of hybrid machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.MachineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("MachineListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines"} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.MachineListResult"]: + """Lists all the hybrid machines in the specified subscription. Use the nextLink property in the + response to get the next page of hybrid machines. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.MachineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("MachineListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_network_profile_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_network_profile_operations.py new file mode 100644 index 00000000000..92dc40d751e --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_network_profile_operations.py @@ -0,0 +1,103 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._network_profile_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkProfileOperations: + """NetworkProfileOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + machine_name: str, + **kwargs: Any + ) -> "_models.NetworkProfile": + """The operation to get network information of hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_operations.py new file mode 100644 index 00000000000..f94cfaefb6e --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_operations.py @@ -0,0 +1,116 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of hybrid compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/providers/Microsoft.HybridCompute/operations"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_endpoint_connections_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 00000000000..f36c1071dc7 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,444 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_endpoint_connections_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_private_link_scope_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + scope_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + scope_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> Optional["_models.PrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateEndpointConnection') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + scope_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: + :type parameters: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.hybridcompute.models.PrivateEndpointConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + scope_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + scope_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + @distributed_trace + def list_by_private_link_scope( + self, + resource_group_name: str, + scope_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """Gets all private endpoint connections on a private link scope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=self.list_by_private_link_scope.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_private_link_scope.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_resources_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_resources_operations.py new file mode 100644 index 00000000000..bc899acbce9 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,193 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_link_resources_operations import build_get_request, build_list_by_private_link_scope_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_private_link_scope( + self, + resource_group_name: str, + scope_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=self.list_by_private_link_scope.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_private_link_scope.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + scope_name: str, + group_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param group_name: The name of the private link resource. + :type group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + group_name=group_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_scopes_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_scopes_operations.py new file mode 100644 index 00000000000..3f506cd32e9 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/aio/operations/_private_link_scopes_operations.py @@ -0,0 +1,630 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_link_scopes_operations import build_create_or_update_request, build_delete_request_initial, build_get_request, build_get_validation_details_for_machine_request, build_get_validation_details_request, build_list_by_resource_group_request, build_list_request, build_update_tags_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkScopesOperations: + """PrivateLinkScopesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.HybridComputePrivateLinkScopeListResult"]: + """Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridComputePrivateLinkScopeListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScopeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("HybridComputePrivateLinkScopeListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.HybridComputePrivateLinkScopeListResult"]: + """Gets a list of Azure Arc PrivateLinkScopes within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridComputePrivateLinkScopeListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScopeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("HybridComputePrivateLinkScopeListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + scope_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + scope_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Azure Arc PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + scope_name: str, + **kwargs: Any + ) -> "_models.HybridComputePrivateLinkScope": + """Returns a Azure Arc PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridComputePrivateLinkScope, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + scope_name: str, + parameters: "_models.HybridComputePrivateLinkScope", + **kwargs: Any + ) -> "_models.HybridComputePrivateLinkScope": + """Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value + for InstrumentationKey nor AppId in the Put operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param parameters: Properties that need to be specified to create or update a Azure Arc for + Servers and Clusters PrivateLinkScope. + :type parameters: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridComputePrivateLinkScope, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'HybridComputePrivateLinkScope') + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + scope_name: str, + private_link_scope_tags: "_models.TagsResource", + **kwargs: Any + ) -> "_models.HybridComputePrivateLinkScope": + """Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate + method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope + instance. + :type private_link_scope_tags: ~azure.mgmt.hybridcompute.models.TagsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridComputePrivateLinkScope, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(private_link_scope_tags, 'TagsResource') + + request = build_update_tags_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace_async + async def get_validation_details( + self, + location: str, + private_link_scope_id: str, + **kwargs: Any + ) -> "_models.PrivateLinkScopeValidationDetails": + """Returns a Azure Arc PrivateLinkScope's validation details. + + :param location: The location of the target resource. + :type location: str + :param private_link_scope_id: The id (Guid) of the Azure Arc PrivateLinkScope resource. + :type private_link_scope_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkScopeValidationDetails, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateLinkScopeValidationDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkScopeValidationDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_validation_details_request( + location=location, + subscription_id=self._config.subscription_id, + private_link_scope_id=private_link_scope_id, + api_version=api_version, + template_url=self.get_validation_details.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkScopeValidationDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_validation_details.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}"} # type: ignore + + + @distributed_trace_async + async def get_validation_details_for_machine( + self, + resource_group_name: str, + machine_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkScopeValidationDetails": + """Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the target machine to get the private link scope validation + details for. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkScopeValidationDetails, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateLinkScopeValidationDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkScopeValidationDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_validation_details_for_machine_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.get_validation_details_for_machine.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkScopeValidationDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_validation_details_for_machine.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/__init__.py new file mode 100644 index 00000000000..a670371c282 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/__init__.py @@ -0,0 +1,274 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AgentConfiguration + from ._models_py3 import AgentUpgrade + from ._models_py3 import AgentVersion + from ._models_py3 import AgentVersionsList + from ._models_py3 import AvailablePatchCountByClassification + from ._models_py3 import CloudMetadata + from ._models_py3 import ConfigurationExtension + from ._models_py3 import ConnectionDetail + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorDetailAutoGenerated + from ._models_py3 import ErrorResponse + from ._models_py3 import ErrorResponseAutoGenerated + from ._models_py3 import ExtensionTargetProperties + from ._models_py3 import ExtensionValue + from ._models_py3 import ExtensionValueListResult + from ._models_py3 import HybridComputePrivateLinkScope + from ._models_py3 import HybridComputePrivateLinkScopeListResult + from ._models_py3 import HybridComputePrivateLinkScopeProperties + from ._models_py3 import HybridIdentityMetadata + from ._models_py3 import HybridIdentityMetadataList + from ._models_py3 import Identity + from ._models_py3 import IpAddress + from ._models_py3 import LinuxParameters + from ._models_py3 import LocationData + from ._models_py3 import Machine + from ._models_py3 import MachineAssessPatchesResult + from ._models_py3 import MachineExtension + from ._models_py3 import MachineExtensionInstanceView + from ._models_py3 import MachineExtensionInstanceViewStatus + from ._models_py3 import MachineExtensionUpdate + from ._models_py3 import MachineExtensionUpgrade + from ._models_py3 import MachineExtensionsListResult + from ._models_py3 import MachineInstallPatchesParameters + from ._models_py3 import MachineInstallPatchesResult + from ._models_py3 import MachineListResult + from ._models_py3 import MachineRunCommand + from ._models_py3 import MachineRunCommandInstanceView + from ._models_py3 import MachineRunCommandInstanceViewStatus + from ._models_py3 import MachineRunCommandScriptSource + from ._models_py3 import MachineRunCommandUpdate + from ._models_py3 import MachineRunCommandsListResult + from ._models_py3 import MachineUpdate + from ._models_py3 import NetworkInterface + from ._models_py3 import NetworkProfile + from ._models_py3 import OSProfile + from ._models_py3 import OSProfileLinuxConfiguration + from ._models_py3 import OSProfileWindowsConfiguration + from ._models_py3 import OperationListResult + from ._models_py3 import OperationValue + from ._models_py3 import OperationValueDisplay + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionDataModel + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateEndpointConnectionProperties + from ._models_py3 import PrivateEndpointProperty + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkResourceProperties + from ._models_py3 import PrivateLinkScopeValidationDetails + from ._models_py3 import PrivateLinkScopesResource + from ._models_py3 import PrivateLinkServiceConnectionStateProperty + from ._models_py3 import ProxyResource + from ._models_py3 import Resource + from ._models_py3 import ResourceUpdate + from ._models_py3 import RunCommandInputParameter + from ._models_py3 import RunCommandManagedIdentity + from ._models_py3 import ServiceStatus + from ._models_py3 import ServiceStatuses + from ._models_py3 import Subnet + from ._models_py3 import SystemData + from ._models_py3 import TagsResource + from ._models_py3 import TrackedResource + from ._models_py3 import WindowsParameters +except (SyntaxError, ImportError): + from ._models import AgentConfiguration # type: ignore + from ._models import AgentUpgrade # type: ignore + from ._models import AgentVersion # type: ignore + from ._models import AgentVersionsList # type: ignore + from ._models import AvailablePatchCountByClassification # type: ignore + from ._models import CloudMetadata # type: ignore + from ._models import ConfigurationExtension # type: ignore + from ._models import ConnectionDetail # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorDetailAutoGenerated # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import ErrorResponseAutoGenerated # type: ignore + from ._models import ExtensionTargetProperties # type: ignore + from ._models import ExtensionValue # type: ignore + from ._models import ExtensionValueListResult # type: ignore + from ._models import HybridComputePrivateLinkScope # type: ignore + from ._models import HybridComputePrivateLinkScopeListResult # type: ignore + from ._models import HybridComputePrivateLinkScopeProperties # type: ignore + from ._models import HybridIdentityMetadata # type: ignore + from ._models import HybridIdentityMetadataList # type: ignore + from ._models import Identity # type: ignore + from ._models import IpAddress # type: ignore + from ._models import LinuxParameters # type: ignore + from ._models import LocationData # type: ignore + from ._models import Machine # type: ignore + from ._models import MachineAssessPatchesResult # type: ignore + from ._models import MachineExtension # type: ignore + from ._models import MachineExtensionInstanceView # type: ignore + from ._models import MachineExtensionInstanceViewStatus # type: ignore + from ._models import MachineExtensionUpdate # type: ignore + from ._models import MachineExtensionUpgrade # type: ignore + from ._models import MachineExtensionsListResult # type: ignore + from ._models import MachineInstallPatchesParameters # type: ignore + from ._models import MachineInstallPatchesResult # type: ignore + from ._models import MachineListResult # type: ignore + from ._models import MachineRunCommand # type: ignore + from ._models import MachineRunCommandInstanceView # type: ignore + from ._models import MachineRunCommandInstanceViewStatus # type: ignore + from ._models import MachineRunCommandScriptSource # type: ignore + from ._models import MachineRunCommandUpdate # type: ignore + from ._models import MachineRunCommandsListResult # type: ignore + from ._models import MachineUpdate # type: ignore + from ._models import NetworkInterface # type: ignore + from ._models import NetworkProfile # type: ignore + from ._models import OSProfile # type: ignore + from ._models import OSProfileLinuxConfiguration # type: ignore + from ._models import OSProfileWindowsConfiguration # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import OperationValueDisplay # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionDataModel # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateEndpointConnectionProperties # type: ignore + from ._models import PrivateEndpointProperty # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkResourceProperties # type: ignore + from ._models import PrivateLinkScopeValidationDetails # type: ignore + from ._models import PrivateLinkScopesResource # type: ignore + from ._models import PrivateLinkServiceConnectionStateProperty # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceUpdate # type: ignore + from ._models import RunCommandInputParameter # type: ignore + from ._models import RunCommandManagedIdentity # type: ignore + from ._models import ServiceStatus # type: ignore + from ._models import ServiceStatuses # type: ignore + from ._models import Subnet # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsResource # type: ignore + from ._models import TrackedResource # type: ignore + from ._models import WindowsParameters # type: ignore + +from ._hybrid_compute_management_client_enums import ( + AgentConfigurationMode, + AssessmentModeTypes, + CreatedByType, + InstanceViewTypes, + LastAttemptStatusEnum, + OsType, + PatchModeTypes, + PatchOperationStartedBy, + PatchOperationStatus, + PatchServiceUsed, + PrivateCloudKind, + PublicNetworkAccessType, + StatusLevelTypes, + StatusTypes, + VMGuestPatchClassificationLinux, + VMGuestPatchClassificationWindows, + VMGuestPatchRebootSetting, + VMGuestPatchRebootStatus, +) + +__all__ = [ + 'AgentConfiguration', + 'AgentUpgrade', + 'AgentVersion', + 'AgentVersionsList', + 'AvailablePatchCountByClassification', + 'CloudMetadata', + 'ConfigurationExtension', + 'ConnectionDetail', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorDetailAutoGenerated', + 'ErrorResponse', + 'ErrorResponseAutoGenerated', + 'ExtensionTargetProperties', + 'ExtensionValue', + 'ExtensionValueListResult', + 'HybridComputePrivateLinkScope', + 'HybridComputePrivateLinkScopeListResult', + 'HybridComputePrivateLinkScopeProperties', + 'HybridIdentityMetadata', + 'HybridIdentityMetadataList', + 'Identity', + 'IpAddress', + 'LinuxParameters', + 'LocationData', + 'Machine', + 'MachineAssessPatchesResult', + 'MachineExtension', + 'MachineExtensionInstanceView', + 'MachineExtensionInstanceViewStatus', + 'MachineExtensionUpdate', + 'MachineExtensionUpgrade', + 'MachineExtensionsListResult', + 'MachineInstallPatchesParameters', + 'MachineInstallPatchesResult', + 'MachineListResult', + 'MachineRunCommand', + 'MachineRunCommandInstanceView', + 'MachineRunCommandInstanceViewStatus', + 'MachineRunCommandScriptSource', + 'MachineRunCommandUpdate', + 'MachineRunCommandsListResult', + 'MachineUpdate', + 'NetworkInterface', + 'NetworkProfile', + 'OSProfile', + 'OSProfileLinuxConfiguration', + 'OSProfileWindowsConfiguration', + 'OperationListResult', + 'OperationValue', + 'OperationValueDisplay', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionDataModel', + 'PrivateEndpointConnectionListResult', + 'PrivateEndpointConnectionProperties', + 'PrivateEndpointProperty', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkResourceProperties', + 'PrivateLinkScopeValidationDetails', + 'PrivateLinkScopesResource', + 'PrivateLinkServiceConnectionStateProperty', + 'ProxyResource', + 'Resource', + 'ResourceUpdate', + 'RunCommandInputParameter', + 'RunCommandManagedIdentity', + 'ServiceStatus', + 'ServiceStatuses', + 'Subnet', + 'SystemData', + 'TagsResource', + 'TrackedResource', + 'WindowsParameters', + 'AgentConfigurationMode', + 'AssessmentModeTypes', + 'CreatedByType', + 'InstanceViewTypes', + 'LastAttemptStatusEnum', + 'OsType', + 'PatchModeTypes', + 'PatchOperationStartedBy', + 'PatchOperationStatus', + 'PatchServiceUsed', + 'PrivateCloudKind', + 'PublicNetworkAccessType', + 'StatusLevelTypes', + 'StatusTypes', + 'VMGuestPatchClassificationLinux', + 'VMGuestPatchClassificationWindows', + 'VMGuestPatchRebootSetting', + 'VMGuestPatchRebootStatus', +] diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_hybrid_compute_management_client_enums.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_hybrid_compute_management_client_enums.py new file mode 100644 index 00000000000..6aa3cbf9669 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_hybrid_compute_management_client_enums.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta + + +class AgentConfigurationMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Name of configuration mode to use. Modes are pre-defined configurations of security controls, + extension allowlists and guest configuration, maintained by Microsoft. + """ + + FULL = "full" + MONITOR = "monitor" + +class AssessmentModeTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the assessment mode. + """ + + IMAGE_DEFAULT = "ImageDefault" + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + +class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class InstanceViewTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + INSTANCE_VIEW = "instanceView" + +class LastAttemptStatusEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the status of Agent Upgrade. + """ + + SUCCESS = "Success" + FAILED = "Failed" + +class OsType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The operating system type of the machine. + """ + + WINDOWS = "Windows" + LINUX = "Linux" + +class PatchModeTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the patch mode. + """ + + IMAGE_DEFAULT = "ImageDefault" + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + AUTOMATIC_BY_OS = "AutomaticByOS" + MANUAL = "Manual" + +class PatchOperationStartedBy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Indicates if operation was triggered by user or by platform. + """ + + USER = "User" + PLATFORM = "Platform" + +class PatchOperationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The overall success or failure status of the operation. It remains "InProgress" until the + operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or + "CompletedWithWarnings." + """ + + UNKNOWN = "Unknown" + IN_PROGRESS = "InProgress" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + +class PatchServiceUsed(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the patch service used for the operation. + """ + + UNKNOWN = "Unknown" + WU = "WU" + WU_WSUS = "WU_WSUS" + YUM = "YUM" + APT = "APT" + ZYPPER = "Zypper" + +class PrivateCloudKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. + """ + + AVS = "AVS" + HCI = "HCI" + SCVMM = "SCVMM" + V_MWARE = "VMware" + +class PublicNetworkAccessType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The network access policy to determine if Azure Arc agents can use public Azure Arc service + endpoints. Defaults to disabled (access to Azure Arc services only via private link). + """ + + #: Allows Azure Arc agents to communicate with Azure Arc services over both public (internet) and + #: private endpoints. + ENABLED = "Enabled" + #: Does not allow Azure Arc agents to communicate with Azure Arc services over public (internet) + #: endpoints. The agents must use the private link. + DISABLED = "Disabled" + +class StatusLevelTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The level code. + """ + + INFO = "Info" + WARNING = "Warning" + ERROR = "Error" + +class StatusTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the hybrid machine agent. + """ + + CONNECTED = "Connected" + DISCONNECTED = "Disconnected" + ERROR = "Error" + +class VMGuestPatchClassificationLinux(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + CRITICAL = "Critical" + SECURITY = "Security" + OTHER = "Other" + +class VMGuestPatchClassificationWindows(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + CRITICAL = "Critical" + SECURITY = "Security" + UPDATE_ROLL_UP = "UpdateRollUp" + FEATURE_PACK = "FeaturePack" + SERVICE_PACK = "ServicePack" + DEFINITION = "Definition" + TOOLS = "Tools" + UPDATES = "Updates" + +class VMGuestPatchRebootSetting(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Defines when it is acceptable to reboot a VM during a software update operation. + """ + + IF_REQUIRED = "IfRequired" + NEVER = "Never" + ALWAYS = "Always" + +class VMGuestPatchRebootStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The reboot state of the VM following completion of the operation. + """ + + UNKNOWN = "Unknown" + NOT_NEEDED = "NotNeeded" + REQUIRED = "Required" + STARTED = "Started" + FAILED = "Failed" + COMPLETED = "Completed" diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models.py new file mode 100644 index 00000000000..784879bdffb --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models.py @@ -0,0 +1,3529 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AgentConfiguration(msrest.serialization.Model): + """Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar proxy_url: Specifies the URL of the proxy to be used. + :vartype proxy_url: str + :ivar incoming_connections_ports: Specifies the list of ports that the agent will be able to + listen on. + :vartype incoming_connections_ports: list[str] + :ivar extensions_allow_list: Array of extensions that are allowed to be installed or updated. + :vartype extensions_allow_list: list[~azure.mgmt.hybridcompute.models.ConfigurationExtension] + :ivar extensions_block_list: Array of extensions that are blocked (cannot be installed or + updated). + :vartype extensions_block_list: list[~azure.mgmt.hybridcompute.models.ConfigurationExtension] + :ivar proxy_bypass: List of service names which should not use the specified proxy server. + :vartype proxy_bypass: list[str] + :ivar extensions_enabled: Specifies whether the extension service is enabled or disabled. + :vartype extensions_enabled: str + :ivar guest_configuration_enabled: Specified whether the guest configuration service is enabled + or disabled. + :vartype guest_configuration_enabled: str + :ivar config_mode: Name of configuration mode to use. Modes are pre-defined configurations of + security controls, extension allowlists and guest configuration, maintained by Microsoft. + Possible values include: "full", "monitor". + :vartype config_mode: str or ~azure.mgmt.hybridcompute.models.AgentConfigurationMode + """ + + _validation = { + 'proxy_url': {'readonly': True}, + 'incoming_connections_ports': {'readonly': True}, + 'extensions_allow_list': {'readonly': True}, + 'extensions_block_list': {'readonly': True}, + 'proxy_bypass': {'readonly': True}, + 'extensions_enabled': {'readonly': True}, + 'guest_configuration_enabled': {'readonly': True}, + 'config_mode': {'readonly': True}, + } + + _attribute_map = { + 'proxy_url': {'key': 'proxyUrl', 'type': 'str'}, + 'incoming_connections_ports': {'key': 'incomingConnectionsPorts', 'type': '[str]'}, + 'extensions_allow_list': {'key': 'extensionsAllowList', 'type': '[ConfigurationExtension]'}, + 'extensions_block_list': {'key': 'extensionsBlockList', 'type': '[ConfigurationExtension]'}, + 'proxy_bypass': {'key': 'proxyBypass', 'type': '[str]'}, + 'extensions_enabled': {'key': 'extensionsEnabled', 'type': 'str'}, + 'guest_configuration_enabled': {'key': 'guestConfigurationEnabled', 'type': 'str'}, + 'config_mode': {'key': 'configMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AgentConfiguration, self).__init__(**kwargs) + self.proxy_url = None + self.incoming_connections_ports = None + self.extensions_allow_list = None + self.extensions_block_list = None + self.proxy_bypass = None + self.extensions_enabled = None + self.guest_configuration_enabled = None + self.config_mode = None + + +class AgentUpgrade(msrest.serialization.Model): + """The info w.r.t Agent Upgrade. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar desired_version: Specifies the version info w.r.t AgentUpgrade for the machine. + :vartype desired_version: str + :ivar correlation_id: The correlation ID passed in from RSM per upgrade. + :vartype correlation_id: str + :ivar enable_automatic_upgrade: Specifies if RSM should try to upgrade this machine. + :vartype enable_automatic_upgrade: bool + :ivar last_attempt_desired_version: Specifies the version of the last attempt. + :vartype last_attempt_desired_version: str + :ivar last_attempt_timestamp: Timestamp of last upgrade attempt. + :vartype last_attempt_timestamp: str + :ivar last_attempt_status: Specifies the status of Agent Upgrade. Possible values include: + "Success", "Failed". + :vartype last_attempt_status: str or ~azure.mgmt.hybridcompute.models.LastAttemptStatusEnum + :ivar last_attempt_message: Failure message of last upgrade attempt if any. + :vartype last_attempt_message: str + """ + + _validation = { + 'last_attempt_desired_version': {'readonly': True}, + 'last_attempt_timestamp': {'readonly': True}, + 'last_attempt_status': {'readonly': True}, + 'last_attempt_message': {'readonly': True}, + } + + _attribute_map = { + 'desired_version': {'key': 'desiredVersion', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'enable_automatic_upgrade': {'key': 'enableAutomaticUpgrade', 'type': 'bool'}, + 'last_attempt_desired_version': {'key': 'lastAttemptDesiredVersion', 'type': 'str'}, + 'last_attempt_timestamp': {'key': 'lastAttemptTimestamp', 'type': 'str'}, + 'last_attempt_status': {'key': 'lastAttemptStatus', 'type': 'str'}, + 'last_attempt_message': {'key': 'lastAttemptMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword desired_version: Specifies the version info w.r.t AgentUpgrade for the machine. + :paramtype desired_version: str + :keyword correlation_id: The correlation ID passed in from RSM per upgrade. + :paramtype correlation_id: str + :keyword enable_automatic_upgrade: Specifies if RSM should try to upgrade this machine. + :paramtype enable_automatic_upgrade: bool + """ + super(AgentUpgrade, self).__init__(**kwargs) + self.desired_version = kwargs.get('desired_version', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) + self.last_attempt_desired_version = None + self.last_attempt_timestamp = None + self.last_attempt_status = None + self.last_attempt_message = None + + +class AgentVersion(msrest.serialization.Model): + """Describes properties of Agent Version. + + :ivar agent_version: Represents the agent version. + :vartype agent_version: str + :ivar download_link: Represents the download link of specific agent version. + :vartype download_link: str + :ivar os_type: Defines the os type. + :vartype os_type: str + """ + + _attribute_map = { + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'download_link': {'key': 'downloadLink', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword agent_version: Represents the agent version. + :paramtype agent_version: str + :keyword download_link: Represents the download link of specific agent version. + :paramtype download_link: str + :keyword os_type: Defines the os type. + :paramtype os_type: str + """ + super(AgentVersion, self).__init__(**kwargs) + self.agent_version = kwargs.get('agent_version', None) + self.download_link = kwargs.get('download_link', None) + self.os_type = kwargs.get('os_type', None) + + +class AgentVersionsList(msrest.serialization.Model): + """Describes AgentVersions List. + + :ivar value: The list of available Agent Versions. + :vartype value: list[~azure.mgmt.hybridcompute.models.AgentVersion] + :ivar next_link: The URI to fetch the next 10 available Agent Versions. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentVersion]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The list of available Agent Versions. + :paramtype value: list[~azure.mgmt.hybridcompute.models.AgentVersion] + :keyword next_link: The URI to fetch the next 10 available Agent Versions. + :paramtype next_link: str + """ + super(AgentVersionsList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AvailablePatchCountByClassification(msrest.serialization.Model): + """Summarization of patches available for installation on the machine by classification. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar security: Number of security patches available for installation. + :vartype security: int + :ivar critical: Number of critical patches available for installation. + :vartype critical: int + :ivar definition: Number of definition patches available for installation. + :vartype definition: int + :ivar update_rollup: Number of update Rollup patches available for installation. + :vartype update_rollup: int + :ivar feature_pack: Number of feature pack patches available for installation. + :vartype feature_pack: int + :ivar service_pack: Number of service pack patches available for installation. + :vartype service_pack: int + :ivar tools: Number of tools patches available for installation. + :vartype tools: int + :ivar updates: Number of updates category patches available for installation. + :vartype updates: int + :ivar other: Number of other patches available for installation. + :vartype other: int + """ + + _validation = { + 'security': {'readonly': True}, + 'critical': {'readonly': True}, + 'definition': {'readonly': True}, + 'update_rollup': {'readonly': True}, + 'feature_pack': {'readonly': True}, + 'service_pack': {'readonly': True}, + 'tools': {'readonly': True}, + 'updates': {'readonly': True}, + 'other': {'readonly': True}, + } + + _attribute_map = { + 'security': {'key': 'security', 'type': 'int'}, + 'critical': {'key': 'critical', 'type': 'int'}, + 'definition': {'key': 'definition', 'type': 'int'}, + 'update_rollup': {'key': 'updateRollup', 'type': 'int'}, + 'feature_pack': {'key': 'featurePack', 'type': 'int'}, + 'service_pack': {'key': 'servicePack', 'type': 'int'}, + 'tools': {'key': 'tools', 'type': 'int'}, + 'updates': {'key': 'updates', 'type': 'int'}, + 'other': {'key': 'other', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AvailablePatchCountByClassification, self).__init__(**kwargs) + self.security = None + self.critical = None + self.definition = None + self.update_rollup = None + self.feature_pack = None + self.service_pack = None + self.tools = None + self.updates = None + self.other = None + + +class CloudMetadata(msrest.serialization.Model): + """The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: Specifies the cloud provider (Azure/AWS/GCP...). + :vartype provider: str + """ + + _validation = { + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(CloudMetadata, self).__init__(**kwargs) + self.provider = None + + +class ConfigurationExtension(msrest.serialization.Model): + """Describes properties that can identify extensions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar publisher: Publisher of the extension. + :vartype publisher: str + :ivar type: Type of the extension. + :vartype type: str + """ + + _validation = { + 'publisher': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ConfigurationExtension, self).__init__(**kwargs) + self.publisher = None + self.type = None + + +class ConnectionDetail(msrest.serialization.Model): + """ConnectionDetail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar private_ip_address: The private endpoint connection private ip address. + :vartype private_ip_address: str + :ivar link_identifier: The private endpoint connection link identifier. + :vartype link_identifier: str + :ivar group_id: The private endpoint connection group id. + :vartype group_id: str + :ivar member_name: The private endpoint connection member name. + :vartype member_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'link_identifier': {'readonly': True}, + 'group_id': {'readonly': True}, + 'member_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'link_identifier': {'key': 'linkIdentifier', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'member_name': {'key': 'memberName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ConnectionDetail, self).__init__(**kwargs) + self.id = None + self.private_ip_address = None + self.link_identifier = None + self.group_id = None + self.member_name = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :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.hybridcompute.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.hybridcompute.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorDetailAutoGenerated(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :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.hybridcompute.models.ErrorDetailAutoGenerated] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.hybridcompute.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetailAutoGenerated]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetailAutoGenerated, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseAutoGenerated(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.hybridcompute.models.ErrorDetailAutoGenerated + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetailAutoGenerated'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.hybridcompute.models.ErrorDetailAutoGenerated + """ + super(ErrorResponseAutoGenerated, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ExtensionTargetProperties(msrest.serialization.Model): + """Describes the Machine Extension Target Version Properties. + + :ivar target_version: Properties for the specified Extension to Upgrade. + :vartype target_version: str + """ + + _attribute_map = { + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword target_version: Properties for the specified Extension to Upgrade. + :paramtype target_version: str + """ + super(ExtensionTargetProperties, self).__init__(**kwargs) + self.target_version = kwargs.get('target_version', None) + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ProxyResource, self).__init__(**kwargs) + + +class ExtensionValue(ProxyResource): + """Describes a Extension Metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar version: The version of the Extension being received. + :vartype version: str + :ivar extension_type: The type of the Extension being received. + :vartype extension_type: str + :ivar publisher: The publisher of the Extension being received. + :vartype publisher: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'version': {'readonly': True}, + 'extension_type': {'readonly': True}, + 'publisher': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'extension_type': {'key': 'properties.extensionType', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExtensionValue, self).__init__(**kwargs) + self.version = None + self.extension_type = None + self.publisher = None + + +class ExtensionValueListResult(msrest.serialization.Model): + """The List Extension Metadata response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of extension metadata. + :vartype value: list[~azure.mgmt.hybridcompute.models.ExtensionValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExtensionValue]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExtensionValueListResult, self).__init__(**kwargs) + self.value = None + + +class PrivateLinkScopesResource(msrest.serialization.Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar location: Required. Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword location: Required. Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PrivateLinkScopesResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class HybridComputePrivateLinkScope(PrivateLinkScopesResource): + """An Azure Arc PrivateLinkScope definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar location: Required. Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Properties that define a Azure Arc PrivateLinkScope resource. + :vartype properties: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeProperties + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'HybridComputePrivateLinkScopeProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword location: Required. Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword properties: Properties that define a Azure Arc PrivateLinkScope resource. + :paramtype properties: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeProperties + """ + super(HybridComputePrivateLinkScope, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.system_data = None + + +class HybridComputePrivateLinkScopeListResult(msrest.serialization.Model): + """Describes the list of Azure Arc PrivateLinkScope resources. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. List of Azure Arc PrivateLinkScope definitions. + :vartype value: list[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope] + :ivar next_link: The URI to get the next set of Azure Arc PrivateLinkScope definitions if too + many PrivateLinkScopes where returned in the result set. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HybridComputePrivateLinkScope]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Required. List of Azure Arc PrivateLinkScope definitions. + :paramtype value: list[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope] + :keyword next_link: The URI to get the next set of Azure Arc PrivateLinkScope definitions if + too many PrivateLinkScopes where returned in the result set. + :paramtype next_link: str + """ + super(HybridComputePrivateLinkScopeListResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class HybridComputePrivateLinkScopeProperties(msrest.serialization.Model): + """Properties that define a Azure Arc PrivateLinkScope resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar public_network_access: Indicates whether machines associated with the private link scope + can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :vartype public_network_access: str or ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + :ivar provisioning_state: Current state of this PrivateLinkScope: whether or not is has been + provisioned within the resource group it is defined. Users cannot change this value but are + able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. + :vartype provisioning_state: str + :ivar private_link_scope_id: The Guid id of the private link scope. + :vartype private_link_scope_id: str + :ivar private_endpoint_connections: The collection of associated Private Endpoint Connections. + :vartype private_endpoint_connections: + list[~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionDataModel] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'private_link_scope_id': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + } + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_link_scope_id': {'key': 'privateLinkScopeId', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionDataModel]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword public_network_access: Indicates whether machines associated with the private link + scope can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + """ + super(HybridComputePrivateLinkScopeProperties, self).__init__(**kwargs) + self.public_network_access = kwargs.get('public_network_access', "Disabled") + self.provisioning_state = None + self.private_link_scope_id = None + self.private_endpoint_connections = None + + +class HybridIdentityMetadata(ProxyResource): + """Defines the HybridIdentityMetadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar vm_id: The unique identifier for the resource. + :vartype vm_id: str + :ivar public_key: The Public Key. + :vartype public_key: str + :ivar identity: Identity for the resource. + :vartype identity: ~azure.mgmt.hybridcompute.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'identity': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'identity': {'key': 'properties.identity', 'type': 'Identity'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword vm_id: The unique identifier for the resource. + :paramtype vm_id: str + :keyword public_key: The Public Key. + :paramtype public_key: str + """ + super(HybridIdentityMetadata, self).__init__(**kwargs) + self.vm_id = kwargs.get('vm_id', None) + self.public_key = kwargs.get('public_key', None) + self.identity = None + + +class HybridIdentityMetadataList(msrest.serialization.Model): + """List of HybridIdentityMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: Url to follow for getting next page of HybridIdentityMetadata. + :vartype next_link: str + :ivar value: Required. Array of HybridIdentityMetadata. + :vartype value: list[~azure.mgmt.hybridcompute.models.HybridIdentityMetadata] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[HybridIdentityMetadata]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: Url to follow for getting next page of HybridIdentityMetadata. + :paramtype next_link: str + :keyword value: Required. Array of HybridIdentityMetadata. + :paramtype value: list[~azure.mgmt.hybridcompute.models.HybridIdentityMetadata] + """ + super(HybridIdentityMetadataList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs['value'] + + +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :paramtype type: str + """ + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class IpAddress(msrest.serialization.Model): + """Describes properties of the IP address. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar address: Represents the IP Address. + :vartype address: str + :ivar ip_address_version: Represents the Ip Address Version. + :vartype ip_address_version: str + :ivar subnet: The subnet to which this IP address belongs. + :vartype subnet: ~azure.mgmt.hybridcompute.models.Subnet + """ + + _validation = { + 'subnet': {'readonly': True}, + } + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'ip_address_version': {'key': 'ipAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'Subnet'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword address: Represents the IP Address. + :paramtype address: str + :keyword ip_address_version: Represents the Ip Address Version. + :paramtype ip_address_version: str + """ + super(IpAddress, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + self.ip_address_version = kwargs.get('ip_address_version', None) + self.subnet = None + + +class LinuxParameters(msrest.serialization.Model): + """Input for InstallPatches on a Linux VM, as directly received by the API. + + :ivar classifications_to_include: The update classifications to select when installing patches + for Linux. + :vartype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationLinux] + :ivar package_name_masks_to_include: packages to include in the patch operation. Format: + packageName_packageVersion. + :vartype package_name_masks_to_include: list[str] + :ivar package_name_masks_to_exclude: packages to exclude in the patch operation. Format: + packageName_packageVersion. + :vartype package_name_masks_to_exclude: list[str] + """ + + _attribute_map = { + 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, + 'package_name_masks_to_include': {'key': 'packageNameMasksToInclude', 'type': '[str]'}, + 'package_name_masks_to_exclude': {'key': 'packageNameMasksToExclude', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword classifications_to_include: The update classifications to select when installing + patches for Linux. + :paramtype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationLinux] + :keyword package_name_masks_to_include: packages to include in the patch operation. Format: + packageName_packageVersion. + :paramtype package_name_masks_to_include: list[str] + :keyword package_name_masks_to_exclude: packages to exclude in the patch operation. Format: + packageName_packageVersion. + :paramtype package_name_masks_to_exclude: list[str] + """ + super(LinuxParameters, self).__init__(**kwargs) + self.classifications_to_include = kwargs.get('classifications_to_include', None) + self.package_name_masks_to_include = kwargs.get('package_name_masks_to_include', None) + self.package_name_masks_to_exclude = kwargs.get('package_name_masks_to_exclude', None) + + +class LocationData(msrest.serialization.Model): + """Metadata pertaining to the geographic location of the resource. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. A canonical name for the geographic or physical location. + :vartype name: str + :ivar city: The city or locality where the resource is located. + :vartype city: str + :ivar district: The district, state, or province where the resource is located. + :vartype district: str + :ivar country_or_region: The country or region where the resource is located. + :vartype country_or_region: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 256, 'min_length': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'district': {'key': 'district', 'type': 'str'}, + 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. A canonical name for the geographic or physical location. + :paramtype name: str + :keyword city: The city or locality where the resource is located. + :paramtype city: str + :keyword district: The district, state, or province where the resource is located. + :paramtype district: str + :keyword country_or_region: The country or region where the resource is located. + :paramtype country_or_region: str + """ + super(LocationData, self).__init__(**kwargs) + self.name = kwargs['name'] + self.city = kwargs.get('city', None) + self.district = kwargs.get('district', None) + self.country_or_region = kwargs.get('country_or_region', None) + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + """ + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs['location'] + + +class Machine(TrackedResource): + """Describes a hybrid machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar resources: The list of extensions affiliated to the machine. + :vartype resources: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :ivar identity: Identity for the resource. + :vartype identity: ~azure.mgmt.hybridcompute.models.Identity + :ivar kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :vartype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :ivar location_data: Metadata pertaining to the geographic location of the resource. + :vartype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :ivar agent_configuration: Configurable properties that the user can set locally via the + azcmagent config command, or remotely via ARM. + :vartype agent_configuration: ~azure.mgmt.hybridcompute.models.AgentConfiguration + :ivar service_statuses: Statuses of dependent services that are reported back to ARM. + :vartype service_statuses: ~azure.mgmt.hybridcompute.models.ServiceStatuses + :ivar cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :vartype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :ivar agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :vartype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :ivar os_profile: Specifies the operating system settings for the hybrid machine. + :vartype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :ivar provisioning_state: The provisioning state, which only appears in the response. + :vartype provisioning_state: str + :ivar status: The status of the hybrid machine agent. Possible values include: "Connected", + "Disconnected", "Error". + :vartype status: str or ~azure.mgmt.hybridcompute.models.StatusTypes + :ivar last_status_change: The time of the last status change. + :vartype last_status_change: ~datetime.datetime + :ivar error_details: Details about the error state. + :vartype error_details: list[~azure.mgmt.hybridcompute.models.ErrorDetail] + :ivar agent_version: The hybrid machine agent full version. + :vartype agent_version: str + :ivar vm_id: Specifies the hybrid machine unique ID. + :vartype vm_id: str + :ivar display_name: Specifies the hybrid machine display name. + :vartype display_name: str + :ivar machine_fqdn: Specifies the hybrid machine FQDN. + :vartype machine_fqdn: str + :ivar client_public_key: Public Key that the client provides to be used during initial resource + onboarding. + :vartype client_public_key: str + :ivar os_name: The Operating System running on the hybrid machine. + :vartype os_name: str + :ivar os_version: The version of Operating System running on the hybrid machine. + :vartype os_version: str + :ivar os_type: The type of Operating System (windows/linux). + :vartype os_type: str + :ivar vm_uuid: Specifies the Arc Machine's unique SMBIOS ID. + :vartype vm_uuid: str + :ivar extensions: Machine Extensions information (deprecated field). + :vartype extensions: list[~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView] + :ivar os_sku: Specifies the Operating System product SKU. + :vartype os_sku: str + :ivar domain_name: Specifies the Windows domain name. + :vartype domain_name: str + :ivar ad_fqdn: Specifies the AD fully qualified display name. + :vartype ad_fqdn: str + :ivar dns_fqdn: Specifies the DNS fully qualified display name. + :vartype dns_fqdn: str + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str + :ivar parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :vartype parent_cluster_resource_id: str + :ivar mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :vartype mssql_discovered: str + :ivar detected_properties: Detected properties from the machine. + :vartype detected_properties: dict[str, str] + :ivar network_profile: Information about the network the machine is on. + :vartype network_profile: ~azure.mgmt.hybridcompute.models.NetworkProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'resources': {'readonly': True}, + 'agent_configuration': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'last_status_change': {'readonly': True}, + 'error_details': {'readonly': True}, + 'agent_version': {'readonly': True}, + 'display_name': {'readonly': True}, + 'machine_fqdn': {'readonly': True}, + 'os_name': {'readonly': True}, + 'os_version': {'readonly': True}, + 'vm_uuid': {'readonly': True}, + 'os_sku': {'readonly': True}, + 'domain_name': {'readonly': True}, + 'ad_fqdn': {'readonly': True}, + 'dns_fqdn': {'readonly': True}, + 'detected_properties': {'readonly': True}, + 'network_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[MachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location_data': {'key': 'properties.locationData', 'type': 'LocationData'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentConfiguration'}, + 'service_statuses': {'key': 'properties.serviceStatuses', 'type': 'ServiceStatuses'}, + 'cloud_metadata': {'key': 'properties.cloudMetadata', 'type': 'CloudMetadata'}, + 'agent_upgrade': {'key': 'properties.agentUpgrade', 'type': 'AgentUpgrade'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_status_change': {'key': 'properties.lastStatusChange', 'type': 'iso-8601'}, + 'error_details': {'key': 'properties.errorDetails', 'type': '[ErrorDetail]'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'machine_fqdn': {'key': 'properties.machineFqdn', 'type': 'str'}, + 'client_public_key': {'key': 'properties.clientPublicKey', 'type': 'str'}, + 'os_name': {'key': 'properties.osName', 'type': 'str'}, + 'os_version': {'key': 'properties.osVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'vm_uuid': {'key': 'properties.vmUuid', 'type': 'str'}, + 'extensions': {'key': 'properties.extensions', 'type': '[MachineExtensionInstanceView]'}, + 'os_sku': {'key': 'properties.osSku', 'type': 'str'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'ad_fqdn': {'key': 'properties.adFqdn', 'type': 'str'}, + 'dns_fqdn': {'key': 'properties.dnsFqdn', 'type': 'str'}, + 'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'}, + 'parent_cluster_resource_id': {'key': 'properties.parentClusterResourceId', 'type': 'str'}, + 'mssql_discovered': {'key': 'properties.mssqlDiscovered', 'type': 'str'}, + 'detected_properties': {'key': 'properties.detectedProperties', 'type': '{str}'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Identity for the resource. + :paramtype identity: ~azure.mgmt.hybridcompute.models.Identity + :keyword kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :paramtype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :keyword location_data: Metadata pertaining to the geographic location of the resource. + :paramtype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :keyword service_statuses: Statuses of dependent services that are reported back to ARM. + :paramtype service_statuses: ~azure.mgmt.hybridcompute.models.ServiceStatuses + :keyword cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :paramtype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :keyword agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :paramtype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :keyword os_profile: Specifies the operating system settings for the hybrid machine. + :paramtype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :keyword vm_id: Specifies the hybrid machine unique ID. + :paramtype vm_id: str + :keyword client_public_key: Public Key that the client provides to be used during initial + resource onboarding. + :paramtype client_public_key: str + :keyword os_type: The type of Operating System (windows/linux). + :paramtype os_type: str + :keyword extensions: Machine Extensions information (deprecated field). + :paramtype extensions: list[~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView] + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str + :keyword parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :paramtype parent_cluster_resource_id: str + :keyword mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :paramtype mssql_discovered: str + """ + super(Machine, self).__init__(**kwargs) + self.resources = None + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.location_data = kwargs.get('location_data', None) + self.agent_configuration = None + self.service_statuses = kwargs.get('service_statuses', None) + self.cloud_metadata = kwargs.get('cloud_metadata', None) + self.agent_upgrade = kwargs.get('agent_upgrade', None) + self.os_profile = kwargs.get('os_profile', None) + self.provisioning_state = None + self.status = None + self.last_status_change = None + self.error_details = None + self.agent_version = None + self.vm_id = kwargs.get('vm_id', None) + self.display_name = None + self.machine_fqdn = None + self.client_public_key = kwargs.get('client_public_key', None) + self.os_name = None + self.os_version = None + self.os_type = kwargs.get('os_type', None) + self.vm_uuid = None + self.extensions = kwargs.get('extensions', None) + self.os_sku = None + self.domain_name = None + self.ad_fqdn = None + self.dns_fqdn = None + self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None) + self.parent_cluster_resource_id = kwargs.get('parent_cluster_resource_id', None) + self.mssql_discovered = kwargs.get('mssql_discovered', None) + self.detected_properties = None + self.network_profile = None + + +class MachineAssessPatchesResult(msrest.serialization.Model): + """Describes the properties of an AssessPatches result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The overall success or failure status of the operation. It remains "InProgress" + until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", + or "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", + "Succeeded", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.hybridcompute.models.PatchOperationStatus + :ivar assessment_activity_id: The activity ID of the operation that produced this result. + :vartype assessment_activity_id: str + :ivar reboot_pending: The overall reboot status of the VM. It will be true when partially + installed patches require a reboot to complete installation but the reboot has not yet + occurred. + :vartype reboot_pending: bool + :ivar available_patch_count_by_classification: Summarization of patches available for + installation on the machine by classification. + :vartype available_patch_count_by_classification: + ~azure.mgmt.hybridcompute.models.AvailablePatchCountByClassification + :ivar start_date_time: The UTC timestamp when the operation began. + :vartype start_date_time: ~datetime.datetime + :ivar last_modified_date_time: The UTC timestamp when the operation finished. + :vartype last_modified_date_time: ~datetime.datetime + :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values + include: "User", "Platform". + :vartype started_by: str or ~azure.mgmt.hybridcompute.models.PatchOperationStartedBy + :ivar patch_service_used: Specifies the patch service used for the operation. Possible values + include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". + :vartype patch_service_used: str or ~azure.mgmt.hybridcompute.models.PatchServiceUsed + :ivar os_type: The operating system type of the machine. Possible values include: "Windows", + "Linux". + :vartype os_type: str or ~azure.mgmt.hybridcompute.models.OsType + :ivar error_details: The errors that were encountered during execution of the operation. The + details array contains the list of them. + :vartype error_details: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + + _validation = { + 'status': {'readonly': True}, + 'assessment_activity_id': {'readonly': True}, + 'reboot_pending': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'started_by': {'readonly': True}, + 'patch_service_used': {'readonly': True}, + 'os_type': {'readonly': True}, + 'error_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'assessment_activity_id': {'key': 'assessmentActivityId', 'type': 'str'}, + 'reboot_pending': {'key': 'rebootPending', 'type': 'bool'}, + 'available_patch_count_by_classification': {'key': 'availablePatchCountByClassification', 'type': 'AvailablePatchCountByClassification'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'started_by': {'key': 'startedBy', 'type': 'str'}, + 'patch_service_used': {'key': 'patchServiceUsed', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword available_patch_count_by_classification: Summarization of patches available for + installation on the machine by classification. + :paramtype available_patch_count_by_classification: + ~azure.mgmt.hybridcompute.models.AvailablePatchCountByClassification + """ + super(MachineAssessPatchesResult, self).__init__(**kwargs) + self.status = None + self.assessment_activity_id = None + self.reboot_pending = None + self.available_patch_count_by_classification = kwargs.get('available_patch_count_by_classification', None) + self.start_date_time = None + self.last_modified_date_time = None + self.started_by = None + self.patch_service_used = None + self.os_type = None + self.error_details = None + + +class MachineExtension(TrackedResource): + """Describes a Machine Extension. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :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_properties_type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :vartype type_properties_type: str + :ivar type_handler_version: Specifies the version of the script handler. + :vartype type_handler_version: str + :ivar enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :vartype enable_automatic_upgrade: bool + :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 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 provisioning_state: The provisioning state, which only appears in the response. + :vartype provisioning_state: str + :ivar instance_view: The machine extension instance view. + :vartype instance_view: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': '{object}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'MachineExtensionInstanceView'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword force_update_tag: How the extension handler should be forced to update even if the + extension configuration has not changed. + :paramtype force_update_tag: str + :keyword publisher: The name of the extension handler publisher. + :paramtype publisher: str + :keyword type_properties_type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :paramtype type_properties_type: str + :keyword type_handler_version: Specifies the version of the script handler. + :paramtype type_handler_version: str + :keyword enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :paramtype enable_automatic_upgrade: bool + :keyword 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. + :paramtype auto_upgrade_minor_version: bool + :keyword settings: Json formatted public settings for the extension. + :paramtype settings: dict[str, any] + :keyword protected_settings: The extension can contain either protectedSettings or + protectedSettingsFromKeyVault or no protected settings at all. + :paramtype protected_settings: dict[str, any] + :keyword instance_view: The machine extension instance view. + :paramtype instance_view: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView + """ + super(MachineExtension, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type_properties_type = kwargs.get('type_properties_type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class MachineExtensionInstanceView(msrest.serialization.Model): + """Describes the Machine Extension Instance View. + + :ivar name: The machine extension name. + :vartype name: 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 status: Instance view status. + :vartype status: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceViewStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'MachineExtensionInstanceViewStatus'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The machine extension name. + :paramtype name: str + :keyword type: Specifies the type of the extension; an example is "CustomScriptExtension". + :paramtype type: str + :keyword type_handler_version: Specifies the version of the script handler. + :paramtype type_handler_version: str + :keyword status: Instance view status. + :paramtype status: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceViewStatus + """ + super(MachineExtensionInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.status = kwargs.get('status', None) + + +class MachineExtensionInstanceViewStatus(msrest.serialization.Model): + """Instance view status. + + :ivar code: The status code. + :vartype code: str + :ivar level: The level code. Possible values include: "Info", "Warning", "Error". + :vartype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :ivar display_status: The short localizable label for the status. + :vartype display_status: str + :ivar message: The detailed status message, including for alerts and error messages. + :vartype message: str + :ivar time: The time of the status. + :vartype time: ~datetime.datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: The status code. + :paramtype code: str + :keyword level: The level code. Possible values include: "Info", "Warning", "Error". + :paramtype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :keyword display_status: The short localizable label for the status. + :paramtype display_status: str + :keyword message: The detailed status message, including for alerts and error messages. + :paramtype message: str + :keyword time: The time of the status. + :paramtype time: ~datetime.datetime + """ + super(MachineExtensionInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class MachineExtensionsListResult(msrest.serialization.Model): + """Describes the Machine Extensions List Result. + + :ivar value: The list of extensions. + :vartype value: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :ivar next_link: The uri to fetch the next page of machine extensions. Call ListNext() with + this to fetch the next page of extensions. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MachineExtension]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The list of extensions. + :paramtype value: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :keyword next_link: The uri to fetch the next page of machine extensions. Call ListNext() with + this to fetch the next page of extensions. + :paramtype next_link: str + """ + super(MachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ResourceUpdate(msrest.serialization.Model): + """The Update Resource model definition. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(ResourceUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class MachineExtensionUpdate(ResourceUpdate): + """Describes a Machine Extension Update. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :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 enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :vartype enable_automatic_upgrade: bool + :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 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] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword force_update_tag: How the extension handler should be forced to update even if the + extension configuration has not changed. + :paramtype force_update_tag: str + :keyword publisher: The name of the extension handler publisher. + :paramtype publisher: str + :keyword type: Specifies the type of the extension; an example is "CustomScriptExtension". + :paramtype type: str + :keyword type_handler_version: Specifies the version of the script handler. + :paramtype type_handler_version: str + :keyword enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :paramtype enable_automatic_upgrade: bool + :keyword 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. + :paramtype auto_upgrade_minor_version: bool + :keyword settings: Json formatted public settings for the extension. + :paramtype settings: dict[str, any] + :keyword protected_settings: The extension can contain either protectedSettings or + protectedSettingsFromKeyVault or no protected settings at all. + :paramtype protected_settings: dict[str, any] + """ + super(MachineExtensionUpdate, self).__init__(**kwargs) + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type = kwargs.get('type', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + +class MachineExtensionUpgrade(msrest.serialization.Model): + """Describes the Machine Extension Upgrade Properties. + + :ivar extension_targets: Describes the Extension Target Properties. + :vartype extension_targets: dict[str, + ~azure.mgmt.hybridcompute.models.ExtensionTargetProperties] + """ + + _attribute_map = { + 'extension_targets': {'key': 'extensionTargets', 'type': '{ExtensionTargetProperties}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword extension_targets: Describes the Extension Target Properties. + :paramtype extension_targets: dict[str, + ~azure.mgmt.hybridcompute.models.ExtensionTargetProperties] + """ + super(MachineExtensionUpgrade, self).__init__(**kwargs) + self.extension_targets = kwargs.get('extension_targets', None) + + +class MachineInstallPatchesParameters(msrest.serialization.Model): + """Input for InstallPatches as directly received by the API. + + All required parameters must be populated in order to send to Azure. + + :ivar maximum_duration: Required. Specifies the maximum amount of time that the operation will + run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours). + :vartype maximum_duration: str + :ivar reboot_setting: Required. Defines when it is acceptable to reboot a VM during a software + update operation. Possible values include: "IfRequired", "Never", "Always". + :vartype reboot_setting: str or ~azure.mgmt.hybridcompute.models.VMGuestPatchRebootSetting + :ivar windows_parameters: Input for InstallPatches on a Windows VM, as directly received by the + API. + :vartype windows_parameters: ~azure.mgmt.hybridcompute.models.WindowsParameters + :ivar linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the + API. + :vartype linux_parameters: ~azure.mgmt.hybridcompute.models.LinuxParameters + """ + + _validation = { + 'maximum_duration': {'required': True}, + 'reboot_setting': {'required': True}, + } + + _attribute_map = { + 'maximum_duration': {'key': 'maximumDuration', 'type': 'str'}, + 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, + 'windows_parameters': {'key': 'windowsParameters', 'type': 'WindowsParameters'}, + 'linux_parameters': {'key': 'linuxParameters', 'type': 'LinuxParameters'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword maximum_duration: Required. Specifies the maximum amount of time that the operation + will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours). + :paramtype maximum_duration: str + :keyword reboot_setting: Required. Defines when it is acceptable to reboot a VM during a + software update operation. Possible values include: "IfRequired", "Never", "Always". + :paramtype reboot_setting: str or ~azure.mgmt.hybridcompute.models.VMGuestPatchRebootSetting + :keyword windows_parameters: Input for InstallPatches on a Windows VM, as directly received by + the API. + :paramtype windows_parameters: ~azure.mgmt.hybridcompute.models.WindowsParameters + :keyword linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the + API. + :paramtype linux_parameters: ~azure.mgmt.hybridcompute.models.LinuxParameters + """ + super(MachineInstallPatchesParameters, self).__init__(**kwargs) + self.maximum_duration = kwargs['maximum_duration'] + self.reboot_setting = kwargs['reboot_setting'] + self.windows_parameters = kwargs.get('windows_parameters', None) + self.linux_parameters = kwargs.get('linux_parameters', None) + + +class MachineInstallPatchesResult(msrest.serialization.Model): + """The result summary of an installation operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The overall success or failure status of the operation. It remains "InProgress" + until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or + "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", + "Succeeded", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.hybridcompute.models.PatchOperationStatus + :ivar installation_activity_id: The activity ID of the operation that produced this result. + :vartype installation_activity_id: str + :ivar reboot_status: The reboot state of the VM following completion of the operation. Possible + values include: "Unknown", "NotNeeded", "Required", "Started", "Failed", "Completed". + :vartype reboot_status: str or ~azure.mgmt.hybridcompute.models.VMGuestPatchRebootStatus + :ivar maintenance_window_exceeded: Whether the operation ran out of time before it completed + all its intended actions. + :vartype maintenance_window_exceeded: bool + :ivar excluded_patch_count: The number of patches that were not installed due to the user + blocking their installation. + :vartype excluded_patch_count: int + :ivar not_selected_patch_count: The number of patches that were detected as available for + install, but did not meet the operation's criteria. + :vartype not_selected_patch_count: int + :ivar pending_patch_count: The number of patches that were identified as meeting the + installation criteria, but were not able to be installed. Typically this happens when + maintenanceWindowExceeded == true. + :vartype pending_patch_count: int + :ivar installed_patch_count: The number of patches successfully installed. + :vartype installed_patch_count: int + :ivar failed_patch_count: The number of patches that could not be installed due to some issue. + See errors for details. + :vartype failed_patch_count: int + :ivar start_date_time: The UTC timestamp when the operation began. + :vartype start_date_time: ~datetime.datetime + :ivar last_modified_date_time: The UTC timestamp when the operation finished. + :vartype last_modified_date_time: ~datetime.datetime + :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values + include: "User", "Platform". + :vartype started_by: str or ~azure.mgmt.hybridcompute.models.PatchOperationStartedBy + :ivar patch_service_used: Specifies the patch service used for the operation. Possible values + include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". + :vartype patch_service_used: str or ~azure.mgmt.hybridcompute.models.PatchServiceUsed + :ivar os_type: The operating system type of the machine. Possible values include: "Windows", + "Linux". + :vartype os_type: str or ~azure.mgmt.hybridcompute.models.OsType + :ivar error_details: The errors that were encountered during execution of the operation. The + details array contains the list of them. + :vartype error_details: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + + _validation = { + 'status': {'readonly': True}, + 'installation_activity_id': {'readonly': True}, + 'reboot_status': {'readonly': True}, + 'maintenance_window_exceeded': {'readonly': True}, + 'excluded_patch_count': {'readonly': True}, + 'not_selected_patch_count': {'readonly': True}, + 'pending_patch_count': {'readonly': True}, + 'installed_patch_count': {'readonly': True}, + 'failed_patch_count': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'started_by': {'readonly': True}, + 'patch_service_used': {'readonly': True}, + 'os_type': {'readonly': True}, + 'error_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'installation_activity_id': {'key': 'installationActivityId', 'type': 'str'}, + 'reboot_status': {'key': 'rebootStatus', 'type': 'str'}, + 'maintenance_window_exceeded': {'key': 'maintenanceWindowExceeded', 'type': 'bool'}, + 'excluded_patch_count': {'key': 'excludedPatchCount', 'type': 'int'}, + 'not_selected_patch_count': {'key': 'notSelectedPatchCount', 'type': 'int'}, + 'pending_patch_count': {'key': 'pendingPatchCount', 'type': 'int'}, + 'installed_patch_count': {'key': 'installedPatchCount', 'type': 'int'}, + 'failed_patch_count': {'key': 'failedPatchCount', 'type': 'int'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'started_by': {'key': 'startedBy', 'type': 'str'}, + 'patch_service_used': {'key': 'patchServiceUsed', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(MachineInstallPatchesResult, self).__init__(**kwargs) + self.status = None + self.installation_activity_id = None + self.reboot_status = None + self.maintenance_window_exceeded = None + self.excluded_patch_count = None + self.not_selected_patch_count = None + self.pending_patch_count = None + self.installed_patch_count = None + self.failed_patch_count = None + self.start_date_time = None + self.last_modified_date_time = None + self.started_by = None + self.patch_service_used = None + self.os_type = None + self.error_details = None + + +class MachineListResult(msrest.serialization.Model): + """The List hybrid machine operation response. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. The list of hybrid machines. + :vartype value: list[~azure.mgmt.hybridcompute.models.Machine] + :ivar next_link: The URI to fetch the next page of Machines. Call ListNext() with this URI to + fetch the next page of hybrid machines. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Machine]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Required. The list of hybrid machines. + :paramtype value: list[~azure.mgmt.hybridcompute.models.Machine] + :keyword next_link: The URI to fetch the next page of Machines. Call ListNext() with this URI + to fetch the next page of hybrid machines. + :paramtype next_link: str + """ + super(MachineListResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class MachineRunCommand(TrackedResource): + """Describes a Run Command. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar source: The source of the run command script. + :vartype source: ~azure.mgmt.hybridcompute.models.MachineRunCommandScriptSource + :ivar parameters: The parameters used by the script. + :vartype parameters: list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :ivar protected_parameters: The parameters used by the script. + :vartype protected_parameters: list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :ivar async_execution: Optional. If set to true, provisioning will complete as soon as script + starts and will not wait for script to complete. + :vartype async_execution: bool + :ivar run_as_user: Specifies the user account on the machine when executing the run command. + :vartype run_as_user: str + :ivar run_as_password: Specifies the user account password on the machine when executing the + run command. + :vartype run_as_password: str + :ivar timeout_in_seconds: The timeout in seconds to execute the run command. + :vartype timeout_in_seconds: int + :ivar output_blob_uri: Specifies the Azure storage blob where script output stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. + :vartype output_blob_uri: str + :ivar error_blob_uri: Specifies the Azure storage blob where script error stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. + :vartype error_blob_uri: str + :ivar output_blob_managed_identity: User-assigned managed identity that has access to + outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :vartype output_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + :ivar error_blob_managed_identity: User-assigned managed identity that has access to + errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :vartype error_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + :ivar provisioning_state: The provisioning state, which only appears in the response. + :vartype provisioning_state: str + :ivar instance_view: The machine run command instance view. + :vartype instance_view: ~azure.mgmt.hybridcompute.models.MachineRunCommandInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'MachineRunCommandScriptSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '[RunCommandInputParameter]'}, + 'protected_parameters': {'key': 'properties.protectedParameters', 'type': '[RunCommandInputParameter]'}, + 'async_execution': {'key': 'properties.asyncExecution', 'type': 'bool'}, + 'run_as_user': {'key': 'properties.runAsUser', 'type': 'str'}, + 'run_as_password': {'key': 'properties.runAsPassword', 'type': 'str'}, + 'timeout_in_seconds': {'key': 'properties.timeoutInSeconds', 'type': 'int'}, + 'output_blob_uri': {'key': 'properties.outputBlobUri', 'type': 'str'}, + 'error_blob_uri': {'key': 'properties.errorBlobUri', 'type': 'str'}, + 'output_blob_managed_identity': {'key': 'properties.outputBlobManagedIdentity', 'type': 'RunCommandManagedIdentity'}, + 'error_blob_managed_identity': {'key': 'properties.errorBlobManagedIdentity', 'type': 'RunCommandManagedIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'MachineRunCommandInstanceView'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword source: The source of the run command script. + :paramtype source: ~azure.mgmt.hybridcompute.models.MachineRunCommandScriptSource + :keyword parameters: The parameters used by the script. + :paramtype parameters: list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :keyword protected_parameters: The parameters used by the script. + :paramtype protected_parameters: + list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :keyword async_execution: Optional. If set to true, provisioning will complete as soon as + script starts and will not wait for script to complete. + :paramtype async_execution: bool + :keyword run_as_user: Specifies the user account on the machine when executing the run command. + :paramtype run_as_user: str + :keyword run_as_password: Specifies the user account password on the machine when executing the + run command. + :paramtype run_as_password: str + :keyword timeout_in_seconds: The timeout in seconds to execute the run command. + :paramtype timeout_in_seconds: int + :keyword output_blob_uri: Specifies the Azure storage blob where script output stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. + :paramtype output_blob_uri: str + :keyword error_blob_uri: Specifies the Azure storage blob where script error stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. + :paramtype error_blob_uri: str + :keyword output_blob_managed_identity: User-assigned managed identity that has access to + outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :paramtype output_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + :keyword error_blob_managed_identity: User-assigned managed identity that has access to + errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :paramtype error_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + """ + super(MachineRunCommand, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.parameters = kwargs.get('parameters', None) + self.protected_parameters = kwargs.get('protected_parameters', None) + self.async_execution = kwargs.get('async_execution', False) + self.run_as_user = kwargs.get('run_as_user', None) + self.run_as_password = kwargs.get('run_as_password', None) + self.timeout_in_seconds = kwargs.get('timeout_in_seconds', None) + self.output_blob_uri = kwargs.get('output_blob_uri', None) + self.error_blob_uri = kwargs.get('error_blob_uri', None) + self.output_blob_managed_identity = kwargs.get('output_blob_managed_identity', None) + self.error_blob_managed_identity = kwargs.get('error_blob_managed_identity', None) + self.provisioning_state = None + self.instance_view = None + + +class MachineRunCommandInstanceView(msrest.serialization.Model): + """Describes the Machine Extension Instance View. + + :ivar name: The run command name. + :vartype name: str + :ivar status: Instance view status. + :vartype status: ~azure.mgmt.hybridcompute.models.MachineRunCommandInstanceViewStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'MachineRunCommandInstanceViewStatus'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The run command name. + :paramtype name: str + :keyword status: Instance view status. + :paramtype status: ~azure.mgmt.hybridcompute.models.MachineRunCommandInstanceViewStatus + """ + super(MachineRunCommandInstanceView, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + + +class MachineRunCommandInstanceViewStatus(msrest.serialization.Model): + """Instance view status. + + :ivar code: The status code. + :vartype code: str + :ivar level: The level code. Possible values include: "Info", "Warning", "Error". + :vartype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :ivar display_status: The short localizable label for the status. + :vartype display_status: str + :ivar message: The detailed status message, including for alerts and error messages. + :vartype message: str + :ivar time: The time of the status. + :vartype time: ~datetime.datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: The status code. + :paramtype code: str + :keyword level: The level code. Possible values include: "Info", "Warning", "Error". + :paramtype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :keyword display_status: The short localizable label for the status. + :paramtype display_status: str + :keyword message: The detailed status message, including for alerts and error messages. + :paramtype message: str + :keyword time: The time of the status. + :paramtype time: ~datetime.datetime + """ + super(MachineRunCommandInstanceViewStatus, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.level = kwargs.get('level', None) + self.display_status = kwargs.get('display_status', None) + self.message = kwargs.get('message', None) + self.time = kwargs.get('time', None) + + +class MachineRunCommandScriptSource(msrest.serialization.Model): + """Describes the script sources for run command. Use only one of script, scriptUri, commandId. + + :ivar script: Specifies the script content to be executed on the machine. + :vartype script: str + :ivar script_uri: Specifies the script download location. It can be either SAS URI of an Azure + storage blob with read access or public URI. + :vartype script_uri: str + :ivar command_id: Specifies the commandId of predefined built-in script. + :vartype command_id: str + :ivar script_uri_managed_identity: User-assigned managed identity that has access to scriptUri + in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make + sure the Azure storage blob exists, and managed identity has been given access to blob's + container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, + make sure you add it under VM's identity. For more info on managed identity and Run Command, + refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + :vartype script_uri_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + """ + + _attribute_map = { + 'script': {'key': 'script', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script_uri_managed_identity': {'key': 'scriptUriManagedIdentity', 'type': 'RunCommandManagedIdentity'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword script: Specifies the script content to be executed on the machine. + :paramtype script: str + :keyword script_uri: Specifies the script download location. It can be either SAS URI of an + Azure storage blob with read access or public URI. + :paramtype script_uri: str + :keyword command_id: Specifies the commandId of predefined built-in script. + :paramtype command_id: str + :keyword script_uri_managed_identity: User-assigned managed identity that has access to + scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned + identity. Make sure the Azure storage blob exists, and managed identity has been given access + to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned + identity, make sure you add it under VM's identity. For more info on managed identity and Run + Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + :paramtype script_uri_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + """ + super(MachineRunCommandScriptSource, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.script_uri = kwargs.get('script_uri', None) + self.command_id = kwargs.get('command_id', None) + self.script_uri_managed_identity = kwargs.get('script_uri_managed_identity', None) + + +class MachineRunCommandsListResult(msrest.serialization.Model): + """Describes the Run Commands List Result. + + :ivar value: The list of run commands. + :vartype value: list[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :ivar next_link: The uri to fetch the next page of run commands. Call ListNext() with this to + fetch the next page of run commands. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MachineRunCommand]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The list of run commands. + :paramtype value: list[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :keyword next_link: The uri to fetch the next page of run commands. Call ListNext() with this + to fetch the next page of run commands. + :paramtype next_link: str + """ + super(MachineRunCommandsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class MachineRunCommandUpdate(ResourceUpdate): + """Describes a Machine Extension Update. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(MachineRunCommandUpdate, self).__init__(**kwargs) + + +class MachineUpdate(ResourceUpdate): + """Describes a hybrid machine Update. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar identity: Identity for the resource. + :vartype identity: ~azure.mgmt.hybridcompute.models.Identity + :ivar kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :vartype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :ivar location_data: Metadata pertaining to the geographic location of the resource. + :vartype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :ivar os_profile: Specifies the operating system settings for the hybrid machine. + :vartype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :ivar cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :vartype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :ivar agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :vartype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :ivar parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :vartype parent_cluster_resource_id: str + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location_data': {'key': 'properties.locationData', 'type': 'LocationData'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'cloud_metadata': {'key': 'properties.cloudMetadata', 'type': 'CloudMetadata'}, + 'agent_upgrade': {'key': 'properties.agentUpgrade', 'type': 'AgentUpgrade'}, + 'parent_cluster_resource_id': {'key': 'properties.parentClusterResourceId', 'type': 'str'}, + 'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword identity: Identity for the resource. + :paramtype identity: ~azure.mgmt.hybridcompute.models.Identity + :keyword kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :paramtype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :keyword location_data: Metadata pertaining to the geographic location of the resource. + :paramtype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :keyword os_profile: Specifies the operating system settings for the hybrid machine. + :paramtype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :keyword cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :paramtype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :keyword agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :paramtype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :keyword parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :paramtype parent_cluster_resource_id: str + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str + """ + super(MachineUpdate, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.location_data = kwargs.get('location_data', None) + self.os_profile = kwargs.get('os_profile', None) + self.cloud_metadata = kwargs.get('cloud_metadata', None) + self.agent_upgrade = kwargs.get('agent_upgrade', None) + self.parent_cluster_resource_id = kwargs.get('parent_cluster_resource_id', None) + self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None) + + +class NetworkInterface(msrest.serialization.Model): + """Describes a network interface. + + :ivar ip_addresses: The list of IP addresses in this interface. + :vartype ip_addresses: list[~azure.mgmt.hybridcompute.models.IpAddress] + """ + + _attribute_map = { + 'ip_addresses': {'key': 'ipAddresses', 'type': '[IpAddress]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword ip_addresses: The list of IP addresses in this interface. + :paramtype ip_addresses: list[~azure.mgmt.hybridcompute.models.IpAddress] + """ + super(NetworkInterface, self).__init__(**kwargs) + self.ip_addresses = kwargs.get('ip_addresses', None) + + +class NetworkProfile(msrest.serialization.Model): + """Describes the network information on this machine. + + :ivar network_interfaces: The list of network interfaces. + :vartype network_interfaces: list[~azure.mgmt.hybridcompute.models.NetworkInterface] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterface]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword network_interfaces: The list of network interfaces. + :paramtype network_interfaces: list[~azure.mgmt.hybridcompute.models.NetworkInterface] + """ + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.hybridcompute.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar display: Display properties. + :vartype display: ~azure.mgmt.hybridcompute.models.OperationValueDisplay + :ivar is_data_action: This property indicates if the operation is an action or a data action. + :vartype is_data_action: bool + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationValueDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword display: Display properties. + :paramtype display: ~azure.mgmt.hybridcompute.models.OperationValueDisplay + """ + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.display = kwargs.get('display', None) + self.is_data_action = None + + +class OperationValueDisplay(msrest.serialization.Model): + """Describes the properties of a Hybrid Compute Operation Value Display. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationValueDisplay, self).__init__(**kwargs) + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class OSProfile(msrest.serialization.Model): + """Specifies the operating system settings for the hybrid machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar computer_name: Specifies the host OS name of the hybrid machine. + :vartype computer_name: str + :ivar windows_configuration: Specifies the windows configuration for update management. + :vartype windows_configuration: ~azure.mgmt.hybridcompute.models.OSProfileWindowsConfiguration + :ivar linux_configuration: Specifies the linux configuration for update management. + :vartype linux_configuration: ~azure.mgmt.hybridcompute.models.OSProfileLinuxConfiguration + """ + + _validation = { + 'computer_name': {'readonly': True}, + } + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'OSProfileWindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'OSProfileLinuxConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword windows_configuration: Specifies the windows configuration for update management. + :paramtype windows_configuration: + ~azure.mgmt.hybridcompute.models.OSProfileWindowsConfiguration + :keyword linux_configuration: Specifies the linux configuration for update management. + :paramtype linux_configuration: ~azure.mgmt.hybridcompute.models.OSProfileLinuxConfiguration + """ + super(OSProfile, self).__init__(**kwargs) + self.computer_name = None + self.windows_configuration = kwargs.get('windows_configuration', None) + self.linux_configuration = kwargs.get('linux_configuration', None) + + +class OSProfileLinuxConfiguration(msrest.serialization.Model): + """Specifies the linux configuration for update management. + + :ivar assessment_mode: Specifies the assessment mode. Possible values include: "ImageDefault", + "AutomaticByPlatform". + :vartype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :ivar patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :vartype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + 'patch_mode': {'key': 'patchSettings.patchMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword assessment_mode: Specifies the assessment mode. Possible values include: + "ImageDefault", "AutomaticByPlatform". + :paramtype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :keyword patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :paramtype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + super(OSProfileLinuxConfiguration, self).__init__(**kwargs) + self.assessment_mode = kwargs.get('assessment_mode', None) + self.patch_mode = kwargs.get('patch_mode', None) + + +class OSProfileWindowsConfiguration(msrest.serialization.Model): + """Specifies the windows configuration for update management. + + :ivar assessment_mode: Specifies the assessment mode. Possible values include: "ImageDefault", + "AutomaticByPlatform". + :vartype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :ivar patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :vartype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + 'patch_mode': {'key': 'patchSettings.patchMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword assessment_mode: Specifies the assessment mode. Possible values include: + "ImageDefault", "AutomaticByPlatform". + :paramtype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :keyword patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :paramtype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + super(OSProfileWindowsConfiguration, self).__init__(**kwargs) + self.assessment_mode = kwargs.get('assessment_mode', None) + self.patch_mode = kwargs.get('patch_mode', None) + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Resource properties. + :paramtype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PrivateEndpointConnectionDataModel(msrest.serialization.Model): + """The Data Model for a Private Endpoint Connection associated with a Private Link Scope. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM Resource Id of the Private Endpoint. + :vartype id: str + :ivar name: The Name of the Private Endpoint. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar properties: The Private Endpoint Connection properties. + :vartype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: The Private Endpoint Connection properties. + :paramtype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + super(PrivateEndpointConnectionDataModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Array of results. + :vartype value: list[~azure.mgmt.hybridcompute.models.PrivateEndpointConnection] + :ivar next_link: Link to retrieve next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PrivateEndpointConnectionProperties(msrest.serialization.Model): + """Properties of a private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar private_endpoint: Private endpoint which the connection belongs to. + :vartype private_endpoint: ~azure.mgmt.hybridcompute.models.PrivateEndpointProperty + :ivar private_link_service_connection_state: Connection state of the private endpoint + connection. + :vartype private_link_service_connection_state: + ~azure.mgmt.hybridcompute.models.PrivateLinkServiceConnectionStateProperty + :ivar provisioning_state: State of the private endpoint connection. + :vartype provisioning_state: str + :ivar group_ids: List of group IDs. + :vartype group_ids: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'group_ids': {'readonly': True}, + } + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword private_endpoint: Private endpoint which the connection belongs to. + :paramtype private_endpoint: ~azure.mgmt.hybridcompute.models.PrivateEndpointProperty + :keyword private_link_service_connection_state: Connection state of the private endpoint + connection. + :paramtype private_link_service_connection_state: + ~azure.mgmt.hybridcompute.models.PrivateLinkServiceConnectionStateProperty + """ + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + self.group_ids = None + + +class PrivateEndpointProperty(msrest.serialization.Model): + """Private endpoint which the connection belongs to. + + :ivar id: Resource id of the private endpoint. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Resource id of the private endpoint. + :paramtype id: str + """ + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateLinkResource(ProxyResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.hybridcompute.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Resource properties. + :paramtype properties: ~azure.mgmt.hybridcompute.models.PrivateLinkResourceProperties + """ + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Array of results. + :vartype value: list[~azure.mgmt.hybridcompute.models.PrivateLinkResource] + :ivar next_link: Link to retrieve next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PrivateLinkResourceProperties(msrest.serialization.Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: Required DNS zone names of the the private link resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkScopeValidationDetails(msrest.serialization.Model): + """PrivateLinkScopeValidationDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar public_network_access: Indicates whether machines associated with the private link scope + can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :vartype public_network_access: str or ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + :ivar connection_details: List of Private Endpoint Connection details. + :vartype connection_details: list[~azure.mgmt.hybridcompute.models.ConnectionDetail] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'connection_details': {'key': 'connectionDetails', 'type': '[ConnectionDetail]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword public_network_access: Indicates whether machines associated with the private link + scope can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + :keyword connection_details: List of Private Endpoint Connection details. + :paramtype connection_details: list[~azure.mgmt.hybridcompute.models.ConnectionDetail] + """ + super(PrivateLinkScopeValidationDetails, self).__init__(**kwargs) + self.id = None + self.public_network_access = kwargs.get('public_network_access', "Disabled") + self.connection_details = kwargs.get('connection_details', None) + + +class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): + """State of the private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar status: Required. The private link service connection status. + :vartype status: str + :ivar description: Required. The private link service connection description. + :vartype description: str + :ivar actions_required: The actions required for private link service connection. + :vartype actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Required. The private link service connection status. + :paramtype status: str + :keyword description: Required. The private link service connection description. + :paramtype description: str + """ + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = kwargs['status'] + self.description = kwargs['description'] + self.actions_required = None + + +class RunCommandInputParameter(msrest.serialization.Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The run command parameter name. + :vartype name: str + :ivar value: Required. The run command parameter value. + :vartype value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The run command parameter name. + :paramtype name: str + :keyword value: Required. The run command parameter value. + :paramtype value: str + """ + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs['value'] + + +class RunCommandManagedIdentity(msrest.serialization.Model): + """Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + + :ivar client_id: Client Id (GUID value) of the user-assigned managed identity. ObjectId should + not be used if this is provided. + :vartype client_id: str + :ivar object_id: Object Id (GUID value) of the user-assigned managed identity. ClientId should + not be used if this is provided. + :vartype object_id: str + """ + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword client_id: Client Id (GUID value) of the user-assigned managed identity. ObjectId + should not be used if this is provided. + :paramtype client_id: str + :keyword object_id: Object Id (GUID value) of the user-assigned managed identity. ClientId + should not be used if this is provided. + :paramtype object_id: str + """ + super(RunCommandManagedIdentity, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + + +class ServiceStatus(msrest.serialization.Model): + """Describes the status and behavior of a service. + + :ivar status: The current status of the service. + :vartype status: str + :ivar startup_type: The behavior of the service when the Arc-enabled machine starts up. + :vartype startup_type: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'startup_type': {'key': 'startupType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: The current status of the service. + :paramtype status: str + :keyword startup_type: The behavior of the service when the Arc-enabled machine starts up. + :paramtype startup_type: str + """ + super(ServiceStatus, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.startup_type = kwargs.get('startup_type', None) + + +class ServiceStatuses(msrest.serialization.Model): + """Reports the state and behavior of dependent services. + + :ivar extension_service: The state of the extension service on the Arc-enabled machine. + :vartype extension_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + :ivar guest_configuration_service: The state of the guest configuration service on the + Arc-enabled machine. + :vartype guest_configuration_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + """ + + _attribute_map = { + 'extension_service': {'key': 'extensionService', 'type': 'ServiceStatus'}, + 'guest_configuration_service': {'key': 'guestConfigurationService', 'type': 'ServiceStatus'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword extension_service: The state of the extension service on the Arc-enabled machine. + :paramtype extension_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + :keyword guest_configuration_service: The state of the guest configuration service on the + Arc-enabled machine. + :paramtype guest_configuration_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + """ + super(ServiceStatuses, self).__init__(**kwargs) + self.extension_service = kwargs.get('extension_service', None) + self.guest_configuration_service = kwargs.get('guest_configuration_service', None) + + +class Subnet(msrest.serialization.Model): + """Describes the subnet. + + :ivar address_prefix: Represents address prefix. + :vartype address_prefix: str + """ + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword address_prefix: Represents address prefix. + :paramtype address_prefix: str + """ + super(Subnet, self).__init__(**kwargs) + self.address_prefix = kwargs.get('address_prefix', None) + + +class SystemData(msrest.serialization.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. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.hybridcompute.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. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.hybridcompute.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or ~azure.mgmt.hybridcompute.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or ~azure.mgmt.hybridcompute.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TagsResource(msrest.serialization.Model): + """A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class WindowsParameters(msrest.serialization.Model): + """Input for InstallPatches on a Windows VM, as directly received by the API. + + :ivar classifications_to_include: The update classifications to select when installing patches + for Windows. + :vartype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationWindows] + :ivar kb_numbers_to_include: Kbs to include in the patch operation. + :vartype kb_numbers_to_include: list[str] + :ivar kb_numbers_to_exclude: Kbs to exclude in the patch operation. + :vartype kb_numbers_to_exclude: list[str] + :ivar exclude_kbs_requiring_reboot: Filters out Kbs that don't have an + InstallationRebootBehavior of 'NeverReboots' when this is set to true. + :vartype exclude_kbs_requiring_reboot: bool + :ivar max_patch_publish_date: This is used to install patches that were published on or before + this given max published date. + :vartype max_patch_publish_date: ~datetime.datetime + """ + + _attribute_map = { + 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, + 'kb_numbers_to_include': {'key': 'kbNumbersToInclude', 'type': '[str]'}, + 'kb_numbers_to_exclude': {'key': 'kbNumbersToExclude', 'type': '[str]'}, + 'exclude_kbs_requiring_reboot': {'key': 'excludeKbsRequiringReboot', 'type': 'bool'}, + 'max_patch_publish_date': {'key': 'maxPatchPublishDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword classifications_to_include: The update classifications to select when installing + patches for Windows. + :paramtype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationWindows] + :keyword kb_numbers_to_include: Kbs to include in the patch operation. + :paramtype kb_numbers_to_include: list[str] + :keyword kb_numbers_to_exclude: Kbs to exclude in the patch operation. + :paramtype kb_numbers_to_exclude: list[str] + :keyword exclude_kbs_requiring_reboot: Filters out Kbs that don't have an + InstallationRebootBehavior of 'NeverReboots' when this is set to true. + :paramtype exclude_kbs_requiring_reboot: bool + :keyword max_patch_publish_date: This is used to install patches that were published on or + before this given max published date. + :paramtype max_patch_publish_date: ~datetime.datetime + """ + super(WindowsParameters, self).__init__(**kwargs) + self.classifications_to_include = kwargs.get('classifications_to_include', None) + self.kb_numbers_to_include = kwargs.get('kb_numbers_to_include', None) + self.kb_numbers_to_exclude = kwargs.get('kb_numbers_to_exclude', None) + self.exclude_kbs_requiring_reboot = kwargs.get('exclude_kbs_requiring_reboot', None) + self.max_patch_publish_date = kwargs.get('max_patch_publish_date', None) diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models_py3.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models_py3.py new file mode 100644 index 00000000000..8e293369270 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/models/_models_py3.py @@ -0,0 +1,3757 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Any, Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._hybrid_compute_management_client_enums import * + + +class AgentConfiguration(msrest.serialization.Model): + """Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar proxy_url: Specifies the URL of the proxy to be used. + :vartype proxy_url: str + :ivar incoming_connections_ports: Specifies the list of ports that the agent will be able to + listen on. + :vartype incoming_connections_ports: list[str] + :ivar extensions_allow_list: Array of extensions that are allowed to be installed or updated. + :vartype extensions_allow_list: list[~azure.mgmt.hybridcompute.models.ConfigurationExtension] + :ivar extensions_block_list: Array of extensions that are blocked (cannot be installed or + updated). + :vartype extensions_block_list: list[~azure.mgmt.hybridcompute.models.ConfigurationExtension] + :ivar proxy_bypass: List of service names which should not use the specified proxy server. + :vartype proxy_bypass: list[str] + :ivar extensions_enabled: Specifies whether the extension service is enabled or disabled. + :vartype extensions_enabled: str + :ivar guest_configuration_enabled: Specified whether the guest configuration service is enabled + or disabled. + :vartype guest_configuration_enabled: str + :ivar config_mode: Name of configuration mode to use. Modes are pre-defined configurations of + security controls, extension allowlists and guest configuration, maintained by Microsoft. + Possible values include: "full", "monitor". + :vartype config_mode: str or ~azure.mgmt.hybridcompute.models.AgentConfigurationMode + """ + + _validation = { + 'proxy_url': {'readonly': True}, + 'incoming_connections_ports': {'readonly': True}, + 'extensions_allow_list': {'readonly': True}, + 'extensions_block_list': {'readonly': True}, + 'proxy_bypass': {'readonly': True}, + 'extensions_enabled': {'readonly': True}, + 'guest_configuration_enabled': {'readonly': True}, + 'config_mode': {'readonly': True}, + } + + _attribute_map = { + 'proxy_url': {'key': 'proxyUrl', 'type': 'str'}, + 'incoming_connections_ports': {'key': 'incomingConnectionsPorts', 'type': '[str]'}, + 'extensions_allow_list': {'key': 'extensionsAllowList', 'type': '[ConfigurationExtension]'}, + 'extensions_block_list': {'key': 'extensionsBlockList', 'type': '[ConfigurationExtension]'}, + 'proxy_bypass': {'key': 'proxyBypass', 'type': '[str]'}, + 'extensions_enabled': {'key': 'extensionsEnabled', 'type': 'str'}, + 'guest_configuration_enabled': {'key': 'guestConfigurationEnabled', 'type': 'str'}, + 'config_mode': {'key': 'configMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AgentConfiguration, self).__init__(**kwargs) + self.proxy_url = None + self.incoming_connections_ports = None + self.extensions_allow_list = None + self.extensions_block_list = None + self.proxy_bypass = None + self.extensions_enabled = None + self.guest_configuration_enabled = None + self.config_mode = None + + +class AgentUpgrade(msrest.serialization.Model): + """The info w.r.t Agent Upgrade. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar desired_version: Specifies the version info w.r.t AgentUpgrade for the machine. + :vartype desired_version: str + :ivar correlation_id: The correlation ID passed in from RSM per upgrade. + :vartype correlation_id: str + :ivar enable_automatic_upgrade: Specifies if RSM should try to upgrade this machine. + :vartype enable_automatic_upgrade: bool + :ivar last_attempt_desired_version: Specifies the version of the last attempt. + :vartype last_attempt_desired_version: str + :ivar last_attempt_timestamp: Timestamp of last upgrade attempt. + :vartype last_attempt_timestamp: str + :ivar last_attempt_status: Specifies the status of Agent Upgrade. Possible values include: + "Success", "Failed". + :vartype last_attempt_status: str or ~azure.mgmt.hybridcompute.models.LastAttemptStatusEnum + :ivar last_attempt_message: Failure message of last upgrade attempt if any. + :vartype last_attempt_message: str + """ + + _validation = { + 'last_attempt_desired_version': {'readonly': True}, + 'last_attempt_timestamp': {'readonly': True}, + 'last_attempt_status': {'readonly': True}, + 'last_attempt_message': {'readonly': True}, + } + + _attribute_map = { + 'desired_version': {'key': 'desiredVersion', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'enable_automatic_upgrade': {'key': 'enableAutomaticUpgrade', 'type': 'bool'}, + 'last_attempt_desired_version': {'key': 'lastAttemptDesiredVersion', 'type': 'str'}, + 'last_attempt_timestamp': {'key': 'lastAttemptTimestamp', 'type': 'str'}, + 'last_attempt_status': {'key': 'lastAttemptStatus', 'type': 'str'}, + 'last_attempt_message': {'key': 'lastAttemptMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + desired_version: Optional[str] = None, + correlation_id: Optional[str] = None, + enable_automatic_upgrade: Optional[bool] = None, + **kwargs + ): + """ + :keyword desired_version: Specifies the version info w.r.t AgentUpgrade for the machine. + :paramtype desired_version: str + :keyword correlation_id: The correlation ID passed in from RSM per upgrade. + :paramtype correlation_id: str + :keyword enable_automatic_upgrade: Specifies if RSM should try to upgrade this machine. + :paramtype enable_automatic_upgrade: bool + """ + super(AgentUpgrade, self).__init__(**kwargs) + self.desired_version = desired_version + self.correlation_id = correlation_id + self.enable_automatic_upgrade = enable_automatic_upgrade + self.last_attempt_desired_version = None + self.last_attempt_timestamp = None + self.last_attempt_status = None + self.last_attempt_message = None + + +class AgentVersion(msrest.serialization.Model): + """Describes properties of Agent Version. + + :ivar agent_version: Represents the agent version. + :vartype agent_version: str + :ivar download_link: Represents the download link of specific agent version. + :vartype download_link: str + :ivar os_type: Defines the os type. + :vartype os_type: str + """ + + _attribute_map = { + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'download_link': {'key': 'downloadLink', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + *, + agent_version: Optional[str] = None, + download_link: Optional[str] = None, + os_type: Optional[str] = None, + **kwargs + ): + """ + :keyword agent_version: Represents the agent version. + :paramtype agent_version: str + :keyword download_link: Represents the download link of specific agent version. + :paramtype download_link: str + :keyword os_type: Defines the os type. + :paramtype os_type: str + """ + super(AgentVersion, self).__init__(**kwargs) + self.agent_version = agent_version + self.download_link = download_link + self.os_type = os_type + + +class AgentVersionsList(msrest.serialization.Model): + """Describes AgentVersions List. + + :ivar value: The list of available Agent Versions. + :vartype value: list[~azure.mgmt.hybridcompute.models.AgentVersion] + :ivar next_link: The URI to fetch the next 10 available Agent Versions. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentVersion]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentVersion"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of available Agent Versions. + :paramtype value: list[~azure.mgmt.hybridcompute.models.AgentVersion] + :keyword next_link: The URI to fetch the next 10 available Agent Versions. + :paramtype next_link: str + """ + super(AgentVersionsList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AvailablePatchCountByClassification(msrest.serialization.Model): + """Summarization of patches available for installation on the machine by classification. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar security: Number of security patches available for installation. + :vartype security: int + :ivar critical: Number of critical patches available for installation. + :vartype critical: int + :ivar definition: Number of definition patches available for installation. + :vartype definition: int + :ivar update_rollup: Number of update Rollup patches available for installation. + :vartype update_rollup: int + :ivar feature_pack: Number of feature pack patches available for installation. + :vartype feature_pack: int + :ivar service_pack: Number of service pack patches available for installation. + :vartype service_pack: int + :ivar tools: Number of tools patches available for installation. + :vartype tools: int + :ivar updates: Number of updates category patches available for installation. + :vartype updates: int + :ivar other: Number of other patches available for installation. + :vartype other: int + """ + + _validation = { + 'security': {'readonly': True}, + 'critical': {'readonly': True}, + 'definition': {'readonly': True}, + 'update_rollup': {'readonly': True}, + 'feature_pack': {'readonly': True}, + 'service_pack': {'readonly': True}, + 'tools': {'readonly': True}, + 'updates': {'readonly': True}, + 'other': {'readonly': True}, + } + + _attribute_map = { + 'security': {'key': 'security', 'type': 'int'}, + 'critical': {'key': 'critical', 'type': 'int'}, + 'definition': {'key': 'definition', 'type': 'int'}, + 'update_rollup': {'key': 'updateRollup', 'type': 'int'}, + 'feature_pack': {'key': 'featurePack', 'type': 'int'}, + 'service_pack': {'key': 'servicePack', 'type': 'int'}, + 'tools': {'key': 'tools', 'type': 'int'}, + 'updates': {'key': 'updates', 'type': 'int'}, + 'other': {'key': 'other', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AvailablePatchCountByClassification, self).__init__(**kwargs) + self.security = None + self.critical = None + self.definition = None + self.update_rollup = None + self.feature_pack = None + self.service_pack = None + self.tools = None + self.updates = None + self.other = None + + +class CloudMetadata(msrest.serialization.Model): + """The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: Specifies the cloud provider (Azure/AWS/GCP...). + :vartype provider: str + """ + + _validation = { + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(CloudMetadata, self).__init__(**kwargs) + self.provider = None + + +class ConfigurationExtension(msrest.serialization.Model): + """Describes properties that can identify extensions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar publisher: Publisher of the extension. + :vartype publisher: str + :ivar type: Type of the extension. + :vartype type: str + """ + + _validation = { + 'publisher': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ConfigurationExtension, self).__init__(**kwargs) + self.publisher = None + self.type = None + + +class ConnectionDetail(msrest.serialization.Model): + """ConnectionDetail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar private_ip_address: The private endpoint connection private ip address. + :vartype private_ip_address: str + :ivar link_identifier: The private endpoint connection link identifier. + :vartype link_identifier: str + :ivar group_id: The private endpoint connection group id. + :vartype group_id: str + :ivar member_name: The private endpoint connection member name. + :vartype member_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'link_identifier': {'readonly': True}, + 'group_id': {'readonly': True}, + 'member_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'link_identifier': {'key': 'linkIdentifier', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'member_name': {'key': 'memberName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ConnectionDetail, self).__init__(**kwargs) + self.id = None + self.private_ip_address = None + self.link_identifier = None + self.group_id = None + self.member_name = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :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.hybridcompute.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.hybridcompute.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorDetailAutoGenerated(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :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.hybridcompute.models.ErrorDetailAutoGenerated] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.hybridcompute.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetailAutoGenerated]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetailAutoGenerated, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseAutoGenerated(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.hybridcompute.models.ErrorDetailAutoGenerated + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetailAutoGenerated'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetailAutoGenerated"] = None, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.hybridcompute.models.ErrorDetailAutoGenerated + """ + super(ErrorResponseAutoGenerated, self).__init__(**kwargs) + self.error = error + + +class ExtensionTargetProperties(msrest.serialization.Model): + """Describes the Machine Extension Target Version Properties. + + :ivar target_version: Properties for the specified Extension to Upgrade. + :vartype target_version: str + """ + + _attribute_map = { + 'target_version': {'key': 'targetVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + target_version: Optional[str] = None, + **kwargs + ): + """ + :keyword target_version: Properties for the specified Extension to Upgrade. + :paramtype target_version: str + """ + super(ExtensionTargetProperties, self).__init__(**kwargs) + self.target_version = target_version + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ProxyResource, self).__init__(**kwargs) + + +class ExtensionValue(ProxyResource): + """Describes a Extension Metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar version: The version of the Extension being received. + :vartype version: str + :ivar extension_type: The type of the Extension being received. + :vartype extension_type: str + :ivar publisher: The publisher of the Extension being received. + :vartype publisher: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'version': {'readonly': True}, + 'extension_type': {'readonly': True}, + 'publisher': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'extension_type': {'key': 'properties.extensionType', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExtensionValue, self).__init__(**kwargs) + self.version = None + self.extension_type = None + self.publisher = None + + +class ExtensionValueListResult(msrest.serialization.Model): + """The List Extension Metadata response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of extension metadata. + :vartype value: list[~azure.mgmt.hybridcompute.models.ExtensionValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExtensionValue]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExtensionValueListResult, self).__init__(**kwargs) + self.value = None + + +class PrivateLinkScopesResource(msrest.serialization.Model): + """An azure resource object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar location: Required. Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword location: Required. Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PrivateLinkScopesResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class HybridComputePrivateLinkScope(PrivateLinkScopesResource): + """An Azure Arc PrivateLinkScope definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar location: Required. Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Properties that define a Azure Arc PrivateLinkScope resource. + :vartype properties: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeProperties + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'HybridComputePrivateLinkScopeProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + properties: Optional["HybridComputePrivateLinkScopeProperties"] = None, + **kwargs + ): + """ + :keyword location: Required. Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword properties: Properties that define a Azure Arc PrivateLinkScope resource. + :paramtype properties: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeProperties + """ + super(HybridComputePrivateLinkScope, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + self.system_data = None + + +class HybridComputePrivateLinkScopeListResult(msrest.serialization.Model): + """Describes the list of Azure Arc PrivateLinkScope resources. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. List of Azure Arc PrivateLinkScope definitions. + :vartype value: list[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope] + :ivar next_link: The URI to get the next set of Azure Arc PrivateLinkScope definitions if too + many PrivateLinkScopes where returned in the result set. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HybridComputePrivateLinkScope]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["HybridComputePrivateLinkScope"], + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: Required. List of Azure Arc PrivateLinkScope definitions. + :paramtype value: list[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope] + :keyword next_link: The URI to get the next set of Azure Arc PrivateLinkScope definitions if + too many PrivateLinkScopes where returned in the result set. + :paramtype next_link: str + """ + super(HybridComputePrivateLinkScopeListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class HybridComputePrivateLinkScopeProperties(msrest.serialization.Model): + """Properties that define a Azure Arc PrivateLinkScope resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar public_network_access: Indicates whether machines associated with the private link scope + can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :vartype public_network_access: str or ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + :ivar provisioning_state: Current state of this PrivateLinkScope: whether or not is has been + provisioned within the resource group it is defined. Users cannot change this value but are + able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. + :vartype provisioning_state: str + :ivar private_link_scope_id: The Guid id of the private link scope. + :vartype private_link_scope_id: str + :ivar private_endpoint_connections: The collection of associated Private Endpoint Connections. + :vartype private_endpoint_connections: + list[~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionDataModel] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'private_link_scope_id': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + } + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_link_scope_id': {'key': 'privateLinkScopeId', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionDataModel]'}, + } + + def __init__( + self, + *, + public_network_access: Optional[Union[str, "PublicNetworkAccessType"]] = "Disabled", + **kwargs + ): + """ + :keyword public_network_access: Indicates whether machines associated with the private link + scope can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + """ + super(HybridComputePrivateLinkScopeProperties, self).__init__(**kwargs) + self.public_network_access = public_network_access + self.provisioning_state = None + self.private_link_scope_id = None + self.private_endpoint_connections = None + + +class HybridIdentityMetadata(ProxyResource): + """Defines the HybridIdentityMetadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar vm_id: The unique identifier for the resource. + :vartype vm_id: str + :ivar public_key: The Public Key. + :vartype public_key: str + :ivar identity: Identity for the resource. + :vartype identity: ~azure.mgmt.hybridcompute.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'identity': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'identity': {'key': 'properties.identity', 'type': 'Identity'}, + } + + def __init__( + self, + *, + vm_id: Optional[str] = None, + public_key: Optional[str] = None, + **kwargs + ): + """ + :keyword vm_id: The unique identifier for the resource. + :paramtype vm_id: str + :keyword public_key: The Public Key. + :paramtype public_key: str + """ + super(HybridIdentityMetadata, self).__init__(**kwargs) + self.vm_id = vm_id + self.public_key = public_key + self.identity = None + + +class HybridIdentityMetadataList(msrest.serialization.Model): + """List of HybridIdentityMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: Url to follow for getting next page of HybridIdentityMetadata. + :vartype next_link: str + :ivar value: Required. Array of HybridIdentityMetadata. + :vartype value: list[~azure.mgmt.hybridcompute.models.HybridIdentityMetadata] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[HybridIdentityMetadata]'}, + } + + def __init__( + self, + *, + value: List["HybridIdentityMetadata"], + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword next_link: Url to follow for getting next page of HybridIdentityMetadata. + :paramtype next_link: str + :keyword value: Required. Array of HybridIdentityMetadata. + :paramtype value: list[~azure.mgmt.hybridcompute.models.HybridIdentityMetadata] + """ + super(HybridIdentityMetadataList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + **kwargs + ): + """ + :keyword type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :paramtype type: str + """ + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class IpAddress(msrest.serialization.Model): + """Describes properties of the IP address. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar address: Represents the IP Address. + :vartype address: str + :ivar ip_address_version: Represents the Ip Address Version. + :vartype ip_address_version: str + :ivar subnet: The subnet to which this IP address belongs. + :vartype subnet: ~azure.mgmt.hybridcompute.models.Subnet + """ + + _validation = { + 'subnet': {'readonly': True}, + } + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'ip_address_version': {'key': 'ipAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'Subnet'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + ip_address_version: Optional[str] = None, + **kwargs + ): + """ + :keyword address: Represents the IP Address. + :paramtype address: str + :keyword ip_address_version: Represents the Ip Address Version. + :paramtype ip_address_version: str + """ + super(IpAddress, self).__init__(**kwargs) + self.address = address + self.ip_address_version = ip_address_version + self.subnet = None + + +class LinuxParameters(msrest.serialization.Model): + """Input for InstallPatches on a Linux VM, as directly received by the API. + + :ivar classifications_to_include: The update classifications to select when installing patches + for Linux. + :vartype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationLinux] + :ivar package_name_masks_to_include: packages to include in the patch operation. Format: + packageName_packageVersion. + :vartype package_name_masks_to_include: list[str] + :ivar package_name_masks_to_exclude: packages to exclude in the patch operation. Format: + packageName_packageVersion. + :vartype package_name_masks_to_exclude: list[str] + """ + + _attribute_map = { + 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, + 'package_name_masks_to_include': {'key': 'packageNameMasksToInclude', 'type': '[str]'}, + 'package_name_masks_to_exclude': {'key': 'packageNameMasksToExclude', 'type': '[str]'}, + } + + def __init__( + self, + *, + classifications_to_include: Optional[List[Union[str, "VMGuestPatchClassificationLinux"]]] = None, + package_name_masks_to_include: Optional[List[str]] = None, + package_name_masks_to_exclude: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword classifications_to_include: The update classifications to select when installing + patches for Linux. + :paramtype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationLinux] + :keyword package_name_masks_to_include: packages to include in the patch operation. Format: + packageName_packageVersion. + :paramtype package_name_masks_to_include: list[str] + :keyword package_name_masks_to_exclude: packages to exclude in the patch operation. Format: + packageName_packageVersion. + :paramtype package_name_masks_to_exclude: list[str] + """ + super(LinuxParameters, self).__init__(**kwargs) + self.classifications_to_include = classifications_to_include + self.package_name_masks_to_include = package_name_masks_to_include + self.package_name_masks_to_exclude = package_name_masks_to_exclude + + +class LocationData(msrest.serialization.Model): + """Metadata pertaining to the geographic location of the resource. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. A canonical name for the geographic or physical location. + :vartype name: str + :ivar city: The city or locality where the resource is located. + :vartype city: str + :ivar district: The district, state, or province where the resource is located. + :vartype district: str + :ivar country_or_region: The country or region where the resource is located. + :vartype country_or_region: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 256, 'min_length': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'district': {'key': 'district', 'type': 'str'}, + 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + city: Optional[str] = None, + district: Optional[str] = None, + country_or_region: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Required. A canonical name for the geographic or physical location. + :paramtype name: str + :keyword city: The city or locality where the resource is located. + :paramtype city: str + :keyword district: The district, state, or province where the resource is located. + :paramtype district: str + :keyword country_or_region: The country or region where the resource is located. + :paramtype country_or_region: str + """ + super(LocationData, self).__init__(**kwargs) + self.name = name + self.city = city + self.district = district + self.country_or_region = country_or_region + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + """ + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class Machine(TrackedResource): + """Describes a hybrid machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar resources: The list of extensions affiliated to the machine. + :vartype resources: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :ivar identity: Identity for the resource. + :vartype identity: ~azure.mgmt.hybridcompute.models.Identity + :ivar kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :vartype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :ivar location_data: Metadata pertaining to the geographic location of the resource. + :vartype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :ivar agent_configuration: Configurable properties that the user can set locally via the + azcmagent config command, or remotely via ARM. + :vartype agent_configuration: ~azure.mgmt.hybridcompute.models.AgentConfiguration + :ivar service_statuses: Statuses of dependent services that are reported back to ARM. + :vartype service_statuses: ~azure.mgmt.hybridcompute.models.ServiceStatuses + :ivar cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :vartype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :ivar agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :vartype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :ivar os_profile: Specifies the operating system settings for the hybrid machine. + :vartype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :ivar provisioning_state: The provisioning state, which only appears in the response. + :vartype provisioning_state: str + :ivar status: The status of the hybrid machine agent. Possible values include: "Connected", + "Disconnected", "Error". + :vartype status: str or ~azure.mgmt.hybridcompute.models.StatusTypes + :ivar last_status_change: The time of the last status change. + :vartype last_status_change: ~datetime.datetime + :ivar error_details: Details about the error state. + :vartype error_details: list[~azure.mgmt.hybridcompute.models.ErrorDetail] + :ivar agent_version: The hybrid machine agent full version. + :vartype agent_version: str + :ivar vm_id: Specifies the hybrid machine unique ID. + :vartype vm_id: str + :ivar display_name: Specifies the hybrid machine display name. + :vartype display_name: str + :ivar machine_fqdn: Specifies the hybrid machine FQDN. + :vartype machine_fqdn: str + :ivar client_public_key: Public Key that the client provides to be used during initial resource + onboarding. + :vartype client_public_key: str + :ivar os_name: The Operating System running on the hybrid machine. + :vartype os_name: str + :ivar os_version: The version of Operating System running on the hybrid machine. + :vartype os_version: str + :ivar os_type: The type of Operating System (windows/linux). + :vartype os_type: str + :ivar vm_uuid: Specifies the Arc Machine's unique SMBIOS ID. + :vartype vm_uuid: str + :ivar extensions: Machine Extensions information (deprecated field). + :vartype extensions: list[~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView] + :ivar os_sku: Specifies the Operating System product SKU. + :vartype os_sku: str + :ivar domain_name: Specifies the Windows domain name. + :vartype domain_name: str + :ivar ad_fqdn: Specifies the AD fully qualified display name. + :vartype ad_fqdn: str + :ivar dns_fqdn: Specifies the DNS fully qualified display name. + :vartype dns_fqdn: str + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str + :ivar parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :vartype parent_cluster_resource_id: str + :ivar mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :vartype mssql_discovered: str + :ivar detected_properties: Detected properties from the machine. + :vartype detected_properties: dict[str, str] + :ivar network_profile: Information about the network the machine is on. + :vartype network_profile: ~azure.mgmt.hybridcompute.models.NetworkProfile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'resources': {'readonly': True}, + 'agent_configuration': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'last_status_change': {'readonly': True}, + 'error_details': {'readonly': True}, + 'agent_version': {'readonly': True}, + 'display_name': {'readonly': True}, + 'machine_fqdn': {'readonly': True}, + 'os_name': {'readonly': True}, + 'os_version': {'readonly': True}, + 'vm_uuid': {'readonly': True}, + 'os_sku': {'readonly': True}, + 'domain_name': {'readonly': True}, + 'ad_fqdn': {'readonly': True}, + 'dns_fqdn': {'readonly': True}, + 'detected_properties': {'readonly': True}, + 'network_profile': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[MachineExtension]'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location_data': {'key': 'properties.locationData', 'type': 'LocationData'}, + 'agent_configuration': {'key': 'properties.agentConfiguration', 'type': 'AgentConfiguration'}, + 'service_statuses': {'key': 'properties.serviceStatuses', 'type': 'ServiceStatuses'}, + 'cloud_metadata': {'key': 'properties.cloudMetadata', 'type': 'CloudMetadata'}, + 'agent_upgrade': {'key': 'properties.agentUpgrade', 'type': 'AgentUpgrade'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'last_status_change': {'key': 'properties.lastStatusChange', 'type': 'iso-8601'}, + 'error_details': {'key': 'properties.errorDetails', 'type': '[ErrorDetail]'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'vm_id': {'key': 'properties.vmId', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'machine_fqdn': {'key': 'properties.machineFqdn', 'type': 'str'}, + 'client_public_key': {'key': 'properties.clientPublicKey', 'type': 'str'}, + 'os_name': {'key': 'properties.osName', 'type': 'str'}, + 'os_version': {'key': 'properties.osVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'vm_uuid': {'key': 'properties.vmUuid', 'type': 'str'}, + 'extensions': {'key': 'properties.extensions', 'type': '[MachineExtensionInstanceView]'}, + 'os_sku': {'key': 'properties.osSku', 'type': 'str'}, + 'domain_name': {'key': 'properties.domainName', 'type': 'str'}, + 'ad_fqdn': {'key': 'properties.adFqdn', 'type': 'str'}, + 'dns_fqdn': {'key': 'properties.dnsFqdn', 'type': 'str'}, + 'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'}, + 'parent_cluster_resource_id': {'key': 'properties.parentClusterResourceId', 'type': 'str'}, + 'mssql_discovered': {'key': 'properties.mssqlDiscovered', 'type': 'str'}, + 'detected_properties': {'key': 'properties.detectedProperties', 'type': '{str}'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + identity: Optional["Identity"] = None, + kind: Optional[Union[str, "PrivateCloudKind"]] = None, + location_data: Optional["LocationData"] = None, + service_statuses: Optional["ServiceStatuses"] = None, + cloud_metadata: Optional["CloudMetadata"] = None, + agent_upgrade: Optional["AgentUpgrade"] = None, + os_profile: Optional["OSProfile"] = None, + vm_id: Optional[str] = None, + client_public_key: Optional[str] = None, + os_type: Optional[str] = None, + extensions: Optional[List["MachineExtensionInstanceView"]] = None, + private_link_scope_resource_id: Optional[str] = None, + parent_cluster_resource_id: Optional[str] = None, + mssql_discovered: Optional[str] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Identity for the resource. + :paramtype identity: ~azure.mgmt.hybridcompute.models.Identity + :keyword kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :paramtype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :keyword location_data: Metadata pertaining to the geographic location of the resource. + :paramtype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :keyword service_statuses: Statuses of dependent services that are reported back to ARM. + :paramtype service_statuses: ~azure.mgmt.hybridcompute.models.ServiceStatuses + :keyword cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :paramtype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :keyword agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :paramtype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :keyword os_profile: Specifies the operating system settings for the hybrid machine. + :paramtype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :keyword vm_id: Specifies the hybrid machine unique ID. + :paramtype vm_id: str + :keyword client_public_key: Public Key that the client provides to be used during initial + resource onboarding. + :paramtype client_public_key: str + :keyword os_type: The type of Operating System (windows/linux). + :paramtype os_type: str + :keyword extensions: Machine Extensions information (deprecated field). + :paramtype extensions: list[~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView] + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str + :keyword parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :paramtype parent_cluster_resource_id: str + :keyword mssql_discovered: Specifies whether any MS SQL instance is discovered on the machine. + :paramtype mssql_discovered: str + """ + super(Machine, self).__init__(tags=tags, location=location, **kwargs) + self.resources = None + self.identity = identity + self.kind = kind + self.location_data = location_data + self.agent_configuration = None + self.service_statuses = service_statuses + self.cloud_metadata = cloud_metadata + self.agent_upgrade = agent_upgrade + self.os_profile = os_profile + self.provisioning_state = None + self.status = None + self.last_status_change = None + self.error_details = None + self.agent_version = None + self.vm_id = vm_id + self.display_name = None + self.machine_fqdn = None + self.client_public_key = client_public_key + self.os_name = None + self.os_version = None + self.os_type = os_type + self.vm_uuid = None + self.extensions = extensions + self.os_sku = None + self.domain_name = None + self.ad_fqdn = None + self.dns_fqdn = None + self.private_link_scope_resource_id = private_link_scope_resource_id + self.parent_cluster_resource_id = parent_cluster_resource_id + self.mssql_discovered = mssql_discovered + self.detected_properties = None + self.network_profile = None + + +class MachineAssessPatchesResult(msrest.serialization.Model): + """Describes the properties of an AssessPatches result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The overall success or failure status of the operation. It remains "InProgress" + until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", + or "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", + "Succeeded", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.hybridcompute.models.PatchOperationStatus + :ivar assessment_activity_id: The activity ID of the operation that produced this result. + :vartype assessment_activity_id: str + :ivar reboot_pending: The overall reboot status of the VM. It will be true when partially + installed patches require a reboot to complete installation but the reboot has not yet + occurred. + :vartype reboot_pending: bool + :ivar available_patch_count_by_classification: Summarization of patches available for + installation on the machine by classification. + :vartype available_patch_count_by_classification: + ~azure.mgmt.hybridcompute.models.AvailablePatchCountByClassification + :ivar start_date_time: The UTC timestamp when the operation began. + :vartype start_date_time: ~datetime.datetime + :ivar last_modified_date_time: The UTC timestamp when the operation finished. + :vartype last_modified_date_time: ~datetime.datetime + :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values + include: "User", "Platform". + :vartype started_by: str or ~azure.mgmt.hybridcompute.models.PatchOperationStartedBy + :ivar patch_service_used: Specifies the patch service used for the operation. Possible values + include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". + :vartype patch_service_used: str or ~azure.mgmt.hybridcompute.models.PatchServiceUsed + :ivar os_type: The operating system type of the machine. Possible values include: "Windows", + "Linux". + :vartype os_type: str or ~azure.mgmt.hybridcompute.models.OsType + :ivar error_details: The errors that were encountered during execution of the operation. The + details array contains the list of them. + :vartype error_details: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + + _validation = { + 'status': {'readonly': True}, + 'assessment_activity_id': {'readonly': True}, + 'reboot_pending': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'started_by': {'readonly': True}, + 'patch_service_used': {'readonly': True}, + 'os_type': {'readonly': True}, + 'error_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'assessment_activity_id': {'key': 'assessmentActivityId', 'type': 'str'}, + 'reboot_pending': {'key': 'rebootPending', 'type': 'bool'}, + 'available_patch_count_by_classification': {'key': 'availablePatchCountByClassification', 'type': 'AvailablePatchCountByClassification'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'started_by': {'key': 'startedBy', 'type': 'str'}, + 'patch_service_used': {'key': 'patchServiceUsed', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + available_patch_count_by_classification: Optional["AvailablePatchCountByClassification"] = None, + **kwargs + ): + """ + :keyword available_patch_count_by_classification: Summarization of patches available for + installation on the machine by classification. + :paramtype available_patch_count_by_classification: + ~azure.mgmt.hybridcompute.models.AvailablePatchCountByClassification + """ + super(MachineAssessPatchesResult, self).__init__(**kwargs) + self.status = None + self.assessment_activity_id = None + self.reboot_pending = None + self.available_patch_count_by_classification = available_patch_count_by_classification + self.start_date_time = None + self.last_modified_date_time = None + self.started_by = None + self.patch_service_used = None + self.os_type = None + self.error_details = None + + +class MachineExtension(TrackedResource): + """Describes a Machine Extension. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :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_properties_type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :vartype type_properties_type: str + :ivar type_handler_version: Specifies the version of the script handler. + :vartype type_handler_version: str + :ivar enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :vartype enable_automatic_upgrade: bool + :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 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 provisioning_state: The provisioning state, which only appears in the response. + :vartype provisioning_state: str + :ivar instance_view: The machine extension instance view. + :vartype instance_view: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': '{object}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'MachineExtensionInstanceView'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + force_update_tag: Optional[str] = None, + publisher: Optional[str] = None, + type_properties_type: Optional[str] = None, + type_handler_version: Optional[str] = None, + enable_automatic_upgrade: Optional[bool] = None, + auto_upgrade_minor_version: Optional[bool] = None, + settings: Optional[Dict[str, Any]] = None, + protected_settings: Optional[Dict[str, Any]] = None, + instance_view: Optional["MachineExtensionInstanceView"] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword force_update_tag: How the extension handler should be forced to update even if the + extension configuration has not changed. + :paramtype force_update_tag: str + :keyword publisher: The name of the extension handler publisher. + :paramtype publisher: str + :keyword type_properties_type: Specifies the type of the extension; an example is + "CustomScriptExtension". + :paramtype type_properties_type: str + :keyword type_handler_version: Specifies the version of the script handler. + :paramtype type_handler_version: str + :keyword enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :paramtype enable_automatic_upgrade: bool + :keyword 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. + :paramtype auto_upgrade_minor_version: bool + :keyword settings: Json formatted public settings for the extension. + :paramtype settings: dict[str, any] + :keyword protected_settings: The extension can contain either protectedSettings or + protectedSettingsFromKeyVault or no protected settings at all. + :paramtype protected_settings: dict[str, any] + :keyword instance_view: The machine extension instance view. + :paramtype instance_view: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceView + """ + super(MachineExtension, self).__init__(tags=tags, location=location, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type_properties_type = type_properties_type + self.type_handler_version = type_handler_version + self.enable_automatic_upgrade = enable_automatic_upgrade + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class MachineExtensionInstanceView(msrest.serialization.Model): + """Describes the Machine Extension Instance View. + + :ivar name: The machine extension name. + :vartype name: 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 status: Instance view status. + :vartype status: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceViewStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'MachineExtensionInstanceViewStatus'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + status: Optional["MachineExtensionInstanceViewStatus"] = None, + **kwargs + ): + """ + :keyword name: The machine extension name. + :paramtype name: str + :keyword type: Specifies the type of the extension; an example is "CustomScriptExtension". + :paramtype type: str + :keyword type_handler_version: Specifies the version of the script handler. + :paramtype type_handler_version: str + :keyword status: Instance view status. + :paramtype status: ~azure.mgmt.hybridcompute.models.MachineExtensionInstanceViewStatus + """ + super(MachineExtensionInstanceView, self).__init__(**kwargs) + self.name = name + self.type = type + self.type_handler_version = type_handler_version + self.status = status + + +class MachineExtensionInstanceViewStatus(msrest.serialization.Model): + """Instance view status. + + :ivar code: The status code. + :vartype code: str + :ivar level: The level code. Possible values include: "Info", "Warning", "Error". + :vartype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :ivar display_status: The short localizable label for the status. + :vartype display_status: str + :ivar message: The detailed status message, including for alerts and error messages. + :vartype message: str + :ivar time: The time of the status. + :vartype time: ~datetime.datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + level: Optional[Union[str, "StatusLevelTypes"]] = None, + display_status: Optional[str] = None, + message: Optional[str] = None, + time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword code: The status code. + :paramtype code: str + :keyword level: The level code. Possible values include: "Info", "Warning", "Error". + :paramtype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :keyword display_status: The short localizable label for the status. + :paramtype display_status: str + :keyword message: The detailed status message, including for alerts and error messages. + :paramtype message: str + :keyword time: The time of the status. + :paramtype time: ~datetime.datetime + """ + super(MachineExtensionInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class MachineExtensionsListResult(msrest.serialization.Model): + """Describes the Machine Extensions List Result. + + :ivar value: The list of extensions. + :vartype value: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :ivar next_link: The uri to fetch the next page of machine extensions. Call ListNext() with + this to fetch the next page of extensions. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MachineExtension]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MachineExtension"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of extensions. + :paramtype value: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :keyword next_link: The uri to fetch the next page of machine extensions. Call ListNext() with + this to fetch the next page of extensions. + :paramtype next_link: str + """ + super(MachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ResourceUpdate(msrest.serialization.Model): + """The Update Resource model definition. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(ResourceUpdate, self).__init__(**kwargs) + self.tags = tags + + +class MachineExtensionUpdate(ResourceUpdate): + """Describes a Machine Extension Update. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :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 enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :vartype enable_automatic_upgrade: bool + :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 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] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': '{object}'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': '{object}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + force_update_tag: Optional[str] = None, + publisher: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + enable_automatic_upgrade: Optional[bool] = None, + auto_upgrade_minor_version: Optional[bool] = None, + settings: Optional[Dict[str, Any]] = None, + protected_settings: Optional[Dict[str, Any]] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword force_update_tag: How the extension handler should be forced to update even if the + extension configuration has not changed. + :paramtype force_update_tag: str + :keyword publisher: The name of the extension handler publisher. + :paramtype publisher: str + :keyword type: Specifies the type of the extension; an example is "CustomScriptExtension". + :paramtype type: str + :keyword type_handler_version: Specifies the version of the script handler. + :paramtype type_handler_version: str + :keyword enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version available. + :paramtype enable_automatic_upgrade: bool + :keyword 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. + :paramtype auto_upgrade_minor_version: bool + :keyword settings: Json formatted public settings for the extension. + :paramtype settings: dict[str, any] + :keyword protected_settings: The extension can contain either protectedSettings or + protectedSettingsFromKeyVault or no protected settings at all. + :paramtype protected_settings: dict[str, any] + """ + super(MachineExtensionUpdate, self).__init__(tags=tags, **kwargs) + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type = type + self.type_handler_version = type_handler_version + self.enable_automatic_upgrade = enable_automatic_upgrade + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.settings = settings + self.protected_settings = protected_settings + + +class MachineExtensionUpgrade(msrest.serialization.Model): + """Describes the Machine Extension Upgrade Properties. + + :ivar extension_targets: Describes the Extension Target Properties. + :vartype extension_targets: dict[str, + ~azure.mgmt.hybridcompute.models.ExtensionTargetProperties] + """ + + _attribute_map = { + 'extension_targets': {'key': 'extensionTargets', 'type': '{ExtensionTargetProperties}'}, + } + + def __init__( + self, + *, + extension_targets: Optional[Dict[str, "ExtensionTargetProperties"]] = None, + **kwargs + ): + """ + :keyword extension_targets: Describes the Extension Target Properties. + :paramtype extension_targets: dict[str, + ~azure.mgmt.hybridcompute.models.ExtensionTargetProperties] + """ + super(MachineExtensionUpgrade, self).__init__(**kwargs) + self.extension_targets = extension_targets + + +class MachineInstallPatchesParameters(msrest.serialization.Model): + """Input for InstallPatches as directly received by the API. + + All required parameters must be populated in order to send to Azure. + + :ivar maximum_duration: Required. Specifies the maximum amount of time that the operation will + run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours). + :vartype maximum_duration: str + :ivar reboot_setting: Required. Defines when it is acceptable to reboot a VM during a software + update operation. Possible values include: "IfRequired", "Never", "Always". + :vartype reboot_setting: str or ~azure.mgmt.hybridcompute.models.VMGuestPatchRebootSetting + :ivar windows_parameters: Input for InstallPatches on a Windows VM, as directly received by the + API. + :vartype windows_parameters: ~azure.mgmt.hybridcompute.models.WindowsParameters + :ivar linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the + API. + :vartype linux_parameters: ~azure.mgmt.hybridcompute.models.LinuxParameters + """ + + _validation = { + 'maximum_duration': {'required': True}, + 'reboot_setting': {'required': True}, + } + + _attribute_map = { + 'maximum_duration': {'key': 'maximumDuration', 'type': 'str'}, + 'reboot_setting': {'key': 'rebootSetting', 'type': 'str'}, + 'windows_parameters': {'key': 'windowsParameters', 'type': 'WindowsParameters'}, + 'linux_parameters': {'key': 'linuxParameters', 'type': 'LinuxParameters'}, + } + + def __init__( + self, + *, + maximum_duration: str, + reboot_setting: Union[str, "VMGuestPatchRebootSetting"], + windows_parameters: Optional["WindowsParameters"] = None, + linux_parameters: Optional["LinuxParameters"] = None, + **kwargs + ): + """ + :keyword maximum_duration: Required. Specifies the maximum amount of time that the operation + will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours). + :paramtype maximum_duration: str + :keyword reboot_setting: Required. Defines when it is acceptable to reboot a VM during a + software update operation. Possible values include: "IfRequired", "Never", "Always". + :paramtype reboot_setting: str or ~azure.mgmt.hybridcompute.models.VMGuestPatchRebootSetting + :keyword windows_parameters: Input for InstallPatches on a Windows VM, as directly received by + the API. + :paramtype windows_parameters: ~azure.mgmt.hybridcompute.models.WindowsParameters + :keyword linux_parameters: Input for InstallPatches on a Linux VM, as directly received by the + API. + :paramtype linux_parameters: ~azure.mgmt.hybridcompute.models.LinuxParameters + """ + super(MachineInstallPatchesParameters, self).__init__(**kwargs) + self.maximum_duration = maximum_duration + self.reboot_setting = reboot_setting + self.windows_parameters = windows_parameters + self.linux_parameters = linux_parameters + + +class MachineInstallPatchesResult(msrest.serialization.Model): + """The result summary of an installation operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The overall success or failure status of the operation. It remains "InProgress" + until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or + "CompletedWithWarnings.". Possible values include: "Unknown", "InProgress", "Failed", + "Succeeded", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.hybridcompute.models.PatchOperationStatus + :ivar installation_activity_id: The activity ID of the operation that produced this result. + :vartype installation_activity_id: str + :ivar reboot_status: The reboot state of the VM following completion of the operation. Possible + values include: "Unknown", "NotNeeded", "Required", "Started", "Failed", "Completed". + :vartype reboot_status: str or ~azure.mgmt.hybridcompute.models.VMGuestPatchRebootStatus + :ivar maintenance_window_exceeded: Whether the operation ran out of time before it completed + all its intended actions. + :vartype maintenance_window_exceeded: bool + :ivar excluded_patch_count: The number of patches that were not installed due to the user + blocking their installation. + :vartype excluded_patch_count: int + :ivar not_selected_patch_count: The number of patches that were detected as available for + install, but did not meet the operation's criteria. + :vartype not_selected_patch_count: int + :ivar pending_patch_count: The number of patches that were identified as meeting the + installation criteria, but were not able to be installed. Typically this happens when + maintenanceWindowExceeded == true. + :vartype pending_patch_count: int + :ivar installed_patch_count: The number of patches successfully installed. + :vartype installed_patch_count: int + :ivar failed_patch_count: The number of patches that could not be installed due to some issue. + See errors for details. + :vartype failed_patch_count: int + :ivar start_date_time: The UTC timestamp when the operation began. + :vartype start_date_time: ~datetime.datetime + :ivar last_modified_date_time: The UTC timestamp when the operation finished. + :vartype last_modified_date_time: ~datetime.datetime + :ivar started_by: Indicates if operation was triggered by user or by platform. Possible values + include: "User", "Platform". + :vartype started_by: str or ~azure.mgmt.hybridcompute.models.PatchOperationStartedBy + :ivar patch_service_used: Specifies the patch service used for the operation. Possible values + include: "Unknown", "WU", "WU_WSUS", "YUM", "APT", "Zypper". + :vartype patch_service_used: str or ~azure.mgmt.hybridcompute.models.PatchServiceUsed + :ivar os_type: The operating system type of the machine. Possible values include: "Windows", + "Linux". + :vartype os_type: str or ~azure.mgmt.hybridcompute.models.OsType + :ivar error_details: The errors that were encountered during execution of the operation. The + details array contains the list of them. + :vartype error_details: ~azure.mgmt.hybridcompute.models.ErrorDetail + """ + + _validation = { + 'status': {'readonly': True}, + 'installation_activity_id': {'readonly': True}, + 'reboot_status': {'readonly': True}, + 'maintenance_window_exceeded': {'readonly': True}, + 'excluded_patch_count': {'readonly': True}, + 'not_selected_patch_count': {'readonly': True}, + 'pending_patch_count': {'readonly': True}, + 'installed_patch_count': {'readonly': True}, + 'failed_patch_count': {'readonly': True}, + 'start_date_time': {'readonly': True}, + 'last_modified_date_time': {'readonly': True}, + 'started_by': {'readonly': True}, + 'patch_service_used': {'readonly': True}, + 'os_type': {'readonly': True}, + 'error_details': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'installation_activity_id': {'key': 'installationActivityId', 'type': 'str'}, + 'reboot_status': {'key': 'rebootStatus', 'type': 'str'}, + 'maintenance_window_exceeded': {'key': 'maintenanceWindowExceeded', 'type': 'bool'}, + 'excluded_patch_count': {'key': 'excludedPatchCount', 'type': 'int'}, + 'not_selected_patch_count': {'key': 'notSelectedPatchCount', 'type': 'int'}, + 'pending_patch_count': {'key': 'pendingPatchCount', 'type': 'int'}, + 'installed_patch_count': {'key': 'installedPatchCount', 'type': 'int'}, + 'failed_patch_count': {'key': 'failedPatchCount', 'type': 'int'}, + 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + 'last_modified_date_time': {'key': 'lastModifiedDateTime', 'type': 'iso-8601'}, + 'started_by': {'key': 'startedBy', 'type': 'str'}, + 'patch_service_used': {'key': 'patchServiceUsed', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(MachineInstallPatchesResult, self).__init__(**kwargs) + self.status = None + self.installation_activity_id = None + self.reboot_status = None + self.maintenance_window_exceeded = None + self.excluded_patch_count = None + self.not_selected_patch_count = None + self.pending_patch_count = None + self.installed_patch_count = None + self.failed_patch_count = None + self.start_date_time = None + self.last_modified_date_time = None + self.started_by = None + self.patch_service_used = None + self.os_type = None + self.error_details = None + + +class MachineListResult(msrest.serialization.Model): + """The List hybrid machine operation response. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. The list of hybrid machines. + :vartype value: list[~azure.mgmt.hybridcompute.models.Machine] + :ivar next_link: The URI to fetch the next page of Machines. Call ListNext() with this URI to + fetch the next page of hybrid machines. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Machine]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Machine"], + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: Required. The list of hybrid machines. + :paramtype value: list[~azure.mgmt.hybridcompute.models.Machine] + :keyword next_link: The URI to fetch the next page of Machines. Call ListNext() with this URI + to fetch the next page of hybrid machines. + :paramtype next_link: str + """ + super(MachineListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class MachineRunCommand(TrackedResource): + """Describes a Run Command. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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.hybridcompute.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar source: The source of the run command script. + :vartype source: ~azure.mgmt.hybridcompute.models.MachineRunCommandScriptSource + :ivar parameters: The parameters used by the script. + :vartype parameters: list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :ivar protected_parameters: The parameters used by the script. + :vartype protected_parameters: list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :ivar async_execution: Optional. If set to true, provisioning will complete as soon as script + starts and will not wait for script to complete. + :vartype async_execution: bool + :ivar run_as_user: Specifies the user account on the machine when executing the run command. + :vartype run_as_user: str + :ivar run_as_password: Specifies the user account password on the machine when executing the + run command. + :vartype run_as_password: str + :ivar timeout_in_seconds: The timeout in seconds to execute the run command. + :vartype timeout_in_seconds: int + :ivar output_blob_uri: Specifies the Azure storage blob where script output stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. + :vartype output_blob_uri: str + :ivar error_blob_uri: Specifies the Azure storage blob where script error stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. + :vartype error_blob_uri: str + :ivar output_blob_managed_identity: User-assigned managed identity that has access to + outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :vartype output_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + :ivar error_blob_managed_identity: User-assigned managed identity that has access to + errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :vartype error_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + :ivar provisioning_state: The provisioning state, which only appears in the response. + :vartype provisioning_state: str + :ivar instance_view: The machine run command instance view. + :vartype instance_view: ~azure.mgmt.hybridcompute.models.MachineRunCommandInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'MachineRunCommandScriptSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '[RunCommandInputParameter]'}, + 'protected_parameters': {'key': 'properties.protectedParameters', 'type': '[RunCommandInputParameter]'}, + 'async_execution': {'key': 'properties.asyncExecution', 'type': 'bool'}, + 'run_as_user': {'key': 'properties.runAsUser', 'type': 'str'}, + 'run_as_password': {'key': 'properties.runAsPassword', 'type': 'str'}, + 'timeout_in_seconds': {'key': 'properties.timeoutInSeconds', 'type': 'int'}, + 'output_blob_uri': {'key': 'properties.outputBlobUri', 'type': 'str'}, + 'error_blob_uri': {'key': 'properties.errorBlobUri', 'type': 'str'}, + 'output_blob_managed_identity': {'key': 'properties.outputBlobManagedIdentity', 'type': 'RunCommandManagedIdentity'}, + 'error_blob_managed_identity': {'key': 'properties.errorBlobManagedIdentity', 'type': 'RunCommandManagedIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'MachineRunCommandInstanceView'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + source: Optional["MachineRunCommandScriptSource"] = None, + parameters: Optional[List["RunCommandInputParameter"]] = None, + protected_parameters: Optional[List["RunCommandInputParameter"]] = None, + async_execution: Optional[bool] = False, + run_as_user: Optional[str] = None, + run_as_password: Optional[str] = None, + timeout_in_seconds: Optional[int] = None, + output_blob_uri: Optional[str] = None, + error_blob_uri: Optional[str] = None, + output_blob_managed_identity: Optional["RunCommandManagedIdentity"] = None, + error_blob_managed_identity: Optional["RunCommandManagedIdentity"] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword source: The source of the run command script. + :paramtype source: ~azure.mgmt.hybridcompute.models.MachineRunCommandScriptSource + :keyword parameters: The parameters used by the script. + :paramtype parameters: list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :keyword protected_parameters: The parameters used by the script. + :paramtype protected_parameters: + list[~azure.mgmt.hybridcompute.models.RunCommandInputParameter] + :keyword async_execution: Optional. If set to true, provisioning will complete as soon as + script starts and will not wait for script to complete. + :paramtype async_execution: bool + :keyword run_as_user: Specifies the user account on the machine when executing the run command. + :paramtype run_as_user: str + :keyword run_as_password: Specifies the user account password on the machine when executing the + run command. + :paramtype run_as_password: str + :keyword timeout_in_seconds: The timeout in seconds to execute the run command. + :paramtype timeout_in_seconds: int + :keyword output_blob_uri: Specifies the Azure storage blob where script output stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. + :paramtype output_blob_uri: str + :keyword error_blob_uri: Specifies the Azure storage blob where script error stream will be + uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to + provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. + :paramtype error_blob_uri: str + :keyword output_blob_managed_identity: User-assigned managed identity that has access to + outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :paramtype output_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + :keyword error_blob_managed_identity: User-assigned managed identity that has access to + errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure + managed identity has been given access to blob's container with 'Storage Blob Data Contributor' + role assignment. In case of user-assigned identity, make sure you add it under VM's identity. + For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and + https://aka.ms/RunCommandManaged. + :paramtype error_blob_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + """ + super(MachineRunCommand, self).__init__(tags=tags, location=location, **kwargs) + self.source = source + self.parameters = parameters + self.protected_parameters = protected_parameters + self.async_execution = async_execution + self.run_as_user = run_as_user + self.run_as_password = run_as_password + self.timeout_in_seconds = timeout_in_seconds + self.output_blob_uri = output_blob_uri + self.error_blob_uri = error_blob_uri + self.output_blob_managed_identity = output_blob_managed_identity + self.error_blob_managed_identity = error_blob_managed_identity + self.provisioning_state = None + self.instance_view = None + + +class MachineRunCommandInstanceView(msrest.serialization.Model): + """Describes the Machine Extension Instance View. + + :ivar name: The run command name. + :vartype name: str + :ivar status: Instance view status. + :vartype status: ~azure.mgmt.hybridcompute.models.MachineRunCommandInstanceViewStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'MachineRunCommandInstanceViewStatus'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + status: Optional["MachineRunCommandInstanceViewStatus"] = None, + **kwargs + ): + """ + :keyword name: The run command name. + :paramtype name: str + :keyword status: Instance view status. + :paramtype status: ~azure.mgmt.hybridcompute.models.MachineRunCommandInstanceViewStatus + """ + super(MachineRunCommandInstanceView, self).__init__(**kwargs) + self.name = name + self.status = status + + +class MachineRunCommandInstanceViewStatus(msrest.serialization.Model): + """Instance view status. + + :ivar code: The status code. + :vartype code: str + :ivar level: The level code. Possible values include: "Info", "Warning", "Error". + :vartype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :ivar display_status: The short localizable label for the status. + :vartype display_status: str + :ivar message: The detailed status message, including for alerts and error messages. + :vartype message: str + :ivar time: The time of the status. + :vartype time: ~datetime.datetime + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + level: Optional[Union[str, "StatusLevelTypes"]] = None, + display_status: Optional[str] = None, + message: Optional[str] = None, + time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword code: The status code. + :paramtype code: str + :keyword level: The level code. Possible values include: "Info", "Warning", "Error". + :paramtype level: str or ~azure.mgmt.hybridcompute.models.StatusLevelTypes + :keyword display_status: The short localizable label for the status. + :paramtype display_status: str + :keyword message: The detailed status message, including for alerts and error messages. + :paramtype message: str + :keyword time: The time of the status. + :paramtype time: ~datetime.datetime + """ + super(MachineRunCommandInstanceViewStatus, self).__init__(**kwargs) + self.code = code + self.level = level + self.display_status = display_status + self.message = message + self.time = time + + +class MachineRunCommandScriptSource(msrest.serialization.Model): + """Describes the script sources for run command. Use only one of script, scriptUri, commandId. + + :ivar script: Specifies the script content to be executed on the machine. + :vartype script: str + :ivar script_uri: Specifies the script download location. It can be either SAS URI of an Azure + storage blob with read access or public URI. + :vartype script_uri: str + :ivar command_id: Specifies the commandId of predefined built-in script. + :vartype command_id: str + :ivar script_uri_managed_identity: User-assigned managed identity that has access to scriptUri + in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make + sure the Azure storage blob exists, and managed identity has been given access to blob's + container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, + make sure you add it under VM's identity. For more info on managed identity and Run Command, + refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + :vartype script_uri_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + """ + + _attribute_map = { + 'script': {'key': 'script', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'command_id': {'key': 'commandId', 'type': 'str'}, + 'script_uri_managed_identity': {'key': 'scriptUriManagedIdentity', 'type': 'RunCommandManagedIdentity'}, + } + + def __init__( + self, + *, + script: Optional[str] = None, + script_uri: Optional[str] = None, + command_id: Optional[str] = None, + script_uri_managed_identity: Optional["RunCommandManagedIdentity"] = None, + **kwargs + ): + """ + :keyword script: Specifies the script content to be executed on the machine. + :paramtype script: str + :keyword script_uri: Specifies the script download location. It can be either SAS URI of an + Azure storage blob with read access or public URI. + :paramtype script_uri: str + :keyword command_id: Specifies the commandId of predefined built-in script. + :paramtype command_id: str + :keyword script_uri_managed_identity: User-assigned managed identity that has access to + scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned + identity. Make sure the Azure storage blob exists, and managed identity has been given access + to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned + identity, make sure you add it under VM's identity. For more info on managed identity and Run + Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + :paramtype script_uri_managed_identity: + ~azure.mgmt.hybridcompute.models.RunCommandManagedIdentity + """ + super(MachineRunCommandScriptSource, self).__init__(**kwargs) + self.script = script + self.script_uri = script_uri + self.command_id = command_id + self.script_uri_managed_identity = script_uri_managed_identity + + +class MachineRunCommandsListResult(msrest.serialization.Model): + """Describes the Run Commands List Result. + + :ivar value: The list of run commands. + :vartype value: list[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :ivar next_link: The uri to fetch the next page of run commands. Call ListNext() with this to + fetch the next page of run commands. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MachineRunCommand]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MachineRunCommand"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of run commands. + :paramtype value: list[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :keyword next_link: The uri to fetch the next page of run commands. Call ListNext() with this + to fetch the next page of run commands. + :paramtype next_link: str + """ + super(MachineRunCommandsListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class MachineRunCommandUpdate(ResourceUpdate): + """Describes a Machine Extension Update. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(MachineRunCommandUpdate, self).__init__(tags=tags, **kwargs) + + +class MachineUpdate(ResourceUpdate): + """Describes a hybrid machine Update. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar identity: Identity for the resource. + :vartype identity: ~azure.mgmt.hybridcompute.models.Identity + :ivar kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :vartype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :ivar location_data: Metadata pertaining to the geographic location of the resource. + :vartype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :ivar os_profile: Specifies the operating system settings for the hybrid machine. + :vartype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :ivar cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :vartype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :ivar agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :vartype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :ivar parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :vartype parent_cluster_resource_id: str + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location_data': {'key': 'properties.locationData', 'type': 'LocationData'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'cloud_metadata': {'key': 'properties.cloudMetadata', 'type': 'CloudMetadata'}, + 'agent_upgrade': {'key': 'properties.agentUpgrade', 'type': 'AgentUpgrade'}, + 'parent_cluster_resource_id': {'key': 'properties.parentClusterResourceId', 'type': 'str'}, + 'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + identity: Optional["Identity"] = None, + kind: Optional[Union[str, "PrivateCloudKind"]] = None, + location_data: Optional["LocationData"] = None, + os_profile: Optional["OSProfile"] = None, + cloud_metadata: Optional["CloudMetadata"] = None, + agent_upgrade: Optional["AgentUpgrade"] = None, + parent_cluster_resource_id: Optional[str] = None, + private_link_scope_resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword identity: Identity for the resource. + :paramtype identity: ~azure.mgmt.hybridcompute.models.Identity + :keyword kind: Indicates which kind of VM fabric the instance is an instance of, such as HCI or + SCVMM etc. Possible values include: "AVS", "HCI", "SCVMM", "VMware". + :paramtype kind: str or ~azure.mgmt.hybridcompute.models.PrivateCloudKind + :keyword location_data: Metadata pertaining to the geographic location of the resource. + :paramtype location_data: ~azure.mgmt.hybridcompute.models.LocationData + :keyword os_profile: Specifies the operating system settings for the hybrid machine. + :paramtype os_profile: ~azure.mgmt.hybridcompute.models.OSProfile + :keyword cloud_metadata: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + :paramtype cloud_metadata: ~azure.mgmt.hybridcompute.models.CloudMetadata + :keyword agent_upgrade: The info of the machine w.r.t Agent Upgrade. + :paramtype agent_upgrade: ~azure.mgmt.hybridcompute.models.AgentUpgrade + :keyword parent_cluster_resource_id: The resource id of the parent cluster (Azure HCI) this + machine is assigned to, if any. + :paramtype parent_cluster_resource_id: str + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str + """ + super(MachineUpdate, self).__init__(tags=tags, **kwargs) + self.identity = identity + self.kind = kind + self.location_data = location_data + self.os_profile = os_profile + self.cloud_metadata = cloud_metadata + self.agent_upgrade = agent_upgrade + self.parent_cluster_resource_id = parent_cluster_resource_id + self.private_link_scope_resource_id = private_link_scope_resource_id + + +class NetworkInterface(msrest.serialization.Model): + """Describes a network interface. + + :ivar ip_addresses: The list of IP addresses in this interface. + :vartype ip_addresses: list[~azure.mgmt.hybridcompute.models.IpAddress] + """ + + _attribute_map = { + 'ip_addresses': {'key': 'ipAddresses', 'type': '[IpAddress]'}, + } + + def __init__( + self, + *, + ip_addresses: Optional[List["IpAddress"]] = None, + **kwargs + ): + """ + :keyword ip_addresses: The list of IP addresses in this interface. + :paramtype ip_addresses: list[~azure.mgmt.hybridcompute.models.IpAddress] + """ + super(NetworkInterface, self).__init__(**kwargs) + self.ip_addresses = ip_addresses + + +class NetworkProfile(msrest.serialization.Model): + """Describes the network information on this machine. + + :ivar network_interfaces: The list of network interfaces. + :vartype network_interfaces: list[~azure.mgmt.hybridcompute.models.NetworkInterface] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[NetworkInterface]'}, + } + + def __init__( + self, + *, + network_interfaces: Optional[List["NetworkInterface"]] = None, + **kwargs + ): + """ + :keyword network_interfaces: The list of network interfaces. + :paramtype network_interfaces: list[~azure.mgmt.hybridcompute.models.NetworkInterface] + """ + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.hybridcompute.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar display: Display properties. + :vartype display: ~azure.mgmt.hybridcompute.models.OperationValueDisplay + :ivar is_data_action: This property indicates if the operation is an action or a data action. + :vartype is_data_action: bool + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationValueDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + *, + display: Optional["OperationValueDisplay"] = None, + **kwargs + ): + """ + :keyword display: Display properties. + :paramtype display: ~azure.mgmt.hybridcompute.models.OperationValueDisplay + """ + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.display = display + self.is_data_action = None + + +class OperationValueDisplay(msrest.serialization.Model): + """Describes the properties of a Hybrid Compute Operation Value Display. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationValueDisplay, self).__init__(**kwargs) + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class OSProfile(msrest.serialization.Model): + """Specifies the operating system settings for the hybrid machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar computer_name: Specifies the host OS name of the hybrid machine. + :vartype computer_name: str + :ivar windows_configuration: Specifies the windows configuration for update management. + :vartype windows_configuration: ~azure.mgmt.hybridcompute.models.OSProfileWindowsConfiguration + :ivar linux_configuration: Specifies the linux configuration for update management. + :vartype linux_configuration: ~azure.mgmt.hybridcompute.models.OSProfileLinuxConfiguration + """ + + _validation = { + 'computer_name': {'readonly': True}, + } + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'windows_configuration': {'key': 'windowsConfiguration', 'type': 'OSProfileWindowsConfiguration'}, + 'linux_configuration': {'key': 'linuxConfiguration', 'type': 'OSProfileLinuxConfiguration'}, + } + + def __init__( + self, + *, + windows_configuration: Optional["OSProfileWindowsConfiguration"] = None, + linux_configuration: Optional["OSProfileLinuxConfiguration"] = None, + **kwargs + ): + """ + :keyword windows_configuration: Specifies the windows configuration for update management. + :paramtype windows_configuration: + ~azure.mgmt.hybridcompute.models.OSProfileWindowsConfiguration + :keyword linux_configuration: Specifies the linux configuration for update management. + :paramtype linux_configuration: ~azure.mgmt.hybridcompute.models.OSProfileLinuxConfiguration + """ + super(OSProfile, self).__init__(**kwargs) + self.computer_name = None + self.windows_configuration = windows_configuration + self.linux_configuration = linux_configuration + + +class OSProfileLinuxConfiguration(msrest.serialization.Model): + """Specifies the linux configuration for update management. + + :ivar assessment_mode: Specifies the assessment mode. Possible values include: "ImageDefault", + "AutomaticByPlatform". + :vartype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :ivar patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :vartype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + 'patch_mode': {'key': 'patchSettings.patchMode', 'type': 'str'}, + } + + def __init__( + self, + *, + assessment_mode: Optional[Union[str, "AssessmentModeTypes"]] = None, + patch_mode: Optional[Union[str, "PatchModeTypes"]] = None, + **kwargs + ): + """ + :keyword assessment_mode: Specifies the assessment mode. Possible values include: + "ImageDefault", "AutomaticByPlatform". + :paramtype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :keyword patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :paramtype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + super(OSProfileLinuxConfiguration, self).__init__(**kwargs) + self.assessment_mode = assessment_mode + self.patch_mode = patch_mode + + +class OSProfileWindowsConfiguration(msrest.serialization.Model): + """Specifies the windows configuration for update management. + + :ivar assessment_mode: Specifies the assessment mode. Possible values include: "ImageDefault", + "AutomaticByPlatform". + :vartype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :ivar patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :vartype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + + _attribute_map = { + 'assessment_mode': {'key': 'patchSettings.assessmentMode', 'type': 'str'}, + 'patch_mode': {'key': 'patchSettings.patchMode', 'type': 'str'}, + } + + def __init__( + self, + *, + assessment_mode: Optional[Union[str, "AssessmentModeTypes"]] = None, + patch_mode: Optional[Union[str, "PatchModeTypes"]] = None, + **kwargs + ): + """ + :keyword assessment_mode: Specifies the assessment mode. Possible values include: + "ImageDefault", "AutomaticByPlatform". + :paramtype assessment_mode: str or ~azure.mgmt.hybridcompute.models.AssessmentModeTypes + :keyword patch_mode: Specifies the patch mode. Possible values include: "ImageDefault", + "AutomaticByPlatform", "AutomaticByOS", "Manual". + :paramtype patch_mode: str or ~azure.mgmt.hybridcompute.models.PatchModeTypes + """ + super(OSProfileWindowsConfiguration, self).__init__(**kwargs) + self.assessment_mode = assessment_mode + self.patch_mode = patch_mode + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__( + self, + *, + properties: Optional["PrivateEndpointConnectionProperties"] = None, + **kwargs + ): + """ + :keyword properties: Resource properties. + :paramtype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.properties = properties + + +class PrivateEndpointConnectionDataModel(msrest.serialization.Model): + """The Data Model for a Private Endpoint Connection associated with a Private Link Scope. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM Resource Id of the Private Endpoint. + :vartype id: str + :ivar name: The Name of the Private Endpoint. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar properties: The Private Endpoint Connection properties. + :vartype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__( + self, + *, + properties: Optional["PrivateEndpointConnectionProperties"] = None, + **kwargs + ): + """ + :keyword properties: The Private Endpoint Connection properties. + :paramtype properties: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionProperties + """ + super(PrivateEndpointConnectionDataModel, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Array of results. + :vartype value: list[~azure.mgmt.hybridcompute.models.PrivateEndpointConnection] + :ivar next_link: Link to retrieve next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PrivateEndpointConnectionProperties(msrest.serialization.Model): + """Properties of a private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar private_endpoint: Private endpoint which the connection belongs to. + :vartype private_endpoint: ~azure.mgmt.hybridcompute.models.PrivateEndpointProperty + :ivar private_link_service_connection_state: Connection state of the private endpoint + connection. + :vartype private_link_service_connection_state: + ~azure.mgmt.hybridcompute.models.PrivateLinkServiceConnectionStateProperty + :ivar provisioning_state: State of the private endpoint connection. + :vartype provisioning_state: str + :ivar group_ids: List of group IDs. + :vartype group_ids: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'group_ids': {'readonly': True}, + } + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'group_ids': {'key': 'groupIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpointProperty"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionStateProperty"] = None, + **kwargs + ): + """ + :keyword private_endpoint: Private endpoint which the connection belongs to. + :paramtype private_endpoint: ~azure.mgmt.hybridcompute.models.PrivateEndpointProperty + :keyword private_link_service_connection_state: Connection state of the private endpoint + connection. + :paramtype private_link_service_connection_state: + ~azure.mgmt.hybridcompute.models.PrivateLinkServiceConnectionStateProperty + """ + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + self.group_ids = None + + +class PrivateEndpointProperty(msrest.serialization.Model): + """Private endpoint which the connection belongs to. + + :ivar id: Resource id of the private endpoint. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource id of the private endpoint. + :paramtype id: str + """ + super(PrivateEndpointProperty, self).__init__(**kwargs) + self.id = id + + +class PrivateLinkResource(ProxyResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.hybridcompute.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.hybridcompute.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__( + self, + *, + properties: Optional["PrivateLinkResourceProperties"] = None, + **kwargs + ): + """ + :keyword properties: Resource properties. + :paramtype properties: ~azure.mgmt.hybridcompute.models.PrivateLinkResourceProperties + """ + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = properties + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Array of results. + :vartype value: list[~azure.mgmt.hybridcompute.models.PrivateLinkResource] + :ivar next_link: Link to retrieve next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PrivateLinkResourceProperties(msrest.serialization.Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: Required DNS zone names of the the private link resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + + +class PrivateLinkScopeValidationDetails(msrest.serialization.Model): + """PrivateLinkScopeValidationDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar public_network_access: Indicates whether machines associated with the private link scope + can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :vartype public_network_access: str or ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + :ivar connection_details: List of Private Endpoint Connection details. + :vartype connection_details: list[~azure.mgmt.hybridcompute.models.ConnectionDetail] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'connection_details': {'key': 'connectionDetails', 'type': '[ConnectionDetail]'}, + } + + def __init__( + self, + *, + public_network_access: Optional[Union[str, "PublicNetworkAccessType"]] = "Disabled", + connection_details: Optional[List["ConnectionDetail"]] = None, + **kwargs + ): + """ + :keyword public_network_access: Indicates whether machines associated with the private link + scope can also use public Azure Arc service endpoints. Possible values include: "Enabled", + "Disabled". Default value: "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.hybridcompute.models.PublicNetworkAccessType + :keyword connection_details: List of Private Endpoint Connection details. + :paramtype connection_details: list[~azure.mgmt.hybridcompute.models.ConnectionDetail] + """ + super(PrivateLinkScopeValidationDetails, self).__init__(**kwargs) + self.id = None + self.public_network_access = public_network_access + self.connection_details = connection_details + + +class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): + """State of the private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar status: Required. The private link service connection status. + :vartype status: str + :ivar description: Required. The private link service connection description. + :vartype description: str + :ivar actions_required: The actions required for private link service connection. + :vartype actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + 'actions_required': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: str, + description: str, + **kwargs + ): + """ + :keyword status: Required. The private link service connection status. + :paramtype status: str + :keyword description: Required. The private link service connection description. + :paramtype description: str + """ + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = None + + +class RunCommandInputParameter(msrest.serialization.Model): + """Describes the properties of a run command parameter. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The run command parameter name. + :vartype name: str + :ivar value: Required. The run command parameter value. + :vartype value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + value: str, + **kwargs + ): + """ + :keyword name: Required. The run command parameter name. + :paramtype name: str + :keyword value: Required. The run command parameter value. + :paramtype value: str + """ + super(RunCommandInputParameter, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RunCommandManagedIdentity(msrest.serialization.Model): + """Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + + :ivar client_id: Client Id (GUID value) of the user-assigned managed identity. ObjectId should + not be used if this is provided. + :vartype client_id: str + :ivar object_id: Object Id (GUID value) of the user-assigned managed identity. ClientId should + not be used if this is provided. + :vartype object_id: str + """ + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + """ + :keyword client_id: Client Id (GUID value) of the user-assigned managed identity. ObjectId + should not be used if this is provided. + :paramtype client_id: str + :keyword object_id: Object Id (GUID value) of the user-assigned managed identity. ClientId + should not be used if this is provided. + :paramtype object_id: str + """ + super(RunCommandManagedIdentity, self).__init__(**kwargs) + self.client_id = client_id + self.object_id = object_id + + +class ServiceStatus(msrest.serialization.Model): + """Describes the status and behavior of a service. + + :ivar status: The current status of the service. + :vartype status: str + :ivar startup_type: The behavior of the service when the Arc-enabled machine starts up. + :vartype startup_type: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'startup_type': {'key': 'startupType', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + startup_type: Optional[str] = None, + **kwargs + ): + """ + :keyword status: The current status of the service. + :paramtype status: str + :keyword startup_type: The behavior of the service when the Arc-enabled machine starts up. + :paramtype startup_type: str + """ + super(ServiceStatus, self).__init__(**kwargs) + self.status = status + self.startup_type = startup_type + + +class ServiceStatuses(msrest.serialization.Model): + """Reports the state and behavior of dependent services. + + :ivar extension_service: The state of the extension service on the Arc-enabled machine. + :vartype extension_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + :ivar guest_configuration_service: The state of the guest configuration service on the + Arc-enabled machine. + :vartype guest_configuration_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + """ + + _attribute_map = { + 'extension_service': {'key': 'extensionService', 'type': 'ServiceStatus'}, + 'guest_configuration_service': {'key': 'guestConfigurationService', 'type': 'ServiceStatus'}, + } + + def __init__( + self, + *, + extension_service: Optional["ServiceStatus"] = None, + guest_configuration_service: Optional["ServiceStatus"] = None, + **kwargs + ): + """ + :keyword extension_service: The state of the extension service on the Arc-enabled machine. + :paramtype extension_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + :keyword guest_configuration_service: The state of the guest configuration service on the + Arc-enabled machine. + :paramtype guest_configuration_service: ~azure.mgmt.hybridcompute.models.ServiceStatus + """ + super(ServiceStatuses, self).__init__(**kwargs) + self.extension_service = extension_service + self.guest_configuration_service = guest_configuration_service + + +class Subnet(msrest.serialization.Model): + """Describes the subnet. + + :ivar address_prefix: Represents address prefix. + :vartype address_prefix: str + """ + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefix: Optional[str] = None, + **kwargs + ): + """ + :keyword address_prefix: Represents address prefix. + :paramtype address_prefix: str + """ + super(Subnet, self).__init__(**kwargs) + self.address_prefix = address_prefix + + +class SystemData(msrest.serialization.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. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.hybridcompute.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. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.hybridcompute.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or ~azure.mgmt.hybridcompute.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or ~azure.mgmt.hybridcompute.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TagsResource(msrest.serialization.Model): + """A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class WindowsParameters(msrest.serialization.Model): + """Input for InstallPatches on a Windows VM, as directly received by the API. + + :ivar classifications_to_include: The update classifications to select when installing patches + for Windows. + :vartype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationWindows] + :ivar kb_numbers_to_include: Kbs to include in the patch operation. + :vartype kb_numbers_to_include: list[str] + :ivar kb_numbers_to_exclude: Kbs to exclude in the patch operation. + :vartype kb_numbers_to_exclude: list[str] + :ivar exclude_kbs_requiring_reboot: Filters out Kbs that don't have an + InstallationRebootBehavior of 'NeverReboots' when this is set to true. + :vartype exclude_kbs_requiring_reboot: bool + :ivar max_patch_publish_date: This is used to install patches that were published on or before + this given max published date. + :vartype max_patch_publish_date: ~datetime.datetime + """ + + _attribute_map = { + 'classifications_to_include': {'key': 'classificationsToInclude', 'type': '[str]'}, + 'kb_numbers_to_include': {'key': 'kbNumbersToInclude', 'type': '[str]'}, + 'kb_numbers_to_exclude': {'key': 'kbNumbersToExclude', 'type': '[str]'}, + 'exclude_kbs_requiring_reboot': {'key': 'excludeKbsRequiringReboot', 'type': 'bool'}, + 'max_patch_publish_date': {'key': 'maxPatchPublishDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + classifications_to_include: Optional[List[Union[str, "VMGuestPatchClassificationWindows"]]] = None, + kb_numbers_to_include: Optional[List[str]] = None, + kb_numbers_to_exclude: Optional[List[str]] = None, + exclude_kbs_requiring_reboot: Optional[bool] = None, + max_patch_publish_date: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword classifications_to_include: The update classifications to select when installing + patches for Windows. + :paramtype classifications_to_include: list[str or + ~azure.mgmt.hybridcompute.models.VMGuestPatchClassificationWindows] + :keyword kb_numbers_to_include: Kbs to include in the patch operation. + :paramtype kb_numbers_to_include: list[str] + :keyword kb_numbers_to_exclude: Kbs to exclude in the patch operation. + :paramtype kb_numbers_to_exclude: list[str] + :keyword exclude_kbs_requiring_reboot: Filters out Kbs that don't have an + InstallationRebootBehavior of 'NeverReboots' when this is set to true. + :paramtype exclude_kbs_requiring_reboot: bool + :keyword max_patch_publish_date: This is used to install patches that were published on or + before this given max published date. + :paramtype max_patch_publish_date: ~datetime.datetime + """ + super(WindowsParameters, self).__init__(**kwargs) + self.classifications_to_include = classifications_to_include + self.kb_numbers_to_include = kb_numbers_to_include + self.kb_numbers_to_exclude = kb_numbers_to_exclude + self.exclude_kbs_requiring_reboot = exclude_kbs_requiring_reboot + self.max_patch_publish_date = max_patch_publish_date diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/__init__.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/__init__.py new file mode 100644 index 00000000000..8364a3a2a0b --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/__init__.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._machines_operations import MachinesOperations +from ._machine_extensions_operations import MachineExtensionsOperations +from ._hybrid_compute_management_client_operations import HybridComputeManagementClientOperationsMixin +from ._extension_metadata_operations import ExtensionMetadataOperations +from ._operations import Operations +from ._network_profile_operations import NetworkProfileOperations +from ._hybrid_identity_metadata_operations import HybridIdentityMetadataOperations +from ._agent_version_operations import AgentVersionOperations +from ._machine_run_commands_operations import MachineRunCommandsOperations +from ._private_link_scopes_operations import PrivateLinkScopesOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations + +__all__ = [ + 'MachinesOperations', + 'MachineExtensionsOperations', + 'HybridComputeManagementClientOperationsMixin', + 'ExtensionMetadataOperations', + 'Operations', + 'NetworkProfileOperations', + 'HybridIdentityMetadataOperations', + 'AgentVersionOperations', + 'MachineRunCommandsOperations', + 'PrivateLinkScopesOperations', + 'PrivateLinkResourcesOperations', + 'PrivateEndpointConnectionsOperations', +] diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_agent_version_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_agent_version_operations.py new file mode 100644 index 00000000000..e7555a8bee7 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_agent_version_operations.py @@ -0,0 +1,236 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + os_type, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions") + path_format_arguments = { + "osType": _SERIALIZER.url("os_type", os_type, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + os_type, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions/{version}") + path_format_arguments = { + "osType": _SERIALIZER.url("os_type", os_type, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class AgentVersionOperations(object): + """AgentVersionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + os_type, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentVersionsList" + """Gets all Agent Versions along with the download link currently present. + + :param os_type: Defines the os type. + :type os_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentVersionsList, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.AgentVersionsList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentVersionsList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_list_request( + os_type=os_type, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentVersionsList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions"} # type: ignore + + + @distributed_trace + def get( + self, + os_type, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentVersion" + """Gets an Agent Version along with the download link currently present. + + :param os_type: Defines the os type. + :type os_type: str + :param version: Defines the agent version. To get latest, use latest or else a specific agent + version. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentVersion, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.AgentVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + os_type=os_type, + version=version, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions/{version}"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_extension_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_extension_metadata_operations.py new file mode 100644 index 00000000000..39bfc3b5ef0 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_extension_metadata_operations.py @@ -0,0 +1,291 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + subscription_id, # type: str + location, # type: str + publisher, # type: str + extension_type, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "location": _SERIALIZER.url("location", location, 'str'), + "publisher": _SERIALIZER.url("publisher", publisher, 'str'), + "extensionType": _SERIALIZER.url("extension_type", extension_type, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + subscription_id, # type: str + location, # type: str + publisher, # type: str + extension_type, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "location": _SERIALIZER.url("location", location, 'str'), + "publisher": _SERIALIZER.url("publisher", publisher, 'str'), + "extensionType": _SERIALIZER.url("extension_type", extension_type, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class ExtensionMetadataOperations(object): + """ExtensionMetadataOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + location, # type: str + publisher, # type: str + extension_type, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExtensionValue" + """Gets an Extension Metadata based on location, publisher, extensionType and version. + + :param location: The location of the Extension being received. + :type location: str + :param publisher: The publisher of the Extension being received. + :type publisher: str + :param extension_type: The extensionType of the Extension being received. + :type extension_type: str + :param version: The version of the Extension being received. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExtensionValue, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.ExtensionValue + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExtensionValue"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + location=location, + publisher=publisher, + extension_type=extension_type, + version=version, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExtensionValue', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}"} # type: ignore + + + @distributed_trace + def list( + self, + location, # type: str + publisher, # type: str + extension_type, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExtensionValueListResult"] + """Gets all Extension versions based on location, publisher, extensionType. + + :param location: The location of the Extension being received. + :type location: str + :param publisher: The publisher of the Extension being received. + :type publisher: str + :param extension_type: The extensionType of the Extension being received. + :type extension_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExtensionValueListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.ExtensionValueListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExtensionValueListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + publisher=publisher, + extension_type=extension_type, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + publisher=publisher, + extension_type=extension_type, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExtensionValueListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_compute_management_client_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_compute_management_client_operations.py new file mode 100644 index 00000000000..5b97c0cb9ad --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_compute_management_client_operations.py @@ -0,0 +1,199 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_upgrade_extensions_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class HybridComputeManagementClientOperationsMixin(object): + + def _upgrade_extensions_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + machine_name, # type: str + extension_upgrade_parameters, # type: "_models.MachineExtensionUpgrade" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_upgrade_parameters, 'MachineExtensionUpgrade') + + request = build_upgrade_extensions_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._upgrade_extensions_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _upgrade_extensions_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions"} # type: ignore + + + @distributed_trace + def begin_upgrade_extensions( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + machine_name, # type: str + extension_upgrade_parameters, # type: "_models.MachineExtensionUpgrade" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """The operation to Upgrade Machine Extensions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param extension_upgrade_parameters: Parameters supplied to the Upgrade Extensions operation. + :type extension_upgrade_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpgrade + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_extensions_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_upgrade_parameters=extension_upgrade_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_upgrade_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_identity_metadata_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_identity_metadata_operations.py new file mode 100644 index 00000000000..31f93c52f84 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_hybrid_identity_metadata_operations.py @@ -0,0 +1,283 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + metadata_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata/{metadataName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + "metadataName": _SERIALIZER.url("metadata_name", metadata_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_machines_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class HybridIdentityMetadataOperations(object): + """HybridIdentityMetadataOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name, # type: str + machine_name, # type: str + metadata_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridIdentityMetadata" + """Gets HybridIdentityMetadata. + + Implements HybridIdentityMetadata GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param metadata_name: Name of the HybridIdentityMetadata. + :type metadata_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridIdentityMetadata, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridIdentityMetadata + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadata"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + metadata_name=metadata_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridIdentityMetadata', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata/{metadataName}"} # type: ignore + + + @distributed_trace + def list_by_machines( + self, + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.HybridIdentityMetadataList"] + """Implements GET HybridIdentityMetadata in a machine. + + Returns the list of HybridIdentityMetadata of the given machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridIdentityMetadataList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.HybridIdentityMetadataList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridIdentityMetadataList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_machines_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.list_by_machines.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_machines_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("HybridIdentityMetadataList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_machines.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_extensions_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_extensions_operations.py new file mode 100644 index 00000000000..d377d2b2bf6 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_extensions_operations.py @@ -0,0 +1,804 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request_initial( + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_request_initial( + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + "extensionName": _SERIALIZER.url("extension_name", extension_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + resource_group_name, # type: str + machine_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + expand = kwargs.pop('expand', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MachineExtensionsOperations(object): + """MachineExtensionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + extension_parameters, # type: "_models.MachineExtension" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MachineExtension"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineExtension"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_parameters, 'MachineExtension') + + request = build_create_or_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MachineExtension', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + extension_parameters, # type: "_models.MachineExtension" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MachineExtension"] + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine where the extension should be created or updated. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :param extension_parameters: Parameters supplied to the Create Machine Extension operation. + :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtension + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MachineExtension or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.hybridcompute.models.MachineExtension] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + extension_parameters=extension_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineExtension', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + extension_parameters, # type: "_models.MachineExtensionUpdate" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MachineExtension"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineExtension"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(extension_parameters, 'MachineExtensionUpdate') + + request = build_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineExtension', pipeline_response) + + 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + extension_parameters, # type: "_models.MachineExtensionUpdate" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MachineExtension"] + """The operation to create or update the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine where the extension should be created or updated. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :param extension_parameters: Parameters supplied to the Create Machine Extension operation. + :type extension_parameters: ~azure.mgmt.hybridcompute.models.MachineExtensionUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MachineExtension or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.hybridcompute.models.MachineExtension] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + extension_parameters=extension_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineExtension', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """The operation to delete the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine where the extension should be deleted. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + machine_name, # type: str + extension_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MachineExtension" + """The operation to get the extension. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine containing the extension. + :type machine_name: str + :param extension_name: The name of the machine extension. + :type extension_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MachineExtension, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.MachineExtension + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtension"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + extension_name=extension_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MachineExtension', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name, # type: str + machine_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MachineExtensionsListResult"] + """The operation to get all extensions of a non-Azure machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the machine containing the extension. + :type machine_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineExtensionsListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.MachineExtensionsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineExtensionsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("MachineExtensionsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_run_commands_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_run_commands_operations.py new file mode 100644 index 00000000000..a790739f961 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machine_run_commands_operations.py @@ -0,0 +1,811 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request_initial( + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "runCommandName": _SERIALIZER.url("run_command_name", run_command_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_request_initial( + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "runCommandName": _SERIALIZER.url("run_command_name", run_command_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "runCommandName": _SERIALIZER.url("run_command_name", run_command_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "runCommandName": _SERIALIZER.url("run_command_name", run_command_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + resource_group_name, # type: str + machine_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + expand = kwargs.pop('expand', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', pattern=r'[a-zA-Z0-9-_\.]'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MachineRunCommandsOperations(object): + """MachineRunCommandsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + run_command_properties, # type: "_models.MachineRunCommand" + **kwargs # type: Any + ): + # type: (...) -> "_models.MachineRunCommand" + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(run_command_properties, 'MachineRunCommand') + + request = build_create_or_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + if response.status_code == 201: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + run_command_properties, # type: "_models.MachineRunCommand" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MachineRunCommand"] + """The operation to create or update a run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :param run_command_properties: Parameters supplied to the Create Run Command. + :type run_command_properties: ~azure.mgmt.hybridcompute.models.MachineRunCommand + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MachineRunCommand or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + run_command_properties=run_command_properties, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + run_command_properties, # type: "_models.MachineRunCommandUpdate" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MachineRunCommand"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineRunCommand"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(run_command_properties, 'MachineRunCommandUpdate') + + request = build_update_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + run_command_properties, # type: "_models.MachineRunCommandUpdate" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MachineRunCommand"] + """The operation to update the run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :param run_command_properties: Parameters supplied to the Create Run Command. + :type run_command_properties: ~azure.mgmt.hybridcompute.models.MachineRunCommandUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MachineRunCommand or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.hybridcompute.models.MachineRunCommand] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + run_command_properties=run_command_properties, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """The operation to delete a run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + machine_name, # type: str + run_command_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MachineRunCommand" + """The operation to get a run command. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param run_command_name: The name of the run command. + :type run_command_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MachineRunCommand, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.MachineRunCommand + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommand"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + run_command_name=run_command_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MachineRunCommand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name, # type: str + machine_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MachineRunCommandsListResult"] + """The operation to get all the run commands of a non-Azure machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineRunCommandsListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.MachineRunCommandsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineRunCommandsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_group_name=resource_group_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("MachineRunCommandsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machines_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machines_operations.py new file mode 100644 index 00000000000..38ce9521ebe --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_machines_operations.py @@ -0,0 +1,1021 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + expand = kwargs.pop('expand', None) # type: Optional[Union[str, "_models.InstanceViewTypes"]] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_assess_patches_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_install_patches_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_resource_group_request( + subscription_id, # type: str + resource_group_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_subscription_request( + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MachinesOperations(object): + """MachinesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + machine_name, # type: str + parameters, # type: "_models.Machine" + **kwargs # type: Any + ): + # type: (...) -> "_models.Machine" + """The operation to create or update a hybrid machine. Please note some properties can be set only + during machine creation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param parameters: Parameters supplied to the Create hybrid machine operation. + :type parameters: ~azure.mgmt.hybridcompute.models.Machine + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Machine, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.Machine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Machine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'Machine') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Machine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + @distributed_trace + def update( + self, + resource_group_name, # type: str + machine_name, # type: str + parameters, # type: "_models.MachineUpdate" + **kwargs # type: Any + ): + # type: (...) -> "_models.Machine" + """The operation to update a hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param parameters: Parameters supplied to the Update hybrid machine operation. + :type parameters: ~azure.mgmt.hybridcompute.models.MachineUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Machine, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.Machine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Machine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'MachineUpdate') + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Machine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """The operation to delete a hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + machine_name, # type: str + expand=None, # type: Optional[Union[str, "_models.InstanceViewTypes"]] + **kwargs # type: Any + ): + # type: (...) -> "_models.Machine" + """Retrieves information about the model view or the instance view of a hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str or ~azure.mgmt.hybridcompute.models.InstanceViewTypes + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Machine, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.Machine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Machine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Machine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"} # type: ignore + + + def _assess_patches_initial( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MachineAssessPatchesResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineAssessPatchesResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_assess_patches_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + name=name, + api_version=api_version, + template_url=self._assess_patches_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineAssessPatchesResult', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _assess_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches"} # type: ignore + + + @distributed_trace + def begin_assess_patches( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MachineAssessPatchesResult"] + """The operation to assess patches on a hybrid machine identity in Azure. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the hybrid machine. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MachineAssessPatchesResult or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.hybridcompute.models.MachineAssessPatchesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineAssessPatchesResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._assess_patches_initial( + resource_group_name=resource_group_name, + name=name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineAssessPatchesResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_assess_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches"} # type: ignore + + def _install_patches_initial( + self, + resource_group_name, # type: str + name, # type: str + install_patches_input, # type: "_models.MachineInstallPatchesParameters" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MachineInstallPatchesResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MachineInstallPatchesResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(install_patches_input, 'MachineInstallPatchesParameters') + + request = build_install_patches_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + name=name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._install_patches_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('MachineInstallPatchesResult', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _install_patches_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches"} # type: ignore + + + @distributed_trace + def begin_install_patches( + self, + resource_group_name, # type: str + name, # type: str + install_patches_input, # type: "_models.MachineInstallPatchesParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MachineInstallPatchesResult"] + """The operation to install patches on a hybrid machine identity in Azure. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param name: The name of the hybrid machine. + :type name: str + :param install_patches_input: Input for InstallPatches as directly received by the API. + :type install_patches_input: ~azure.mgmt.hybridcompute.models.MachineInstallPatchesParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either MachineInstallPatchesResult or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.hybridcompute.models.MachineInstallPatchesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineInstallPatchesResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._install_patches_initial( + resource_group_name=resource_group_name, + name=name, + install_patches_input=install_patches_input, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('MachineInstallPatchesResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_install_patches.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MachineListResult"] + """Lists all the hybrid machines in the specified resource group. Use the nextLink property in the + response to get the next page of hybrid machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.MachineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("MachineListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines"} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MachineListResult"] + """Lists all the hybrid machines in the specified subscription. Use the nextLink property in the + response to get the next page of hybrid machines. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MachineListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.MachineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.MachineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("MachineListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_network_profile_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_network_profile_operations.py new file mode 100644 index 00000000000..815b5f28f91 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_network_profile_operations.py @@ -0,0 +1,150 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class NetworkProfileOperations(object): + """NetworkProfileOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkProfile" + """The operation to get network information of hybrid machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the hybrid machine. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_operations.py new file mode 100644 index 00000000000..907230a5cd5 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_operations.py @@ -0,0 +1,152 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.HybridCompute/operations") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Gets a list of hybrid compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/providers/Microsoft.HybridCompute/operations"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_endpoint_connections_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_endpoint_connections_operations.py new file mode 100644 index 00000000000..dc0f6a1cee0 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,615 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_private_link_scope_request( + subscription_id, # type: str + resource_group_name, # type: str + scope_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateEndpointConnection') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: + :type parameters: ~azure.mgmt.hybridcompute.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.hybridcompute.models.PrivateEndpointConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + scope_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + scope_name=scope_name, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore + + @distributed_trace + def list_by_private_link_scope( + self, + resource_group_name, # type: str + scope_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """Gets all private endpoint connections on a private link scope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=self.list_by_private_link_scope.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_private_link_scope.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections"} # type: ignore diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_resources_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_resources_operations.py new file mode 100644 index 00000000000..0497ece5a8c --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_resources_operations.py @@ -0,0 +1,279 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_by_private_link_scope_request( + subscription_id, # type: str + resource_group_name, # type: str + scope_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + scope_name, # type: str + group_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_private_link_scope( + self, + resource_group_name, # type: str + scope_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=self.list_by_private_link_scope.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_private_link_scope_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_private_link_scope.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + scope_name, # type: str + group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" + """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param group_name: The name of the private link resource. + :type group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + scope_name=scope_name, + group_name=group_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_scopes_operations.py b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_scopes_operations.py new file mode 100644 index 00000000000..6aa0bbd8c29 --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/operations/_private_link_scopes_operations.py @@ -0,0 +1,943 @@ +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_resource_group_request( + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + resource_group_name, # type: str + subscription_id, # type: str + scope_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + resource_group_name, # type: str + subscription_id, # type: str + scope_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + resource_group_name, # type: str + subscription_id, # type: str + scope_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_tags_request( + resource_group_name, # type: str + subscription_id, # type: str + scope_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "scopeName": _SERIALIZER.url("scope_name", scope_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_validation_details_request( + location, # type: str + subscription_id, # type: str + private_link_scope_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "privateLinkScopeId": _SERIALIZER.url("private_link_scope_id", private_link_scope_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_validation_details_for_machine_request( + subscription_id, # type: str + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "machineName": _SERIALIZER.url("machine_name", machine_name, 'str', min_length=1), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class PrivateLinkScopesOperations(object): + """PrivateLinkScopesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.hybridcompute.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.HybridComputePrivateLinkScopeListResult"] + """Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridComputePrivateLinkScopeListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScopeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("HybridComputePrivateLinkScopeListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.HybridComputePrivateLinkScopeListResult"] + """Gets a list of Azure Arc PrivateLinkScopes within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either HybridComputePrivateLinkScopeListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScopeListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScopeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("HybridComputePrivateLinkScopeListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + scope_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_delete_request_initial( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, 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')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + scope_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a Azure Arc PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + scope_name=scope_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + scope_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridComputePrivateLinkScope" + """Returns a Azure Arc PrivateLinkScope. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridComputePrivateLinkScope, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + scope_name, # type: str + parameters, # type: "_models.HybridComputePrivateLinkScope" + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridComputePrivateLinkScope" + """Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value + for InstrumentationKey nor AppId in the Put operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param parameters: Properties that need to be specified to create or update a Azure Arc for + Servers and Clusters PrivateLinkScope. + :type parameters: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridComputePrivateLinkScope, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'HybridComputePrivateLinkScope') + + request = build_create_or_update_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace + def update_tags( + self, + resource_group_name, # type: str + scope_name, # type: str + private_link_scope_tags, # type: "_models.TagsResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.HybridComputePrivateLinkScope" + """Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate + method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param scope_name: The name of the Azure Arc PrivateLinkScope resource. + :type scope_name: str + :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope + instance. + :type private_link_scope_tags: ~azure.mgmt.hybridcompute.models.TagsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HybridComputePrivateLinkScope, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.HybridComputePrivateLinkScope + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridComputePrivateLinkScope"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(private_link_scope_tags, 'TagsResource') + + request = build_update_tags_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + scope_name=scope_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HybridComputePrivateLinkScope', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}"} # type: ignore + + + @distributed_trace + def get_validation_details( + self, + location, # type: str + private_link_scope_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkScopeValidationDetails" + """Returns a Azure Arc PrivateLinkScope's validation details. + + :param location: The location of the target resource. + :type location: str + :param private_link_scope_id: The id (Guid) of the Azure Arc PrivateLinkScope resource. + :type private_link_scope_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkScopeValidationDetails, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateLinkScopeValidationDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkScopeValidationDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_validation_details_request( + location=location, + subscription_id=self._config.subscription_id, + private_link_scope_id=private_link_scope_id, + api_version=api_version, + template_url=self.get_validation_details.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkScopeValidationDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_validation_details.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}"} # type: ignore + + + @distributed_trace + def get_validation_details_for_machine( + self, + resource_group_name, # type: str + machine_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkScopeValidationDetails" + """Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param machine_name: The name of the target machine to get the private link scope validation + details for. + :type machine_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkScopeValidationDetails, or the result of cls(response) + :rtype: ~azure.mgmt.hybridcompute.models.PrivateLinkScopeValidationDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkScopeValidationDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2023-04-25-preview") # type: str + + + request = build_get_validation_details_for_machine_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + machine_name=machine_name, + api_version=api_version, + template_url=self.get_validation_details_for_machine.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **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 = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkScopeValidationDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_validation_details_for_machine.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current"} # type: ignore + diff --git a/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/py.typed b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/connectedvmware/azext_connectedvmware/vendored_sdks/hybridcompute/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/connectedvmware/azext_connectedvmware/vmware_constants.py b/src/connectedvmware/azext_connectedvmware/vmware_constants.py index be0e80b84f8..2a8aff2331a 100644 --- a/src/connectedvmware/azext_connectedvmware/vmware_constants.py +++ b/src/connectedvmware/azext_connectedvmware/vmware_constants.py @@ -11,17 +11,19 @@ HOST_RESOURCE_TYPE = "hosts" VMTEMPLATE_RESOURCE_TYPE = "virtualmachineTemplates" VIRTUALNETWORK_RESOURCE_TYPE = "virtualNetworks" -VIRTUALMACHINE_RESOURCE_TYPE = "virtualMachines" -MACHINE_RESOURCE_TYPE = "extensions" +EXTENSIONS_RESOURCE_TYPE = "extensions" EXTENDED_LOCATION_NAMESPACE = "Microsoft.ExtendedLocation" CUSTOM_LOCATION_RESOURCE_TYPE = "CustomLocations" EXTENDED_LOCATION_TYPE = "CustomLocation" INVENTORY_ITEM_TYPE = "InventoryItems" -DEFAULT_GUEST_AGENT_NAME = "default" +HCRP_NAMESPACE = "Microsoft.HybridCompute" +MACHINES_RESOURCE_TYPE = "machines" VM_SYSTEM_ASSIGNED_INDENTITY_TYPE = "SystemAssigned" GUEST_AGENT_PROVISIONING_ACTION_INSTALL = "install" +VCENTER_KIND_GET_API_VERSION = "2023-03-01-preview" + NAME_PARAMETER = "name" DEVICE_KEY = "device-key"