Skip to content

Commit c378fea

Browse files
author
SDKAuto
committed
CodeGen from PR 33581 in Azure/azure-rest-api-specs
Merge efc5c09ac76420e669ba217b83c81ce263ad5453 into cb5ef7fc4cb443bd5f6b21d02cbce41051beb6ae
1 parent 41e7411 commit c378fea

File tree

4 files changed

+131
-180
lines changed

4 files changed

+131
-180
lines changed

sdk/computefleet/azure-resourcemanager-computefleet/CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# Release History
22

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.1.0-beta.1 (2025-04-15)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
5+
- 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).
126

137
## 1.0.0 (2024-10-22)
148

sdk/computefleet/azure-resourcemanager-computefleet/README.md

Lines changed: 56 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
ComputeFleetManager manager = ComputeFleetManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -99,101 +99,60 @@ fleet = computeFleetManager.fleets()
9999
.define(fleetName)
100100
.withRegion(REGION)
101101
.withExistingResourceGroup(resourceGroupName)
102-
.withProperties(
103-
new FleetProperties()
104-
.withSpotPriorityProfile(
105-
new SpotPriorityProfile()
106-
.withMaintain(false)
107-
.withCapacity(1)
108-
.withEvictionPolicy(EvictionPolicy.DELETE)
109-
.withAllocationStrategy(SpotAllocationStrategy.LOWEST_PRICE)
110-
)
111-
.withVmSizesProfile(
112-
Arrays.asList(
113-
new VmSizeProfile().withName("Standard_D4s_v3")
114-
)
115-
)
116-
.withComputeProfile(
117-
new ComputeProfile()
118-
.withBaseVirtualMachineProfile(
119-
new BaseVirtualMachineProfile()
120-
.withStorageProfile(
121-
new VirtualMachineScaleSetStorageProfile()
122-
.withImageReference(
123-
new ImageReference()
124-
.withPublisher("canonical")
125-
.withOffer("ubuntu-24_04-lts")
126-
.withSku("server")
127-
.withVersion("latest")
128-
)
129-
.withOsDisk(
130-
new VirtualMachineScaleSetOSDisk()
131-
.withManagedDisk(
132-
new VirtualMachineScaleSetManagedDiskParameters()
133-
.withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)
134-
)
135-
.withOsType(OperatingSystemTypes.LINUX)
136-
.withDiskSizeGB(30)
137-
.withCreateOption(DiskCreateOptionTypes.FROM_IMAGE)
138-
.withDeleteOption(DiskDeleteOptionTypes.DELETE)
139-
.withCaching(CachingTypes.READ_WRITE)
140-
)
141-
.withDiskControllerType(DiskControllerTypes.SCSI)
142-
)
143-
.withOsProfile(
144-
new VirtualMachineScaleSetOSProfile()
145-
.withComputerNamePrefix(randomPadding())
146-
.withAdminUsername(adminUser)
147-
.withAdminPassword(adminPwd)
148-
.withLinuxConfiguration(
149-
new LinuxConfiguration().withDisablePasswordAuthentication(false)
150-
)
151-
)
152-
.withNetworkProfile(
153-
new VirtualMachineScaleSetNetworkProfile()
154-
.withNetworkInterfaceConfigurations(
155-
Arrays.asList(
156-
new VirtualMachineScaleSetNetworkConfiguration()
157-
.withName(vmName)
158-
.withProperties(
159-
new VirtualMachineScaleSetNetworkConfigurationProperties()
160-
.withPrimary(true)
161-
.withEnableAcceleratedNetworking(false)
162-
.withDeleteOption(DeleteOptions.DELETE)
163-
.withIpConfigurations(
164-
Arrays.asList(
165-
new VirtualMachineScaleSetIPConfiguration()
166-
.withName(vmName)
167-
.withProperties(
168-
new VirtualMachineScaleSetIPConfigurationProperties()
169-
.withPrimary(true)
170-
.withSubnet(
171-
new ApiEntityReference()
172-
.withId(network.subnets().get("default").id())
173-
)
174-
.withLoadBalancerBackendAddressPools(
175-
loadBalancer.loadBalancingRules()
176-
.get(loadBalancerName + "-lbrule")
177-
.innerModel().backendAddressPools()
178-
)
179-
)
180-
)
181-
)
182-
)
183-
)
184-
)
185-
.withNetworkApiVersion(NetworkApiVersion.fromString("2024-03-01"))
186-
)
187-
)
188-
.withComputeApiVersion("2024-03-01")
189-
.withPlatformFaultDomainCount(1)
190-
)
191-
.withRegularPriorityProfile(new RegularPriorityProfile()
192-
.withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)
193-
.withMinCapacity(1)
194-
.withCapacity(2)
195-
)
196-
)
102+
.withProperties(new FleetProperties()
103+
.withSpotPriorityProfile(new SpotPriorityProfile().withMaintain(false)
104+
.withCapacity(1)
105+
.withEvictionPolicy(EvictionPolicy.DELETE)
106+
.withAllocationStrategy(SpotAllocationStrategy.LOWEST_PRICE))
107+
.withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_D4s_v3")))
108+
.withComputeProfile(new ComputeProfile()
109+
.withBaseVirtualMachineProfile(new BaseVirtualMachineProfile()
110+
.withStorageProfile(new VirtualMachineScaleSetStorageProfile()
111+
.withImageReference(new ImageReference().withPublisher("canonical")
112+
.withOffer("ubuntu-24_04-lts")
113+
.withSku("server")
114+
.withVersion("latest"))
115+
.withOsDisk(new VirtualMachineScaleSetOSDisk()
116+
.withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters()
117+
.withStorageAccountType(StorageAccountTypes.PREMIUM_LRS))
118+
.withOsType(OperatingSystemTypes.LINUX)
119+
.withDiskSizeGB(30)
120+
.withCreateOption(DiskCreateOptionTypes.FROM_IMAGE)
121+
.withDeleteOption(DiskDeleteOptionTypes.DELETE)
122+
.withCaching(CachingTypes.READ_WRITE))
123+
.withDiskControllerType(DiskControllerTypes.SCSI))
124+
.withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix(randomPadding())
125+
.withAdminUsername(adminUser)
126+
.withAdminPassword(adminPwd)
127+
.withLinuxConfiguration(
128+
new LinuxConfiguration().withDisablePasswordAuthentication(false)))
129+
.withNetworkProfile(
130+
new VirtualMachineScaleSetNetworkProfile()
131+
.withNetworkInterfaceConfigurations(
132+
Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName(vmName)
133+
.withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties()
134+
.withPrimary(true)
135+
.withEnableAcceleratedNetworking(false)
136+
.withDeleteOption(DeleteOptions.DELETE)
137+
.withIpConfigurations(Arrays
138+
.asList(new VirtualMachineScaleSetIPConfiguration().withName(vmName)
139+
.withProperties(
140+
new VirtualMachineScaleSetIPConfigurationProperties()
141+
.withPrimary(true)
142+
.withSubnet(new ApiEntityReference()
143+
.withId(network.subnets().get("default").id()))
144+
.withLoadBalancerBackendAddressPools(
145+
loadBalancer.loadBalancingRules()
146+
.get(loadBalancerName + "-lbrule")
147+
.innerModel()
148+
.backendAddressPools())))))))
149+
.withNetworkApiVersion(NetworkApiVersion.fromString("2024-03-01"))))
150+
.withComputeApiVersion("2024-03-01")
151+
.withPlatformFaultDomainCount(1))
152+
.withRegularPriorityProfile(new RegularPriorityProfile()
153+
.withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)
154+
.withMinCapacity(1)
155+
.withCapacity(2)))
197156
.create();
198157
```
199158
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md)
@@ -226,5 +185,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
226185
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
227186
[coc]: https://opensource.microsoft.com/codeofconduct/
228187
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
229-
230-

sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,70 @@
1616
- [List](#operations_list)
1717
### Fleets_CreateOrUpdate
1818

19+
```java
20+
/**
21+
* Samples for Fleets ListByResourceGroup.
22+
*/
23+
public final class FleetsListByResourceGroupSamples {
24+
/*
25+
* x-ms-original-file: 2024-11-01/Fleets_ListByResourceGroup.json
26+
*/
27+
/**
28+
* Sample code: Fleets_ListByResourceGroup.
29+
*
30+
* @param manager Entry point to ComputeFleetManager.
31+
*/
32+
public static void fleetsListByResourceGroup(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
33+
manager.fleets().listByResourceGroup("rgazurefleet", com.azure.core.util.Context.NONE);
34+
}
35+
}
36+
```
37+
38+
### Fleets_Delete
39+
40+
```java
41+
/**
42+
* Samples for Operations List.
43+
*/
44+
public final class OperationsListSamples {
45+
/*
46+
* x-ms-original-file: 2024-11-01/Operations_List.json
47+
*/
48+
/**
49+
* Sample code: Operations_List.
50+
*
51+
* @param manager Entry point to ComputeFleetManager.
52+
*/
53+
public static void operationsList(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
54+
manager.operations().list(com.azure.core.util.Context.NONE);
55+
}
56+
}
57+
```
58+
59+
### Fleets_GetByResourceGroup
60+
61+
```java
62+
/**
63+
* Samples for Fleets ListVirtualMachineScaleSets.
64+
*/
65+
public final class FleetsListVirtualMachineScaleSetsSamples {
66+
/*
67+
* x-ms-original-file: 2024-11-01/Fleets_ListVirtualMachineScaleSets.json
68+
*/
69+
/**
70+
* Sample code: Fleets_ListVirtualMachineScaleSets.
71+
*
72+
* @param manager Entry point to ComputeFleetManager.
73+
*/
74+
public static void
75+
fleetsListVirtualMachineScaleSets(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
76+
manager.fleets().listVirtualMachineScaleSets("rgazurefleet", "myFleet", com.azure.core.util.Context.NONE);
77+
}
78+
}
79+
```
80+
81+
### Fleets_List
82+
1983
```java
2084
import com.azure.core.management.SubResource;
2185
import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContent;
@@ -466,7 +530,7 @@ public final class FleetsCreateOrUpdateSamples {
466530
}
467531
```
468532

469-
### Fleets_Delete
533+
### Fleets_ListByResourceGroup
470534

471535
```java
472536
/**
@@ -487,28 +551,7 @@ public final class FleetsDeleteSamples {
487551
}
488552
```
489553

490-
### Fleets_GetByResourceGroup
491-
492-
```java
493-
/**
494-
* Samples for Fleets GetByResourceGroup.
495-
*/
496-
public final class FleetsGetByResourceGroupSamples {
497-
/*
498-
* x-ms-original-file: 2024-11-01/Fleets_Get.json
499-
*/
500-
/**
501-
* Sample code: Fleets_Get.
502-
*
503-
* @param manager Entry point to ComputeFleetManager.
504-
*/
505-
public static void fleetsGet(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
506-
manager.fleets().getByResourceGroupWithResponse("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE);
507-
}
508-
}
509-
```
510-
511-
### Fleets_List
554+
### Fleets_ListVirtualMachineScaleSets
512555

513556
```java
514557
/**
@@ -529,49 +572,6 @@ public final class FleetsListSamples {
529572
}
530573
```
531574

532-
### Fleets_ListByResourceGroup
533-
534-
```java
535-
/**
536-
* Samples for Fleets ListByResourceGroup.
537-
*/
538-
public final class FleetsListByResourceGroupSamples {
539-
/*
540-
* x-ms-original-file: 2024-11-01/Fleets_ListByResourceGroup.json
541-
*/
542-
/**
543-
* Sample code: Fleets_ListByResourceGroup.
544-
*
545-
* @param manager Entry point to ComputeFleetManager.
546-
*/
547-
public static void fleetsListByResourceGroup(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
548-
manager.fleets().listByResourceGroup("rgazurefleet", com.azure.core.util.Context.NONE);
549-
}
550-
}
551-
```
552-
553-
### Fleets_ListVirtualMachineScaleSets
554-
555-
```java
556-
/**
557-
* Samples for Fleets ListVirtualMachineScaleSets.
558-
*/
559-
public final class FleetsListVirtualMachineScaleSetsSamples {
560-
/*
561-
* x-ms-original-file: 2024-11-01/Fleets_ListVirtualMachineScaleSets.json
562-
*/
563-
/**
564-
* Sample code: Fleets_ListVirtualMachineScaleSets.
565-
*
566-
* @param manager Entry point to ComputeFleetManager.
567-
*/
568-
public static void
569-
fleetsListVirtualMachineScaleSets(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
570-
manager.fleets().listVirtualMachineScaleSets("rgazurefleet", "myFleet", com.azure.core.util.Context.NONE);
571-
}
572-
}
573-
```
574-
575575
### Fleets_Update
576576

577577
```java
@@ -963,19 +963,19 @@ public final class FleetsUpdateSamples {
963963

964964
```java
965965
/**
966-
* Samples for Operations List.
966+
* Samples for Fleets GetByResourceGroup.
967967
*/
968-
public final class OperationsListSamples {
968+
public final class FleetsGetByResourceGroupSamples {
969969
/*
970-
* x-ms-original-file: 2024-11-01/Operations_List.json
970+
* x-ms-original-file: 2024-11-01/Fleets_Get.json
971971
*/
972972
/**
973-
* Sample code: Operations_List.
973+
* Sample code: Fleets_Get.
974974
*
975975
* @param manager Entry point to ComputeFleetManager.
976976
*/
977-
public static void operationsList(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
978-
manager.operations().list(com.azure.core.util.Context.NONE);
977+
public static void fleetsGet(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) {
978+
manager.fleets().getByResourceGroupWithResponse("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE);
979979
}
980980
}
981981
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
directory: specification/azurefleet/AzureFleet.Management
2-
commit: 6f175c9c006269a1d0f1928fbc768cacc6ac379a
2+
commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:

0 commit comments

Comments
 (0)