Skip to content

[AutoPR azure-resourcemanager-computefleet] Spec changes for tool testing #11532

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

Closed
Closed
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-08-08)

- 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
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
66 changes: 66 additions & 0 deletions sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,72 @@ public final class FleetsCreateOrUpdateSamples {
.create();
}

/*
* x-ms-original-file:
* specification/azurefleet/AzureFleet.Management/examples/2024-05-01-preview/Fleets_CreateOrUpdate_MinimumSet.json
*/
/**
* Sample code: Fleets_CreateOrUpdate_MinimumSet.
*
* @param manager Entry point to ComputeFleetManager.
*/
public static void
fleetsCreateOrUpdateMinimumSet(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
manager.fleets()
.define("testFleet")
.withRegion("eastus2euap")
.withExistingResourceGroup("rgazurefleet")
.withTags(mapOf("key", "fakeTokenPlaceholder"))
.withProperties(new FleetProperties()
.withSpotPriorityProfile(new SpotPriorityProfile().withCapacity(2)
.withMinCapacity(1)
.withEvictionPolicy(EvictionPolicy.DELETE)
.withAllocationStrategy(SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED)
.withMaintain(true))
.withRegularPriorityProfile(new RegularPriorityProfile().withCapacity(2)
.withMinCapacity(1)
.withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE))
.withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3"),
new VmSizeProfile().withName("Standard_D4s_v3"), new VmSizeProfile().withName("Standard_E2s_v3")))
.withComputeProfile(new ComputeProfile()
.withBaseVirtualMachineProfile(new BaseVirtualMachineProfile()
.withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("prefix")
.withAdminUsername("azureuser")
.withAdminPassword("fakeTokenPlaceholder")
.withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(false)))
.withStorageProfile(new VirtualMachineScaleSetStorageProfile()
.withImageReference(new ImageReference().withPublisher("canonical")
.withOffer("0001-com-ubuntu-server-focal")
.withSku("20_04-lts-gen2")
.withVersion("latest"))
.withOsDisk(new VirtualMachineScaleSetOSDisk()
.withCaching(CachingTypes.READ_WRITE)
.withCreateOption(DiskCreateOptionTypes.FROM_IMAGE)
.withOsType(OperatingSystemTypes.LINUX)
.withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters()
.withStorageAccountType(StorageAccountTypes.STANDARD_LRS))))
.withNetworkProfile(new VirtualMachineScaleSetNetworkProfile()
.withNetworkInterfaceConfigurations(
Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("vmNameTest")
.withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties()
.withPrimary(true)
.withEnableAcceleratedNetworking(false)
.withIpConfigurations(Arrays.asList(new VirtualMachineScaleSetIPConfiguration()
.withName("vmNameTest")
.withProperties(new VirtualMachineScaleSetIPConfigurationProperties()
.withSubnet(new ApiEntityReference().withId(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"))
.withPrimary(true)
.withLoadBalancerBackendAddressPools(
Arrays.asList(new SubResource().withId(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"))))))
.withEnableIPForwarding(true))))
.withNetworkApiVersion(NetworkApiVersion.fromString("2022-07-01"))))
.withComputeApiVersion("2023-09-01")
.withPlatformFaultDomainCount(1)))
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/azurefleet/AzureFleet.Management
commit: 7ed015e3dd1b8b1b0e71c9b5e6b6c5ccb8968b3a
repo: Azure/azure-rest-api-specs
additionalDirectories: null
commit: 19499f2ce7b45f32f5c01463e2724eb0dffde31e
repo: test-repo-billy/azure-rest-api-specs
additionalDirectories: