Skip to content

Commit 42c272a

Browse files
author
SDKAuto
committed
CodeGen from PR 20917 in Azure/azure-rest-api-specs
Merge eedda8e42be254e5f25f246f636b4101d0735544 into 4994cbed850f3726721ec6fd3235a474e8d08fcc
1 parent 12ace8e commit 42c272a

File tree

70 files changed

+4345
-450
lines changed

Some content is hidden

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

70 files changed

+4345
-450
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2022-09-30)
4+
5+
- Azure Resource Manager LoadTest client library for Java. This package contains Microsoft Azure SDK for LoadTest Management SDK. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2022-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager LoadTest client library for Java.
44

5-
This package contains Microsoft Azure SDK for LoadTest Management SDK. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2021-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for LoadTest Management SDK. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2022-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -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-loadtestservice</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

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

Lines changed: 169 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,34 @@
88
- [GetByResourceGroup](#loadtests_getbyresourcegroup)
99
- [List](#loadtests_list)
1010
- [ListByResourceGroup](#loadtests_listbyresourcegroup)
11+
- [ListOutboundNetworkDependenciesEndpoints](#loadtests_listoutboundnetworkdependenciesendpoints)
1112
- [Update](#loadtests_update)
1213

1314
## Operations
1415

1516
- [List](#operations_list)
17+
18+
## Quotas
19+
20+
- [CheckAvailability](#quotas_checkavailability)
21+
- [Get](#quotas_get)
22+
- [List](#quotas_list)
1623
### LoadTests_CreateOrUpdate
1724

1825
```java
26+
import com.azure.resourcemanager.loadtestservice.models.EncryptionProperties;
27+
import com.azure.resourcemanager.loadtestservice.models.EncryptionPropertiesIdentity;
28+
import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentity;
29+
import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentityType;
30+
import com.azure.resourcemanager.loadtestservice.models.Type;
31+
import com.azure.resourcemanager.loadtestservice.models.UserAssignedIdentity;
1932
import java.util.HashMap;
2033
import java.util.Map;
2134

2235
/** Samples for LoadTests CreateOrUpdate. */
2336
public final class LoadTestsCreateOrUpdateSamples {
2437
/*
25-
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_CreateOrUpdate.json
38+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_CreateOrUpdate.json
2639
*/
2740
/**
2841
* Sample code: LoadTests_CreateOrUpdate.
@@ -36,7 +49,22 @@ public final class LoadTestsCreateOrUpdateSamples {
3649
.withRegion("westus")
3750
.withExistingResourceGroup("dummyrg")
3851
.withTags(mapOf("Team", "Dev Exp"))
52+
.withIdentity(
53+
new ManagedServiceIdentity()
54+
.withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
55+
.withUserAssignedIdentities(
56+
mapOf(
57+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
58+
new UserAssignedIdentity())))
3959
.withDescription("This is new load test resource")
60+
.withEncryption(
61+
new EncryptionProperties()
62+
.withIdentity(
63+
new EncryptionPropertiesIdentity()
64+
.withType(Type.USER_ASSIGNED)
65+
.withResourceId(
66+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"))
67+
.withKeyUrl("https://dummy.vault.azure.net/keys/dummykey1"))
4068
.create();
4169
}
4270

@@ -61,7 +89,7 @@ import com.azure.core.util.Context;
6189
/** Samples for LoadTests Delete. */
6290
public final class LoadTestsDeleteSamples {
6391
/*
64-
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_Delete.json
92+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Delete.json
6593
*/
6694
/**
6795
* Sample code: LoadTests_Delete.
@@ -82,7 +110,7 @@ import com.azure.core.util.Context;
82110
/** Samples for LoadTests GetByResourceGroup. */
83111
public final class LoadTestsGetByResourceGroupSamples {
84112
/*
85-
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_Get.json
113+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Get.json
86114
*/
87115
/**
88116
* Sample code: LoadTests_Get.
@@ -103,7 +131,7 @@ import com.azure.core.util.Context;
103131
/** Samples for LoadTests List. */
104132
public final class LoadTestsListSamples {
105133
/*
106-
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_ListBySubscription.json
134+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListBySubscription.json
107135
*/
108136
/**
109137
* Sample code: LoadTests_ListBySubscription.
@@ -124,7 +152,7 @@ import com.azure.core.util.Context;
124152
/** Samples for LoadTests ListByResourceGroup. */
125153
public final class LoadTestsListByResourceGroupSamples {
126154
/*
127-
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_ListByResourceGroup.json
155+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListByResourceGroup.json
128156
*/
129157
/**
130158
* Sample code: LoadTests_ListByResourceGroup.
@@ -137,20 +165,52 @@ public final class LoadTestsListByResourceGroupSamples {
137165
}
138166
```
139167

168+
### LoadTests_ListOutboundNetworkDependenciesEndpoints
169+
170+
```java
171+
import com.azure.core.util.Context;
172+
173+
/** Samples for LoadTests ListOutboundNetworkDependenciesEndpoints. */
174+
public final class LoadTestsListOutboundNetworkDependenciesEndpointsSamples {
175+
/*
176+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_ListOutboundNetworkDependenciesEndpoints.json
177+
*/
178+
/**
179+
* Sample code: ListOutboundNetworkDependencies.
180+
*
181+
* @param manager Entry point to LoadTestManager.
182+
*/
183+
public static void listOutboundNetworkDependencies(
184+
com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
185+
manager
186+
.loadTests()
187+
.listOutboundNetworkDependenciesEndpoints(
188+
"default-azureloadtest-japaneast", "sampleloadtest", Context.NONE);
189+
}
190+
}
191+
```
192+
140193
### LoadTests_Update
141194

142195
```java
143196
import com.azure.core.management.serializer.SerializerFactory;
144197
import com.azure.core.util.Context;
145198
import com.azure.core.util.serializer.SerializerEncoding;
199+
import com.azure.resourcemanager.loadtestservice.models.EncryptionProperties;
200+
import com.azure.resourcemanager.loadtestservice.models.EncryptionPropertiesIdentity;
146201
import com.azure.resourcemanager.loadtestservice.models.LoadTestResource;
147-
import com.azure.resourcemanager.loadtestservice.models.LoadTestResourcePatchRequestBodyProperties;
202+
import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentity;
203+
import com.azure.resourcemanager.loadtestservice.models.ManagedServiceIdentityType;
204+
import com.azure.resourcemanager.loadtestservice.models.Type;
205+
import com.azure.resourcemanager.loadtestservice.models.UserAssignedIdentity;
148206
import java.io.IOException;
207+
import java.util.HashMap;
208+
import java.util.Map;
149209

150210
/** Samples for LoadTests Update. */
151211
public final class LoadTestsUpdateSamples {
152212
/*
153-
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/LoadTests_Update.json
213+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/LoadTests_Update.json
154214
*/
155215
/**
156216
* Sample code: LoadTests_Update.
@@ -167,10 +227,31 @@ public final class LoadTestsUpdateSamples {
167227
SerializerFactory
168228
.createDefaultManagementSerializerAdapter()
169229
.deserialize("{\"Division\":\"LT\",\"Team\":\"Dev Exp\"}", Object.class, SerializerEncoding.JSON))
170-
.withProperties(
171-
new LoadTestResourcePatchRequestBodyProperties().withDescription("This is new load test resource"))
230+
.withIdentity(
231+
new ManagedServiceIdentity()
232+
.withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
233+
.withUserAssignedIdentities(
234+
mapOf(
235+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
236+
new UserAssignedIdentity())))
237+
.withDescription("This is new load test resource")
238+
.withEncryption(
239+
new EncryptionProperties()
240+
.withIdentity(new EncryptionPropertiesIdentity().withType(Type.SYSTEM_ASSIGNED))
241+
.withKeyUrl("https://dummy.vault.azure.net/keys/dummykey1"))
172242
.apply();
173243
}
244+
245+
@SuppressWarnings("unchecked")
246+
private static <T> Map<String, T> mapOf(Object... inputs) {
247+
Map<String, T> map = new HashMap<>();
248+
for (int i = 0; i < inputs.length; i += 2) {
249+
String key = (String) inputs[i];
250+
T value = (T) inputs[i + 1];
251+
map.put(key, value);
252+
}
253+
return map;
254+
}
174255
}
175256
```
176257

@@ -182,7 +263,7 @@ import com.azure.core.util.Context;
182263
/** Samples for Operations List. */
183264
public final class OperationsListSamples {
184265
/*
185-
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/preview/2021-12-01-preview/examples/Operations_List.json
266+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Operations_List.json
186267
*/
187268
/**
188269
* Sample code: Operations_List.
@@ -195,3 +276,81 @@ public final class OperationsListSamples {
195276
}
196277
```
197278

279+
### Quotas_CheckAvailability
280+
281+
```java
282+
import com.azure.core.util.Context;
283+
import com.azure.resourcemanager.loadtestservice.models.QuotaBucketRequest;
284+
import com.azure.resourcemanager.loadtestservice.models.QuotaBucketRequestPropertiesDimensions;
285+
286+
/** Samples for Quotas CheckAvailability. */
287+
public final class QuotasCheckAvailabilitySamples {
288+
/*
289+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_CheckAvailability.json
290+
*/
291+
/**
292+
* Sample code: Quotas_CheckAvailability.
293+
*
294+
* @param manager Entry point to LoadTestManager.
295+
*/
296+
public static void quotasCheckAvailability(com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
297+
manager
298+
.quotas()
299+
.checkAvailabilityWithResponse(
300+
"westus",
301+
"testQuotaBucket",
302+
new QuotaBucketRequest()
303+
.withCurrentUsage(20)
304+
.withCurrentQuota(40)
305+
.withNewQuota(50)
306+
.withDimensions(
307+
new QuotaBucketRequestPropertiesDimensions()
308+
.withSubscriptionId("testsubscriptionId")
309+
.withLocation("westus")),
310+
Context.NONE);
311+
}
312+
}
313+
```
314+
315+
### Quotas_Get
316+
317+
```java
318+
import com.azure.core.util.Context;
319+
320+
/** Samples for Quotas Get. */
321+
public final class QuotasGetSamples {
322+
/*
323+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_Get.json
324+
*/
325+
/**
326+
* Sample code: Quotas_Get.
327+
*
328+
* @param manager Entry point to LoadTestManager.
329+
*/
330+
public static void quotasGet(com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
331+
manager.quotas().getWithResponse("westus", "testQuotaBucket", Context.NONE);
332+
}
333+
}
334+
```
335+
336+
### Quotas_List
337+
338+
```java
339+
import com.azure.core.util.Context;
340+
341+
/** Samples for Quotas List. */
342+
public final class QuotasListSamples {
343+
/*
344+
* x-ms-original-file: specification/loadtestservice/resource-manager/Microsoft.LoadTestService/stable/2022-12-01/examples/Quotas_List.json
345+
*/
346+
/**
347+
* Sample code: Quotas_List.
348+
*
349+
* @param manager Entry point to LoadTestManager.
350+
*/
351+
public static void quotasList(com.azure.resourcemanager.loadtestservice.LoadTestManager manager) {
352+
manager.quotas().list("westus", Context.NONE);
353+
}
354+
}
355+
```
356+

sdk/loadtestservice/azure-resourcemanager-loadtestservice/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for LoadTest Management</name>
16-
<description>This package contains Microsoft Azure SDK for LoadTest Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2021-12-01-preview.</description>
16+
<description>This package contains Microsoft Azure SDK for LoadTest Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. LoadTest client provides access to LoadTest Resource and it's status operations. Package tag package-2022-12-01.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

0 commit comments

Comments
 (0)