Skip to content

Commit a580772

Browse files
authored
[Automation] Generate Fluent Lite from TypeSpec computefleet (#42508)
1 parent 3b04759 commit a580772

File tree

93 files changed

+4244
-2098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4244
-2098
lines changed

eng/versioning/version_client.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ com.azure.resourcemanager:azure-resourcemanager-devopsinfrastructure;1.0.0-beta.
467467
com.azure.resourcemanager:azure-resourcemanager-oracledatabase;1.0.0;1.1.0-beta.1
468468
com.azure.resourcemanager:azure-resourcemanager-informaticadatamanagement;1.0.0;1.1.0-beta.1
469469
com.azure.resourcemanager:azure-resourcemanager-mongocluster;1.0.0;1.1.0-beta.1
470-
com.azure.resourcemanager:azure-resourcemanager-computefleet;1.0.0-beta.2;1.0.0-beta.3
470+
com.azure.resourcemanager:azure-resourcemanager-computefleet;1.0.0-beta.2;1.0.0
471471
com.azure.resourcemanager:azure-resourcemanager-servicefabricmanagedclusters;1.0.0-beta.2;1.0.0-beta.3
472472
com.azure.resourcemanager:azure-resourcemanager-healthdataaiservices;1.0.0-beta.1;1.0.0-beta.2
473473
com.azure.resourcemanager:azure-resourcemanager-redhatopenshift;1.0.0-beta.1;1.0.0-beta.2

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

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

3-
## 1.0.0-beta.3 (Unreleased)
3+
## 1.0.0 (2024-10-22)
44

5-
### Features Added
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).
66

77
### Breaking Changes
88

9-
### Bugs Fixed
9+
#### `ComputeFleetManager` was modified
10+
11+
* `fluent.AzureFleetClient serviceClient()` -> `fluent.ComputeFleetManagementClient serviceClient()`
12+
13+
### Features Added
14+
15+
* `models.AdditionalCapabilities` was added
16+
17+
* `models.VMAttributeMinMaxInteger` was added
18+
19+
* `models.VMCategory` was added
20+
21+
* `models.VMAttributes` was added
22+
23+
* `models.CpuManufacturer` was added
24+
25+
* `models.ArchitectureType` was added
26+
27+
* `models.AcceleratorManufacturer` was added
28+
29+
* `models.VMAttributeMinMaxDouble` was added
30+
31+
* `models.LocalStorageDiskType` was added
32+
33+
* `models.LocationProfile` was added
34+
35+
* `models.AdditionalLocationsProfile` was added
36+
37+
* `models.VMAttributeSupport` was added
38+
39+
* `models.AcceleratorType` was added
40+
41+
#### `models.ComputeProfile` was modified
42+
43+
* `additionalVirtualMachineCapabilities()` was added
44+
* `withAdditionalVirtualMachineCapabilities(models.AdditionalCapabilities)` was added
45+
46+
#### `models.FleetProperties` was modified
1047

11-
### Other Changes
48+
* `vmAttributes()` was added
49+
* `withVmAttributes(models.VMAttributes)` was added
50+
* `additionalLocationsProfile()` was added
51+
* `withAdditionalLocationsProfile(models.AdditionalLocationsProfile)` was added
1252

1353
## 1.0.0-beta.2 (2024-07-23)
1454

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

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-computefleet</artifactId>
35-
<version>1.0.0-beta.2</version>
35+
<version>1.0.0</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -70,6 +70,132 @@ See [API design][design] for general introduction on design and key concepts on
7070

7171
## Examples
7272

73+
```java
74+
Network network = networkManager.networks()
75+
.define(vnetName)
76+
.withRegion(REGION)
77+
.withExistingResourceGroup(resourceGroupName)
78+
.withAddressSpace("172.16.0.0/16")
79+
.defineSubnet("default")
80+
.withAddressPrefix("172.16.0.0/24")
81+
.attach()
82+
.create();
83+
84+
LoadBalancer loadBalancer = networkManager.loadBalancers()
85+
.define(loadBalancerName)
86+
.withRegion(REGION)
87+
.withExistingResourceGroup(resourceGroupName)
88+
.defineLoadBalancingRule(loadBalancerName + "-lbrule")
89+
.withProtocol(TransportProtocol.TCP)
90+
.fromExistingSubnet(network, "default")
91+
.fromFrontendPort(80)
92+
.toBackend(loadBalancerName + "-backend")
93+
.toBackendPort(80)
94+
.attach()
95+
.withSku(LoadBalancerSkuType.STANDARD)
96+
.create();
97+
98+
fleet = computeFleetManager.fleets()
99+
.define(fleetName)
100+
.withRegion(REGION)
101+
.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+
)
197+
.create();
198+
```
73199
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md)
74200

75201

0 commit comments

Comments
 (0)