Skip to content

Commit

Permalink
CodeGen from PR 3555 in test-repo-billy/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge db86af35224db05c8dda1f165cd73dbefa1fb7d3 into 35a65fea3e15956e7742e6b6d821768e8aff2903
  • Loading branch information
SDKAuto committed Oct 31, 2024
1 parent 7fe3db9 commit a80585f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 106 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-10-31)

### 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 @@ -38,6 +38,7 @@ public final class VMAttributes implements JsonSerializable<VMAttributes> {

/*
* Specifies whether the VMSize supporting local storage should be used to build Fleet or not.
* Included - Default if not specified as most Azure VMs support local storage.
*/
private VMAttributeSupport localStorageSupport;

Expand Down Expand Up @@ -214,6 +215,7 @@ public VMAttributes withMemoryInGiBPerVCpu(VMAttributeMinMaxDouble memoryInGiBPe
/**
* Get the localStorageSupport property: Specifies whether the VMSize supporting local storage should be used to
* build Fleet or not.
* Included - Default if not specified as most Azure VMs support local storage.
*
* @return the localStorageSupport value.
*/
Expand All @@ -224,6 +226,7 @@ public VMAttributeSupport localStorageSupport() {
/**
* Set the localStorageSupport property: Specifies whether the VMSize supporting local storage should be used to
* build Fleet or not.
* Included - Default if not specified as most Azure VMs support local storage.
*
* @param localStorageSupport the localStorageSupport value to set.
* @return the VMAttributes object itself.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/azurefleet/AzureFleet.Management
commit: 7e2cb423d45186cd1bff123f35e7d43bc4c0f268
repo: Azure/azure-rest-api-specs
commit: 678f0ac6c05aa3ee76c01f2e99533c7e20e390bd
repo: test-repo-billy/azure-rest-api-specs
additionalDirectories:

0 comments on commit a80585f

Please sign in to comment.