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

[AutoPR azure-resourcemanager-computefleet] [test tsp breakingchange] 12 one tsp and one tsp suppression #12978

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2024-10-21)

- 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).

### Features Added

Expand Down
128 changes: 127 additions & 1 deletion 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-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -70,6 +70,132 @@ See [API design][design] for general introduction on design and key concepts on

## Examples

```java
Network network = networkManager.networks()
.define(vnetName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withAddressSpace("172.16.0.0/16")
.defineSubnet("default")
.withAddressPrefix("172.16.0.0/24")
.attach()
.create();

LoadBalancer loadBalancer = networkManager.loadBalancers()
.define(loadBalancerName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.defineLoadBalancingRule(loadBalancerName + "-lbrule")
.withProtocol(TransportProtocol.TCP)
.fromExistingSubnet(network, "default")
.fromFrontendPort(80)
.toBackend(loadBalancerName + "-backend")
.toBackendPort(80)
.attach()
.withSku(LoadBalancerSkuType.STANDARD)
.create();

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)
)
)
.create();
```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md)


Expand Down
Loading