Skip to content

Commit

Permalink
CodeGen from PR 31901 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 7872738dcd94d14e069a499b4336d9293386d3e2 into 17dbd6e760c42aeacf1db39381fc26e30dda72ca
  • Loading branch information
SDKAuto committed Dec 17, 2024
1 parent d5391c9 commit bbed897
Show file tree
Hide file tree
Showing 17 changed files with 135 additions and 181 deletions.
10 changes: 2 additions & 8 deletions sdk/computefleet/azure-resourcemanager-computefleet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2024-12-17)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Azure Resource Manager Compute Fleet client library for Java. This package contains Microsoft Azure SDK for Compute Fleet Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0 (2024-10-22)

Expand Down
151 changes: 55 additions & 96 deletions sdk/computefleet/azure-resourcemanager-computefleet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-computefleet</artifactId>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -99,101 +99,60 @@ fleet = computeFleetManager.fleets()
.define(fleetName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withProperties(
new FleetProperties()
.withSpotPriorityProfile(
new SpotPriorityProfile()
.withMaintain(false)
.withCapacity(1)
.withEvictionPolicy(EvictionPolicy.DELETE)
.withAllocationStrategy(SpotAllocationStrategy.LOWEST_PRICE)
)
.withVmSizesProfile(
Arrays.asList(
new VmSizeProfile().withName("Standard_D4s_v3")
)
)
.withComputeProfile(
new ComputeProfile()
.withBaseVirtualMachineProfile(
new BaseVirtualMachineProfile()
.withStorageProfile(
new VirtualMachineScaleSetStorageProfile()
.withImageReference(
new ImageReference()
.withPublisher("canonical")
.withOffer("ubuntu-24_04-lts")
.withSku("server")
.withVersion("latest")
)
.withOsDisk(
new VirtualMachineScaleSetOSDisk()
.withManagedDisk(
new VirtualMachineScaleSetManagedDiskParameters()
.withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)
)
.withOsType(OperatingSystemTypes.LINUX)
.withDiskSizeGB(30)
.withCreateOption(DiskCreateOptionTypes.FROM_IMAGE)
.withDeleteOption(DiskDeleteOptionTypes.DELETE)
.withCaching(CachingTypes.READ_WRITE)
)
.withDiskControllerType(DiskControllerTypes.SCSI)
)
.withOsProfile(
new VirtualMachineScaleSetOSProfile()
.withComputerNamePrefix(randomPadding())
.withAdminUsername(adminUser)
.withAdminPassword(adminPwd)
.withLinuxConfiguration(
new LinuxConfiguration().withDisablePasswordAuthentication(false)
)
)
.withNetworkProfile(
new VirtualMachineScaleSetNetworkProfile()
.withNetworkInterfaceConfigurations(
Arrays.asList(
new VirtualMachineScaleSetNetworkConfiguration()
.withName(vmName)
.withProperties(
new VirtualMachineScaleSetNetworkConfigurationProperties()
.withPrimary(true)
.withEnableAcceleratedNetworking(false)
.withDeleteOption(DeleteOptions.DELETE)
.withIpConfigurations(
Arrays.asList(
new VirtualMachineScaleSetIPConfiguration()
.withName(vmName)
.withProperties(
new VirtualMachineScaleSetIPConfigurationProperties()
.withPrimary(true)
.withSubnet(
new ApiEntityReference()
.withId(network.subnets().get("default").id())
)
.withLoadBalancerBackendAddressPools(
loadBalancer.loadBalancingRules()
.get(loadBalancerName + "-lbrule")
.innerModel().backendAddressPools()
)
)
)
)
)
)
)
.withNetworkApiVersion(NetworkApiVersion.fromString("2024-03-01"))
)
)
.withComputeApiVersion("2024-03-01")
.withPlatformFaultDomainCount(1)
)
.withRegularPriorityProfile(new RegularPriorityProfile()
.withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)
.withMinCapacity(1)
.withCapacity(2)
)
)
.withProperties(new FleetProperties()
.withSpotPriorityProfile(new SpotPriorityProfile().withMaintain(false)
.withCapacity(1)
.withEvictionPolicy(EvictionPolicy.DELETE)
.withAllocationStrategy(SpotAllocationStrategy.LOWEST_PRICE))
.withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_D4s_v3")))
.withComputeProfile(new ComputeProfile()
.withBaseVirtualMachineProfile(new BaseVirtualMachineProfile()
.withStorageProfile(new VirtualMachineScaleSetStorageProfile()
.withImageReference(new ImageReference().withPublisher("canonical")
.withOffer("ubuntu-24_04-lts")
.withSku("server")
.withVersion("latest"))
.withOsDisk(new VirtualMachineScaleSetOSDisk()
.withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters()
.withStorageAccountType(StorageAccountTypes.PREMIUM_LRS))
.withOsType(OperatingSystemTypes.LINUX)
.withDiskSizeGB(30)
.withCreateOption(DiskCreateOptionTypes.FROM_IMAGE)
.withDeleteOption(DiskDeleteOptionTypes.DELETE)
.withCaching(CachingTypes.READ_WRITE))
.withDiskControllerType(DiskControllerTypes.SCSI))
.withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix(randomPadding())
.withAdminUsername(adminUser)
.withAdminPassword(adminPwd)
.withLinuxConfiguration(
new LinuxConfiguration().withDisablePasswordAuthentication(false)))
.withNetworkProfile(
new VirtualMachineScaleSetNetworkProfile()
.withNetworkInterfaceConfigurations(
Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName(vmName)
.withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties()
.withPrimary(true)
.withEnableAcceleratedNetworking(false)
.withDeleteOption(DeleteOptions.DELETE)
.withIpConfigurations(Arrays
.asList(new VirtualMachineScaleSetIPConfiguration().withName(vmName)
.withProperties(
new VirtualMachineScaleSetIPConfigurationProperties()
.withPrimary(true)
.withSubnet(new ApiEntityReference()
.withId(network.subnets().get("default").id()))
.withLoadBalancerBackendAddressPools(
loadBalancer.loadBalancingRules()
.get(loadBalancerName + "-lbrule")
.innerModel()
.backendAddressPools())))))))
.withNetworkApiVersion(NetworkApiVersion.fromString("2024-03-01"))))
.withComputeApiVersion("2024-03-01")
.withPlatformFaultDomainCount(1))
.withRegularPriorityProfile(new RegularPriorityProfile()
.withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)
.withMinCapacity(1)
.withCapacity(2)))
.create();
```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public final class BaseVirtualMachineProfile implements JsonSerializable<BaseVir
* Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS
* (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for
* Windows
* Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
* Server](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
* <br><br> [Azure Hybrid Use Benefit for Linux
* Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
* Server](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
* <br><br> Minimum api-version: 2015-06-15
*/
private String licenseType;
Expand Down Expand Up @@ -259,9 +259,9 @@ public BaseVirtualMachineProfile withExtensionProfile(VirtualMachineScaleSetExte
* Server operating system are: &lt;br&gt;&lt;br&gt; RHEL_BYOS (for RHEL) &lt;br&gt;&lt;br&gt; SLES_BYOS
* (for SUSE) &lt;br&gt;&lt;br&gt; For more information, see [Azure Hybrid Use Benefit for
* Windows
* Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
* Server](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
* &lt;br&gt;&lt;br&gt; [Azure Hybrid Use Benefit for Linux
* Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
* Server](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
* &lt;br&gt;&lt;br&gt; Minimum api-version: 2015-06-15.
*
* @return the licenseType value.
Expand All @@ -277,9 +277,9 @@ public String licenseType() {
* Server operating system are: &lt;br&gt;&lt;br&gt; RHEL_BYOS (for RHEL) &lt;br&gt;&lt;br&gt; SLES_BYOS
* (for SUSE) &lt;br&gt;&lt;br&gt; For more information, see [Azure Hybrid Use Benefit for
* Windows
* Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
* Server](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
* &lt;br&gt;&lt;br&gt; [Azure Hybrid Use Benefit for Linux
* Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
* Server](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
* &lt;br&gt;&lt;br&gt; Minimum api-version: 2015-06-15.
*
* @param licenseType the licenseType value to set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* resource disk space for Ephemeral OS disk provisioning. For more information on
* Ephemeral OS disk size requirements, please refer Ephemeral OS disk size
* requirements for Windows VM at
* https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements
* https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements
* and Linux VM at
* https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements
* https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements
* Minimum api-version for NvmeDisk: 2024-03-01.
*/
public final class DiffDiskPlacement extends ExpandableStringEnum<DiffDiskPlacement> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public final class DiffDiskSettings implements JsonSerializable<DiffDiskSettings
* values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is:
* **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk**
* is used. Refer to the VM size documentation for Windows VM at
* https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
* https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
* https://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
* https://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
* sizes exposes a cache disk.
*/
private DiffDiskPlacement placement;
Expand Down Expand Up @@ -65,8 +65,8 @@ public DiffDiskSettings withOption(DiffDiskOptions option) {
* values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is:
* **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk**
* is used. Refer to the VM size documentation for Windows VM at
* https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
* https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
* https://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
* https://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
* sizes exposes a cache disk.
*
* @return the placement value.
Expand All @@ -80,8 +80,8 @@ public DiffDiskPlacement placement() {
* values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is:
* **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk**
* is used. Refer to the VM size documentation for Windows VM at
* https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
* https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
* https://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
* https://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
* sizes exposes a cache disk.
*
* @param placement the placement value to set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* Specifies the disk controller type configured for the VM and
* VirtualMachineScaleSet. This property is only supported for virtual machines
* whose operating system disk and VM sku supports Generation 2
* (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please
* (https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2), please
* check the HyperVGenerations capability returned as part of VM sku capabilities
* in the response of Microsoft.Compute SKUs api for the region contains V2
* (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more
* (https://learn.microsoft.com/rest/api/compute/resourceskus/list). For more
* information about Disk Controller Types supported please refer to
* https://aka.ms/azure-diskcontrollertypes.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* Specifies the Linux operating system settings on the virtual machine. For a
* list of supported Linux distributions, see [Linux on Azure-Endorsed
* Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
* Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
*/
@Fluent
public final class LinuxConfiguration implements JsonSerializable<LinuxConfiguration> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class SshPublicKey implements JsonSerializable<SshPublicKey> {
* SSH public key certificate used to authenticate with the VM through ssh. The
* key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys,
* see [Create SSH keys on Linux and Mac for Linux VMs in
* Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
* Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
*/
private String keyData;

Expand Down Expand Up @@ -66,7 +66,7 @@ public SshPublicKey withPath(String path) {
* Get the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The
* key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys,
* see [Create SSH keys on Linux and Mac for Linux VMs in
* Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
* Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
*
* @return the keyData value.
*/
Expand All @@ -78,7 +78,7 @@ public String keyData() {
* Set the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The
* key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys,
* see [Create SSH keys on Linux and Mac for Linux VMs in
* Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
* Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
*
* @param keyData the keyData value to set.
* @return the SshPublicKey object itself.
Expand Down
Loading

0 comments on commit bbed897

Please sign in to comment.