Skip to content

Commit ab28f86

Browse files
[Automation] Generate Fluent Lite from TypeSpec standbypool (Azure#45005)
* [Automation] External Change * [Automation] Generate Fluent Lite from TypeSpec standbypool * use minimal available sku * revapi=true * spotless * fix * fix getMinimalVmssSku * fix import * search all regions * added availability check * add liveOnly * changelog date * spotless --------- Co-authored-by: xiaofeicao <[email protected]>
1 parent 31a0b06 commit ab28f86

File tree

7 files changed

+352
-252
lines changed

7 files changed

+352
-252
lines changed

eng/versioning/version_client.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ com.azure.resourcemanager:azure-resourcemanager-largeinstance;1.0.0-beta.2;1.0.0
449449
com.azure.resourcemanager:azure-resourcemanager-migrationdiscoverysap;1.0.0-beta.2;1.0.0-beta.3
450450
com.azure.resourcemanager:azure-resourcemanager-storageactions;1.0.0-beta.3;1.0.0-beta.4
451451
com.azure.resourcemanager:azure-resourcemanager-deviceregistry;1.0.0;1.1.0-beta.1
452-
com.azure.resourcemanager:azure-resourcemanager-standbypool;1.0.0;1.1.0-beta.1
452+
com.azure.resourcemanager:azure-resourcemanager-standbypool;1.0.0;1.1.0
453453
com.azure.resourcemanager:azure-resourcemanager-edgezones;1.0.0-beta.2;1.0.0-beta.3
454454
com.azure.resourcemanager:azure-resourcemanager-devopsinfrastructure;1.0.0;1.1.0-beta.1
455455
com.azure.resourcemanager:azure-resourcemanager-oracledatabase;1.0.0;1.1.0-beta.1

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

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

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

5-
### Features Added
5+
- Azure Resource Manager Standby Pool client library for Java. This package contains Microsoft Azure SDK for Standby Pool 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+
#### `models.PoolResourceStateCount` was removed
10+
11+
#### `StandbyPoolManager` was modified
12+
13+
* `fluent.StandbyPoolClient serviceClient()` -> `fluent.StandbyPoolManagementClient serviceClient()`
14+
15+
### Features Added
16+
17+
* `models.PoolVirtualMachineState` was added
18+
19+
* `models.StandbyVirtualMachinePoolForecastValues` was added
20+
21+
* `models.HealthStateCode` was added
22+
23+
* `models.StandbyVirtualMachinePoolPrediction` was added
24+
25+
* `models.PoolContainerGroupState` was added
26+
27+
* `models.PoolContainerGroupStateCount` was added
28+
29+
* `models.PoolStatus` was added
30+
31+
* `models.PoolVirtualMachineStateCount` was added
32+
33+
* `models.StandbyContainerGroupPoolForecastValues` was added
34+
35+
* `models.StandbyContainerGroupPoolPrediction` was added
36+
37+
#### `models.StandbyContainerGroupPoolResourceProperties` was modified
38+
39+
* `zones()` was added
40+
* `withZones(java.util.List)` was added
41+
42+
#### `models.StandbyVirtualMachinePoolRuntimeViewResourceProperties` was modified
43+
44+
* `status()` was added
45+
* `prediction()` was added
46+
47+
#### `models.ContainerGroupInstanceCountSummary` was modified
48+
49+
* `zone()` was added
50+
51+
#### `models.StandbyContainerGroupPoolResourceUpdateProperties` was modified
52+
53+
* `withZones(java.util.List)` was added
54+
* `zones()` was added
55+
56+
#### `models.StandbyContainerGroupPoolRuntimeViewResourceProperties` was modified
1057

11-
### Other Changes
58+
* `status()` was added
59+
* `prediction()` was added
1260

1361
## 1.0.0 (2024-09-25)
1462

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

Lines changed: 44 additions & 5 deletions
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-standbypool</artifactId>
35-
<version>1.1.0-beta.1</version>
35+
<version>1.1.0</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -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
StandbyPoolManager manager = StandbyPoolManager
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

@@ -70,6 +70,47 @@ See [API design][design] for general introduction on design and key concepts on
7070

7171
## Examples
7272

73+
```java
74+
// reference https://learn.microsoft.com/azure/virtual-machine-scale-sets/standby-pools-create
75+
76+
// Create virtual network and virtual machine scale set
77+
virtualNetwork = this.computeManager.networkManager()
78+
.networks()
79+
.define("vmssvnet")
80+
.withRegion(REGION)
81+
.withExistingResourceGroup(resourceGroupName)
82+
.withAddressSpace("10.0.0.0/27")
83+
.withSubnet("default", "10.0.0.0/27")
84+
.create();
85+
86+
virtualMachineScaleSet = computeManager.virtualMachineScaleSets()
87+
.define("vmss")
88+
.withRegion(REGION)
89+
.withExistingResourceGroup(resourceGroupName)
90+
.withFlexibleOrchestrationMode()
91+
.withSku(VirtualMachineScaleSetSkuTypes.STANDARD_A0)
92+
.withExistingPrimaryNetworkSubnet(virtualNetwork, "default")
93+
.withoutPrimaryInternetFacingLoadBalancer()
94+
.withoutPrimaryInternalLoadBalancer()
95+
.withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_18_04_LTS)
96+
.withRootUsername("Foo12")
97+
.withSsh(sshPublicKey())
98+
.withVirtualMachinePublicIp()
99+
.withCapacity(3L)
100+
.create();
101+
102+
// create standby virtual machine pool
103+
standbyVirtualMachinePool = standbyPoolManager.standbyVirtualMachinePools()
104+
.define(poolName)
105+
.withRegion(REGION)
106+
.withExistingResourceGroup(resourceGroupName)
107+
.withProperties(new StandbyVirtualMachinePoolResourceProperties()
108+
.withAttachedVirtualMachineScaleSetId(virtualMachineScaleSet.id())
109+
.withVirtualMachineState(VirtualMachineState.DEALLOCATED)
110+
.withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(3L)
111+
.withMinReadyCapacity(1L)))
112+
.create();
113+
```
73114
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/standbypool/azure-resourcemanager-standbypool/SAMPLE.md)
74115

75116

@@ -100,5 +141,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
100141
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101142
[coc]: https://opensource.microsoft.com/codeofconduct/
102143
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103-
104-

0 commit comments

Comments
 (0)