Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from ._list_instance_public_ips import *
from ._list_instances import *
from ._list_skus import *
from ._patch import *
from ._perform_maintenance import *
from ._simulate_eviction import *
from ._update import *
from ._update_domain_walk import *
from ._wait import *
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def _build_schema_on_200(cls):
)
rollback_info.rollback_error = AAZObjectType(
serialized_name="rollbackError",
flags={"read_only": True},
)
_GetOsUpgradeHistoryHelper._build_schema_api_error_read(rollback_info.rollback_error)
rollback_info.successfully_rolledback_instance_count = AAZIntType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _build_schema_on_200(cls):
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.identity = AAZIdentityObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
Expand Down Expand Up @@ -1262,7 +1262,7 @@ def _build_schema_on_200(cls):
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.identity = AAZIdentityObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
properties.location = AAZStrType()
properties.outbound_rule = AAZObjectType(
serialized_name="outboundRule",
flags={"read_only": True},
)
cls._build_schema_sub_resource_read(properties.outbound_rule)
properties.outbound_rules = AAZListType(
Expand Down Expand Up @@ -586,6 +587,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration)
properties.network_interface_ip_configuration = AAZObjectType(
serialized_name="networkInterfaceIPConfiguration",
flags={"read_only": True},
)
cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration)
properties.subnet = AAZObjectType()
Expand Down Expand Up @@ -649,6 +651,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
cls._build_schema_sub_resource_read(properties.backend_address_pool)
properties.backend_ip_configuration = AAZObjectType(
serialized_name="backendIPConfiguration",
flags={"read_only": True},
)
cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration)
properties.backend_port = AAZIntType(
Expand Down Expand Up @@ -801,6 +804,7 @@ def _build_schema_network_interface_read(cls, _schema):
)
properties.dscp_configuration = AAZObjectType(
serialized_name="dscpConfiguration",
flags={"read_only": True},
)
cls._build_schema_sub_resource_read(properties.dscp_configuration)
properties.enable_accelerated_networking = AAZBoolType(
Expand Down Expand Up @@ -1023,6 +1027,7 @@ def _build_schema_network_interface_read(cls, _schema):
)
properties.private_endpoint = AAZObjectType(
serialized_name="privateEndpoint",
flags={"read_only": True},
)
cls._build_schema_private_endpoint_read(properties.private_endpoint)
properties.private_link_service_connection_state = AAZObjectType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class ListInstances(AAZCommand):
"""

_aaz_info = {
"version": "2023-09-01",
"version": "2024-11-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines", "2023-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines", "2024-11-01"],
]
}

Expand Down Expand Up @@ -141,7 +141,7 @@ def query_parameters(self):
"$select", self.ctx.args.select,
),
**self.serialize_query_param(
"api-version", "2023-09-01",
"api-version", "2024-11-01",
required=True,
),
}
Expand Down Expand Up @@ -191,7 +191,7 @@ def _build_schema_on_200(cls):
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.identity = AAZIdentityObjectType()
_element.instance_id = AAZStrType(
serialized_name="instanceId",
flags={"read_only": True},
Expand All @@ -209,7 +209,9 @@ def _build_schema_on_200(cls):
_element.resources = AAZListType(
flags={"read_only": True},
)
_element.sku = AAZObjectType()
_element.sku = AAZObjectType(
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down Expand Up @@ -269,6 +271,7 @@ def _build_schema_on_200(cls):
)
properties.instance_view = AAZObjectType(
serialized_name="instanceView",
flags={"read_only": True},
)
properties.latest_model_applied = AAZBoolType(
serialized_name="latestModelApplied",
Expand Down Expand Up @@ -297,6 +300,9 @@ def _build_schema_on_200(cls):
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resilient_vm_deletion_status = AAZStrType(
serialized_name="resilientVMDeletionStatus",
)
properties.security_profile = AAZObjectType(
serialized_name="securityProfile",
)
Expand Down Expand Up @@ -393,6 +399,7 @@ def _build_schema_on_200(cls):
)
instance_view.vm_health = AAZObjectType(
serialized_name="vmHealth",
flags={"read_only": True},
)

boot_diagnostics = cls._schema_on_200.value.Element.properties.instance_view.boot_diagnostics
Expand All @@ -404,7 +411,9 @@ def _build_schema_on_200(cls):
serialized_name="serialConsoleLogBlobUri",
flags={"read_only": True},
)
boot_diagnostics.status = AAZObjectType()
boot_diagnostics.status = AAZObjectType(
flags={"read_only": True},
)
_ListInstancesHelper._build_schema_instance_view_status_read(boot_diagnostics.status)

disks = cls._schema_on_200.value.Element.properties.instance_view.disks
Expand Down Expand Up @@ -481,7 +490,9 @@ def _build_schema_on_200(cls):
_ListInstancesHelper._build_schema_instance_view_status_read(statuses.Element)

vm_health = cls._schema_on_200.value.Element.properties.instance_view.vm_health
vm_health.status = AAZObjectType()
vm_health.status = AAZObjectType(
flags={"read_only": True},
)
_ListInstancesHelper._build_schema_instance_view_status_read(vm_health.status)

network_profile = cls._schema_on_200.value.Element.properties.network_profile
Expand Down Expand Up @@ -754,6 +765,7 @@ def _build_schema_on_200(cls):
serialized_name="publicIPAddressConfiguration",
)
properties.subnet = AAZObjectType()
_ListInstancesHelper._build_schema_api_entity_reference_read(properties.subnet)

application_gateway_backend_address_pools = cls._schema_on_200.value.Element.properties.network_profile_configuration.network_interface_configurations.Element.properties.ip_configurations.Element.properties.application_gateway_backend_address_pools
application_gateway_backend_address_pools.Element = AAZObjectType()
Expand Down Expand Up @@ -820,9 +832,6 @@ def _build_schema_on_200(cls):
)
_element.tag = AAZStrType()

subnet = cls._schema_on_200.value.Element.properties.network_profile_configuration.network_interface_configurations.Element.properties.ip_configurations.Element.properties.subnet
subnet.id = AAZStrType()

os_profile = cls._schema_on_200.value.Element.properties.os_profile
os_profile.admin_password = AAZStrType(
serialized_name="adminPassword",
Expand Down Expand Up @@ -931,6 +940,7 @@ def _build_schema_on_200(cls):
)
windows_configuration.enable_vm_agent_platform_updates = AAZBoolType(
serialized_name="enableVMAgentPlatformUpdates",
flags={"read_only": True},
)
windows_configuration.patch_settings = AAZObjectType(
serialized_name="patchSettings",
Expand Down Expand Up @@ -1026,10 +1036,16 @@ def _build_schema_on_200(cls):

proxy_agent_settings = cls._schema_on_200.value.Element.properties.security_profile.proxy_agent_settings
proxy_agent_settings.enabled = AAZBoolType()
proxy_agent_settings.imds = AAZObjectType()
_ListInstancesHelper._build_schema_host_endpoint_settings_read(proxy_agent_settings.imds)
proxy_agent_settings.key_incarnation_id = AAZIntType(
serialized_name="keyIncarnationId",
)
proxy_agent_settings.mode = AAZStrType()
proxy_agent_settings.wire_server = AAZObjectType(
serialized_name="wireServer",
)
_ListInstancesHelper._build_schema_host_endpoint_settings_read(proxy_agent_settings.wire_server)

uefi_settings = cls._schema_on_200.value.Element.properties.security_profile.uefi_settings
uefi_settings.secure_boot_enabled = AAZBoolType(
Expand All @@ -1040,6 +1056,9 @@ def _build_schema_on_200(cls):
)

storage_profile = cls._schema_on_200.value.Element.properties.storage_profile
storage_profile.align_regional_disks_to_vm_zone = AAZBoolType(
serialized_name="alignRegionalDisksToVMZone",
)
storage_profile.data_disks = AAZListType(
serialized_name="dataDisks",
)
Expand Down Expand Up @@ -1089,6 +1108,10 @@ def _build_schema_on_200(cls):
)
_ListInstancesHelper._build_schema_managed_disk_parameters_read(_element.managed_disk)
_element.name = AAZStrType()
_element.source_resource = AAZObjectType(
serialized_name="sourceResource",
)
_ListInstancesHelper._build_schema_api_entity_reference_read(_element.source_resource)
_element.to_be_detached = AAZBoolType(
serialized_name="toBeDetached",
)
Expand Down Expand Up @@ -1187,7 +1210,7 @@ def _build_schema_on_200(cls):
serialized_name="instanceView",
)
_ListInstancesHelper._build_schema_virtual_machine_extension_instance_view_read(properties.instance_view)
properties.protected_settings = AAZObjectType(
properties.protected_settings = AAZFreeFormDictType(
serialized_name="protectedSettings",
)
properties.protected_settings_from_key_vault = AAZObjectType(
Expand All @@ -1202,7 +1225,7 @@ def _build_schema_on_200(cls):
flags={"read_only": True},
)
properties.publisher = AAZStrType()
properties.settings = AAZObjectType()
properties.settings = AAZFreeFormDictType()
properties.suppress_failures = AAZBoolType(
serialized_name="suppressFailures",
)
Expand Down Expand Up @@ -1234,6 +1257,21 @@ def _build_schema_on_200(cls):
class _ListInstancesHelper:
"""Helper class for ListInstances"""

_schema_api_entity_reference_read = None

@classmethod
def _build_schema_api_entity_reference_read(cls, _schema):
if cls._schema_api_entity_reference_read is not None:
_schema.id = cls._schema_api_entity_reference_read.id
return

cls._schema_api_entity_reference_read = _schema_api_entity_reference_read = AAZObjectType()

api_entity_reference_read = _schema_api_entity_reference_read
api_entity_reference_read.id = AAZStrType()

_schema.id = cls._schema_api_entity_reference_read.id

_schema_disk_encryption_set_parameters_read = None

@classmethod
Expand Down Expand Up @@ -1286,6 +1324,26 @@ def _build_schema_disk_encryption_settings_read(cls, _schema):
_schema.enabled = cls._schema_disk_encryption_settings_read.enabled
_schema.key_encryption_key = cls._schema_disk_encryption_settings_read.key_encryption_key

_schema_host_endpoint_settings_read = None

@classmethod
def _build_schema_host_endpoint_settings_read(cls, _schema):
if cls._schema_host_endpoint_settings_read is not None:
_schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id
_schema.mode = cls._schema_host_endpoint_settings_read.mode
return

cls._schema_host_endpoint_settings_read = _schema_host_endpoint_settings_read = AAZObjectType()

host_endpoint_settings_read = _schema_host_endpoint_settings_read
host_endpoint_settings_read.in_vm_access_control_profile_reference_id = AAZStrType(
serialized_name="inVMAccessControlProfileReferenceId",
)
host_endpoint_settings_read.mode = AAZStrType()

_schema.in_vm_access_control_profile_reference_id = cls._schema_host_endpoint_settings_read.in_vm_access_control_profile_reference_id
_schema.mode = cls._schema_host_endpoint_settings_read.mode

_schema_instance_view_status_read = None

@classmethod
Expand Down
Loading
Loading