Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute: update to package-2019-12 and support simulate eviction #1199

Merged
merged 13 commits into from
Jun 11, 2020
2 changes: 1 addition & 1 deletion api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"dir": "azure-mgmt-compute",
"source": "specification/compute/resource-manager/readme.md",
"package": "com.microsoft.azure.management.compute",
"args": "--payload-flattening-threshold=1 --tag=package-2019-07-01"
"args": "--payload-flattening-threshold=1 --tag=package-2019-12-01"
},
"consumption": {
"dir": "azure-mgmt-consumption",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,13 @@ public class AutomaticRepairsPolicy {
* The amount of time for which automatic repairs are suspended due to a
* state change on VM. The grace time starts after the state change has
* completed. This helps avoid premature or accidental repairs. The time
* duration should be specified in ISO 8601 format. The default value is 5
* minutes (PT5M).
* duration should be specified in ISO 8601 format. The minimum allowed
* grace period is 30 minutes (PT30M), which is also the default value. The
* maximum allowed grace period is 90 minutes (PT90M).
*/
@JsonProperty(value = "gracePeriod")
private String gracePeriod;

/**
* The percentage (capacity of scaleset) of virtual machines that will be
* simultaneously repaired. The default value is 20%.
*/
@JsonProperty(value = "maxInstanceRepairsPercent")
private Integer maxInstanceRepairsPercent;

/**
* Get specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
*
Expand All @@ -60,7 +54,7 @@ public AutomaticRepairsPolicy withEnabled(Boolean enabled) {
}

/**
* Get the amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The default value is 5 minutes (PT5M).
* Get the amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
*
* @return the gracePeriod value
*/
Expand All @@ -69,7 +63,7 @@ public String gracePeriod() {
}

/**
* Set the amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The default value is 5 minutes (PT5M).
* Set the amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
*
* @param gracePeriod the gracePeriod value to set
* @return the AutomaticRepairsPolicy object itself.
Expand All @@ -79,24 +73,4 @@ public AutomaticRepairsPolicy withGracePeriod(String gracePeriod) {
return this;
}

/**
* Get the percentage (capacity of scaleset) of virtual machines that will be simultaneously repaired. The default value is 20%.
*
* @return the maxInstanceRepairsPercent value
*/
public Integer maxInstanceRepairsPercent() {
return this.maxInstanceRepairsPercent;
}

/**
* Set the percentage (capacity of scaleset) of virtual machines that will be simultaneously repaired. The default value is 20%.
*
* @param maxInstanceRepairsPercent the maxInstanceRepairsPercent value to set
* @return the AutomaticRepairsPolicy object itself.
*/
public AutomaticRepairsPolicy withMaxInstanceRepairsPercent(Integer maxInstanceRepairsPercent) {
this.maxInstanceRepairsPercent = maxInstanceRepairsPercent;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ public class CreationData {
private DiskCreateOption createOption;

/**
* Required if createOption is Import. The Azure Resource Manager identifier
* of the storage account containing the blob to import as a disk.
* Required if createOption is Import. The Azure Resource Manager
* identifier of the storage account containing the blob to import as a
* disk.
*/
@JsonProperty(value = "storageAccountId")
private String storageAccountId;
Expand All @@ -35,6 +36,14 @@ public class CreationData {
@JsonProperty(value = "imageReference")
private ImageDiskReference imageReference;

/**
* Required if creating from a Gallery Image. The id of the
* ImageDiskReference will be the ARM id of the shared galley image version
* from which to create a disk.
*/
@JsonProperty(value = "galleryImageReference")
private ImageDiskReference galleryImageReference;

/**
* If createOption is Import, this is the URI of a blob to be imported into
* a managed disk.
Expand Down Expand Up @@ -86,7 +95,7 @@ public CreationData withCreateOption(DiskCreateOption createOption) {
}

/**
* Get if createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription.
* Get required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
*
* @return the storageAccountId value
*/
Expand All @@ -95,7 +104,7 @@ public String storageAccountId() {
}

/**
* Set if createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription.
* Set required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
*
* @param storageAccountId the storageAccountId value to set
* @return the CreationData object itself.
Expand Down Expand Up @@ -125,6 +134,26 @@ public CreationData withImageReference(ImageDiskReference imageReference) {
return this;
}

/**
* Get required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
*
* @return the galleryImageReference value
*/
public ImageDiskReference galleryImageReference() {
return this.galleryImageReference;
}

/**
* Set required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
*
* @param galleryImageReference the galleryImageReference value to set
* @return the CreationData object itself.
*/
public CreationData withGalleryImageReference(ImageDiskReference galleryImageReference) {
this.galleryImageReference = galleryImageReference;
return this;
}

/**
* Get if createOption is Import, this is the URI of a blob to be imported into a managed disk.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,24 @@ public class DataDisk {
@JsonProperty(value = "toBeDetached")
private Boolean toBeDetached;

/**
* Specifies the Read-Write IOPS for the managed disk when
* StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine
* ScaleSet VM disks. Can be updated only via updates to the VirtualMachine
* Scale Set.
*/
@JsonProperty(value = "diskIOPSReadWrite", access = JsonProperty.Access.WRITE_ONLY)
private Long diskIOPSReadWrite;

/**
* Specifies the bandwidth in MB per second for the managed disk when
* StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine
* ScaleSet VM disks. Can be updated only via updates to the VirtualMachine
* Scale Set.
*/
@JsonProperty(value = "diskMBpsReadWrite", access = JsonProperty.Access.WRITE_ONLY)
private Long diskMBpsReadWrite;

/**
* Get specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
*
Expand Down Expand Up @@ -294,4 +312,22 @@ public DataDisk withToBeDetached(Boolean toBeDetached) {
return this;
}

/**
* Get specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
*
* @return the diskIOPSReadWrite value
*/
public Long diskIOPSReadWrite() {
return this.diskIOPSReadWrite;
}

/**
* Get specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
*
* @return the diskMBpsReadWrite value
*/
public Long diskMBpsReadWrite() {
return this.diskMBpsReadWrite;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* 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.
*/

package com.microsoft.azure.management.compute;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Contains encryption settings for a data disk image.
*/
public class DataDiskImageEncryption extends DiskImageEncryption {
/**
* This property specifies the logical unit number of the data disk. This
* value is used to identify data disks within the Virtual Machine and
* therefore must be unique for each data disk attached to the Virtual
* Machine.
*/
@JsonProperty(value = "lun", required = true)
private int lun;

/**
* Get this property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
*
* @return the lun value
*/
public int lun() {
return this.lun;
}

/**
* Set this property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
*
* @param lun the lun value to set
* @return the DataDiskImageEncryption object itself.
*/
public DataDiskImageEncryption withLun(int lun) {
this.lun = lun;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* 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.
*/

package com.microsoft.azure.management.compute;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for DiffDiskPlacement.
*/
public final class DiffDiskPlacement extends ExpandableStringEnum<DiffDiskPlacement> {
/** Static value CacheDisk for DiffDiskPlacement. */
public static final DiffDiskPlacement CACHE_DISK = fromString("CacheDisk");

/** Static value ResourceDisk for DiffDiskPlacement. */
public static final DiffDiskPlacement RESOURCE_DISK = fromString("ResourceDisk");

/**
* Creates or finds a DiffDiskPlacement from its string representation.
* @param name a name to look for
* @return the corresponding DiffDiskPlacement
*/
@JsonCreator
public static DiffDiskPlacement fromString(String name) {
return fromString(name, DiffDiskPlacement.class);
}

/**
* @return known DiffDiskPlacement values
*/
public static Collection<DiffDiskPlacement> values() {
return values(DiffDiskPlacement.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ public class DiffDiskSettings {
@JsonProperty(value = "option")
private DiffDiskOptions option;

/**
* Specifies the ephemeral disk placement for operating system
* disk.&lt;br&gt;&lt;br&gt; Possible values are: &lt;br&gt;&lt;br&gt;
* **CacheDisk** &lt;br&gt;&lt;br&gt; **ResourceDisk** &lt;br&gt;&lt;br&gt;
* Default: **CacheDisk** if one is configured for the VM size otherwise
* **ResourceDisk** is used.&lt;br&gt;&lt;br&gt; Refer to VM size
* documentation for Windows VM at
* https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes
* and Linux VM at
* https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to
* check which VM sizes exposes a cache disk. Possible values include:
* 'CacheDisk', 'ResourceDisk'.
*/
@JsonProperty(value = "placement")
private DiffDiskPlacement placement;

/**
* Get specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'.
*
Expand All @@ -43,4 +59,24 @@ public DiffDiskSettings withOption(DiffDiskOptions option) {
return this;
}

/**
* Get specifies the ephemeral disk placement for operating system disk.&lt;br&gt;&lt;br&gt; Possible values are: &lt;br&gt;&lt;br&gt; **CacheDisk** &lt;br&gt;&lt;br&gt; **ResourceDisk** &lt;br&gt;&lt;br&gt; Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.&lt;br&gt;&lt;br&gt; Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk'.
*
* @return the placement value
*/
public DiffDiskPlacement placement() {
return this.placement;
}

/**
* Set specifies the ephemeral disk placement for operating system disk.&lt;br&gt;&lt;br&gt; Possible values are: &lt;br&gt;&lt;br&gt; **CacheDisk** &lt;br&gt;&lt;br&gt; **ResourceDisk** &lt;br&gt;&lt;br&gt; Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.&lt;br&gt;&lt;br&gt; Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk'.
*
* @param placement the placement value to set
* @return the DiffDiskSettings object itself.
*/
public DiffDiskSettings withPlacement(DiffDiskPlacement placement) {
this.placement = placement;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* 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.
*/

package com.microsoft.azure.management.compute;

import com.microsoft.azure.SubResource;

/**
* Describes the parameter of customer managed disk encryption set resource id
* that can be specified for disk. &lt;br&gt;&lt;br&gt; NOTE: The disk
* encryption set resource id can only be specified for managed disk. Please
* refer https://aka.ms/mdssewithcmkoverview for more details.
*/
public class DiskEncryptionSetParameters extends SubResource {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* 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.
*/

package com.microsoft.azure.management.compute;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* This is the disk image encryption base class.
*/
public class DiskImageEncryption {
/**
* A relative URI containing the resource ID of the disk encryption set.
*/
@JsonProperty(value = "diskEncryptionSetId")
private String diskEncryptionSetId;

/**
* Get a relative URI containing the resource ID of the disk encryption set.
*
* @return the diskEncryptionSetId value
*/
public String diskEncryptionSetId() {
return this.diskEncryptionSetId;
}

/**
* Set a relative URI containing the resource ID of the disk encryption set.
*
* @param diskEncryptionSetId the diskEncryptionSetId value to set
* @return the DiskImageEncryption object itself.
*/
public DiskImageEncryption withDiskEncryptionSetId(String diskEncryptionSetId) {
this.diskEncryptionSetId = diskEncryptionSetId;
return this;
}

}
Loading