You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Struct VirtualMachineProperties, its field AvailabilitySet and VirtualMachineScaleSet both are of type *SubResource, but they are generated as different types in computevirtualmachine/api.yaml:
- !ruby/object:Api::Type::NestedObject
name: 'availabilitySet'
description: 'Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.'
required: false
azure_sdk_references: ['/availabilitySet', '/properties/availabilitySet']
properties:
- !ruby/object:Api::Azure::Type::ResourceReference
name: 'id'
description: 'Resource Id'
required: false
sample_value: /subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}/providers/Microsoft.Compute/availabilitySets/{{ name }}
resource_type_name: TBD
azure_sdk_references: ['/availabilitySet/id', '/properties/availabilitySet/id']
- !ruby/object:Api::Type::NestedObject
name: 'virtualMachineScaleSet'
description: 'Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01'
required: false
azure_sdk_references: ['/virtualMachineScaleSet', '/properties/virtualMachineScaleSet']
properties:
- !ruby/object:Api::Type::String
name: 'id'
description: 'Resource Id'
required: false
azure_sdk_references: ['/virtualMachineScaleSet/id', '/properties/virtualMachineScaleSet/id']
One of them is String, the other is ResourceReference.
Since these kind of fields usually need to be flattened, String type is more preferred.
The text was updated successfully, but these errors were encountered:
I am generating
api.yaml
file usingautorest.cli
with input file:azure-rest-api-specs\specification\compute\resource-manager\readme.md
Tag in use
package-2019-07
.Cli section added in
readme.md
Problem encountered
Struct
VirtualMachineProperties
, its fieldAvailabilitySet
andVirtualMachineScaleSet
both are of type*SubResource
, but they are generated as different types incomputevirtualmachine/api.yaml
:One of them is
String
, the other isResourceReference
.Since these kind of fields usually need to be flattened, String type is more preferred.
The text was updated successfully, but these errors were encountered: