add support for disk update command

This commit is contained in:
Yan Zhu 2024-11-06 17:11:06 +08:00
Родитель ca7fc6447a
Коммит 2e408868a8
2 изменённых файлов: 51 добавлений и 56 удалений

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -977,6 +977,18 @@
</arg>
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg nullable="True" type="string" var="$disk.sku.name" options="sku" group="">
<help short="Underlying storage SKU."/>
<enum>
<item name="PremiumV2_LRS" value="&quot;PremiumV2_LRS&quot;"/>
<item name="Premium_LRS" value="&quot;Premium_LRS&quot;"/>
<item name="Premium_ZRS" value="&quot;Premium_ZRS&quot;"/>
<item name="StandardSSD_LRS" value="&quot;StandardSSD_LRS&quot;"/>
<item name="StandardSSD_ZRS" value="&quot;StandardSSD_ZRS&quot;"/>
<item name="Standard_LRS" value="&quot;Standard_LRS&quot;"/>
<item name="UltraSSD_LRS" value="&quot;UltraSSD_LRS&quot;"/>
</enum>
</arg>
</argGroup>
<argGroup name="Disk">
<arg nullable="True" type="object" var="$disk.extendedLocation" options="extended-location" hide="True" group="Disk">
@ -991,24 +1003,9 @@
</enum>
</arg>
</arg>
<arg type="ResourceLocation" var="$disk.location" options="location l" group="Disk">
<arg type="ResourceLocation" var="$disk.location" options="location l" hide="True" group="Disk">
<help short="Resource location"/>
</arg>
<arg nullable="True" type="object" var="$disk.sku" options="sku" group="Disk">
<help short="The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS."/>
<arg nullable="True" type="string" var="$disk.sku.name" options="name">
<help short="The sku name."/>
<enum>
<item name="PremiumV2_LRS" value="&quot;PremiumV2_LRS&quot;"/>
<item name="Premium_LRS" value="&quot;Premium_LRS&quot;"/>
<item name="Premium_ZRS" value="&quot;Premium_ZRS&quot;"/>
<item name="StandardSSD_LRS" value="&quot;StandardSSD_LRS&quot;"/>
<item name="StandardSSD_ZRS" value="&quot;StandardSSD_ZRS&quot;"/>
<item name="Standard_LRS" value="&quot;Standard_LRS&quot;"/>
<item name="UltraSSD_LRS" value="&quot;UltraSSD_LRS&quot;"/>
</enum>
</arg>
</arg>
<arg nullable="True" type="object" var="$disk.tags" options="tags" hide="True" group="Disk">
<help short="Resource tags"/>
<additionalProp>
@ -1020,9 +1017,22 @@
<item nullable="True" type="string"/>
</arg>
</argGroup>
<argGroup name="Encryption">
<arg nullable="True" type="string" var="$disk.properties.encryption.diskEncryptionSetId" options="disk-encryption-set-id" group="Encryption">
<help short="ResourceId of the disk encryption set to use for enabling encryption at rest."/>
</arg>
<arg nullable="True" type="string" var="$disk.properties.encryption.type" options="encryption-type" group="Encryption">
<help short="Encryption type." lines="EncryptionAtRestWithPlatformKey: Disk is encrypted with XStore managed key at rest. It is the default encryption type. EncryptionAtRestWithCustomerKey: Disk is encrypted with Customer managed key at rest."/>
<enum>
<item name="EncryptionAtRestWithCustomerKey" value="&quot;EncryptionAtRestWithCustomerKey&quot;"/>
<item name="EncryptionAtRestWithPlatformAndCustomerKeys" value="&quot;EncryptionAtRestWithPlatformAndCustomerKeys&quot;"/>
<item name="EncryptionAtRestWithPlatformKey" value="&quot;EncryptionAtRestWithPlatformKey&quot;"/>
</enum>
</arg>
</argGroup>
<argGroup name="Properties">
<arg nullable="True" type="boolean" var="$disk.properties.burstingEnabled" options="bursting-enabled enable-bursting" group="Properties">
<help short="Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks."/>
<help short="Enable on-demand bursting beyond the provisioned performance target of the disk. On-demand bursting is disabled by default, and it does not apply to Ultra disks."/>
</arg>
<arg nullable="True" type="float" var="$disk.properties.completionPercent" options="completion-percent" hide="True" group="Properties">
<help short="Percentage complete for the background copy when a resource is created via the CopyStart operation."/>
@ -1089,7 +1099,7 @@
</arg>
</arg>
<arg nullable="True" type="string" var="$disk.properties.dataAccessAuthMode" options="data-access-auth-mode" group="Properties">
<help short="Additional authentication requirements when exporting or uploading to a disk or snapshot."/>
<help short="Specify the auth mode when exporting or uploading to a disk or snapshot."/>
<enum>
<item name="AzureActiveDirectory" value="&quot;AzureActiveDirectory&quot;"/>
<item name="None" value="&quot;None&quot;"/>
@ -1110,22 +1120,8 @@
<arg nullable="True" type="integer64" var="$disk.properties.diskMBpsReadWrite" options="disk-m-bps-read-write" group="Properties">
<help short="The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10."/>
</arg>
<arg nullable="True" type="integer32" var="$disk.properties.diskSizeGB" options="disk-size-gb disk-size" group="Properties">
<help short="If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size."/>
</arg>
<arg nullable="True" type="object" var="$disk.properties.encryption" options="encryption" group="Properties">
<help short="Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys."/>
<arg nullable="True" type="string" var="$disk.properties.encryption.diskEncryptionSetId" options="disk-encryption-set-id">
<help short="ResourceId of the disk encryption set to use for enabling encryption at rest."/>
</arg>
<arg nullable="True" type="string" var="$disk.properties.encryption.type" options="type">
<help short="The type of key used to encrypt the data of the disk."/>
<enum>
<item name="EncryptionAtRestWithCustomerKey" value="&quot;EncryptionAtRestWithCustomerKey&quot;"/>
<item name="EncryptionAtRestWithPlatformAndCustomerKeys" value="&quot;EncryptionAtRestWithPlatformAndCustomerKeys&quot;"/>
<item name="EncryptionAtRestWithPlatformKey" value="&quot;EncryptionAtRestWithPlatformKey&quot;"/>
</enum>
</arg>
<arg nullable="True" type="integer32" var="$disk.properties.diskSizeGB" options="disk-size-gb size-gb z" group="Properties">
<help short="Size in GB. Max size: 4095 GB (certain preview disks can be larger)."/>
</arg>
<arg nullable="True" type="object" var="$disk.properties.encryptionSettingsCollection" options="encryption-settings-collection" hide="True" group="Properties">
<help short="Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot."/>
@ -1191,7 +1187,7 @@
</enum>
</arg>
<arg nullable="True" type="string" var="$disk.properties.publicNetworkAccess" options="public-network-access" group="Properties">
<help short="Policy for controlling export on the disk."/>
<help short="Customers can set on Managed Disks or Snapshots to control the export policy on the disk."/>
<enum>
<item name="Disabled" value="&quot;Disabled&quot;"/>
<item name="Enabled" value="&quot;Enabled&quot;"/>
@ -1212,7 +1208,7 @@
<help short="The publisher ID."/>
</arg>
</arg>
<arg nullable="True" type="object" var="$disk.properties.securityProfile" options="security-profile" group="Properties">
<arg nullable="True" type="object" var="$disk.properties.securityProfile" options="security-profile" hide="True" group="Properties">
<help short="Contains the security related information for the resource."/>
<arg nullable="True" type="string" var="$disk.properties.securityProfile.secureVMDiskEncryptionSetId" options="secure-vm-disk-encryption-set-id">
<help short="ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key"/>
@ -1227,28 +1223,27 @@
</enum>
</arg>
</arg>
<arg nullable="True" type="object" var="$disk.properties.supportedCapabilities" options="supported-capabilities" group="Properties">
<help short="List of supported capabilities for the image from which the OS disk was created."/>
<arg nullable="True" type="boolean" var="$disk.properties.supportedCapabilities.acceleratedNetwork" options="accelerated-network">
<help short="True if the image from which the OS disk is created supports accelerated networking."/>
<arg nullable="True" type="boolean" var="$disk.properties.supportsHibernation" options="supports-hibernation" hide="True" group="Properties">
<help short="Indicates the OS on a disk supports hibernation."/>
</arg>
<arg nullable="True" type="string" var="$disk.properties.supportedCapabilities.architecture" options="architecture">
<arg nullable="True" type="string" var="$disk.properties.tier" options="tier" hide="True" group="Properties">
<help short="Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks."/>
</arg>
</argGroup>
<argGroup name="SupportedCapabilities">
<arg nullable="True" type="boolean" var="$disk.properties.supportedCapabilities.acceleratedNetwork" options="accelerated-network" group="SupportedCapabilities">
<help short="Customers can set on Managed Disks or Snapshots to enable the accelerated networking if the OS disk image support."/>
</arg>
<arg nullable="True" type="string" var="$disk.properties.supportedCapabilities.architecture" options="architecture" group="SupportedCapabilities">
<help short="CPU architecture supported by an OS disk."/>
<enum>
<item name="Arm64" value="&quot;Arm64&quot;"/>
<item name="x64" value="&quot;x64&quot;"/>
</enum>
</arg>
<arg nullable="True" type="string" var="$disk.properties.supportedCapabilities.diskControllerTypes" options="disk-controller-types">
<arg nullable="True" type="string" var="$disk.properties.supportedCapabilities.diskControllerTypes" options="disk-controller-types" hide="True" group="SupportedCapabilities">
<help short="The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME, SCSI."/>
</arg>
</arg>
<arg nullable="True" type="boolean" var="$disk.properties.supportsHibernation" options="supports-hibernation" hide="True" group="Properties">
<help short="Indicates the OS on a disk supports hibernation."/>
</arg>
<arg nullable="True" type="string" var="$disk.properties.tier" options="tier" hide="True" group="Properties">
<help short="Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks."/>
</arg>
</argGroup>
<operation operationId="Disks_Get">
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}">
@ -1540,7 +1535,7 @@
<prop type="integer64" name="diskMBpsReadOnly" arg="$disk.properties.diskMBpsReadOnly"/>
<prop type="integer64" name="diskMBpsReadWrite" arg="$disk.properties.diskMBpsReadWrite"/>
<prop type="integer32" name="diskSizeGB" arg="$disk.properties.diskSizeGB"/>
<prop type="object" name="encryption" arg="$disk.properties.encryption">
<prop type="object" name="encryption">
<prop type="string" name="diskEncryptionSetId" arg="$disk.properties.encryption.diskEncryptionSetId"/>
<prop type="string" name="type" arg="$disk.properties.encryption.type">
<enum>
@ -1612,7 +1607,7 @@
</enum>
</prop>
</prop>
<prop type="object" name="supportedCapabilities" arg="$disk.properties.supportedCapabilities">
<prop type="object" name="supportedCapabilities">
<prop type="boolean" name="acceleratedNetwork" arg="$disk.properties.supportedCapabilities.acceleratedNetwork"/>
<prop type="string" name="architecture" arg="$disk.properties.supportedCapabilities.architecture">
<enum>
@ -1625,7 +1620,7 @@
<prop type="boolean" name="supportsHibernation" arg="$disk.properties.supportsHibernation"/>
<prop type="string" name="tier" arg="$disk.properties.tier"/>
</prop>
<prop type="object" name="sku" arg="$disk.sku">
<prop type="object" name="sku">
<prop type="string" name="name" arg="$disk.sku.name">
<enum>
<item value="&quot;PremiumV2_LRS&quot;"/>