4
4
## ArcSettings
5
5
6
6
- [ Create] ( #arcsettings_create )
7
+ - [ CreateIdentity] ( #arcsettings_createidentity )
7
8
- [ Delete] ( #arcsettings_delete )
9
+ - [ GeneratePassword] ( #arcsettings_generatepassword )
8
10
- [ Get] ( #arcsettings_get )
9
11
- [ ListByCluster] ( #arcsettings_listbycluster )
12
+ - [ Update] ( #arcsettings_update )
10
13
11
14
## Clusters
12
15
13
16
- [ Create] ( #clusters_create )
17
+ - [ CreateIdentity] ( #clusters_createidentity )
14
18
- [ Delete] ( #clusters_delete )
15
19
- [ GetByResourceGroup] ( #clusters_getbyresourcegroup )
16
20
- [ List] ( #clusters_list )
17
21
- [ ListByResourceGroup] ( #clusters_listbyresourcegroup )
18
22
- [ Update] ( #clusters_update )
23
+ - [ UploadCertificate] ( #clusters_uploadcertificate )
19
24
20
25
## Extensions
21
26
34
39
/* * Samples for ArcSettings Create. */
35
40
public final class ArcSettingsCreateSamples {
36
41
/*
37
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/PutArcSetting.json
42
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/PutArcSetting.json
38
43
*/
39
44
/**
40
45
* Sample code: Create ArcSetting.
@@ -47,6 +52,27 @@ public final class ArcSettingsCreateSamples {
47
52
}
48
53
```
49
54
55
+ ### ArcSettings_CreateIdentity
56
+
57
+ ``` java
58
+ import com.azure.core.util.Context ;
59
+
60
+ /* * Samples for ArcSettings CreateIdentity. */
61
+ public final class ArcSettingsCreateIdentitySamples {
62
+ /*
63
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/CreateArcIdentity.json
64
+ */
65
+ /**
66
+ * Sample code: Create Arc Identity.
67
+ *
68
+ * @param manager Entry point to AzureStackHciManager.
69
+ */
70
+ public static void createArcIdentity (com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager ) {
71
+ manager. arcSettings(). createIdentity(" test-rg" , " myCluster" , " default" , Context . NONE );
72
+ }
73
+ }
74
+ ```
75
+
50
76
### ArcSettings_Delete
51
77
52
78
``` java
@@ -55,7 +81,7 @@ import com.azure.core.util.Context;
55
81
/* * Samples for ArcSettings Delete. */
56
82
public final class ArcSettingsDeleteSamples {
57
83
/*
58
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/DeleteArcSetting.json
84
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/DeleteArcSetting.json
59
85
*/
60
86
/**
61
87
* Sample code: Delete ArcSetting.
@@ -68,6 +94,27 @@ public final class ArcSettingsDeleteSamples {
68
94
}
69
95
```
70
96
97
+ ### ArcSettings_GeneratePassword
98
+
99
+ ``` java
100
+ import com.azure.core.util.Context ;
101
+
102
+ /* * Samples for ArcSettings GeneratePassword. */
103
+ public final class ArcSettingsGeneratePasswordSamples {
104
+ /*
105
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/GeneratePassword.json
106
+ */
107
+ /**
108
+ * Sample code: Generate Password.
109
+ *
110
+ * @param manager Entry point to AzureStackHciManager.
111
+ */
112
+ public static void generatePassword (com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager ) {
113
+ manager. arcSettings(). generatePasswordWithResponse(" test-rg" , " myCluster" , " default" , Context . NONE );
114
+ }
115
+ }
116
+ ```
117
+
71
118
### ArcSettings_Get
72
119
73
120
``` java
@@ -76,7 +123,7 @@ import com.azure.core.util.Context;
76
123
/* * Samples for ArcSettings Get. */
77
124
public final class ArcSettingsGetSamples {
78
125
/*
79
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/GetArcSetting.json
126
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/GetArcSetting.json
80
127
*/
81
128
/**
82
129
* Sample code: Get ArcSetting.
@@ -97,7 +144,7 @@ import com.azure.core.util.Context;
97
144
/* * Samples for ArcSettings ListByCluster. */
98
145
public final class ArcSettingsListByClusterSamples {
99
146
/*
100
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/ListArcSettingsByCluster.json
147
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/ListArcSettingsByCluster.json
101
148
*/
102
149
/**
103
150
* Sample code: List ArcSetting resources by HCI Cluster.
@@ -111,13 +158,47 @@ public final class ArcSettingsListByClusterSamples {
111
158
}
112
159
```
113
160
161
+ ### ArcSettings_Update
162
+
163
+ ``` java
164
+ import com.azure.core.management.serializer.SerializerFactory ;
165
+ import com.azure.core.util.Context ;
166
+ import com.azure.core.util.serializer.SerializerEncoding ;
167
+ import com.azure.resourcemanager.azurestackhci.models.ArcSetting ;
168
+ import java.io.IOException ;
169
+
170
+ /* * Samples for ArcSettings Update. */
171
+ public final class ArcSettingsUpdateSamples {
172
+ /*
173
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/PatchArcSetting.json
174
+ */
175
+ /**
176
+ * Sample code: Patch ArcSetting.
177
+ *
178
+ * @param manager Entry point to AzureStackHciManager.
179
+ */
180
+ public static void patchArcSetting (com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager )
181
+ throws IOException {
182
+ ArcSetting resource =
183
+ manager. arcSettings(). getWithResponse(" test-rg" , " myCluster" , " default" , Context . NONE ). getValue();
184
+ resource
185
+ .update()
186
+ .withConnectivityProperties(
187
+ SerializerFactory
188
+ .createDefaultManagementSerializerAdapter()
189
+ .deserialize(" {\" enabled\" :true}" , Object . class, SerializerEncoding . JSON ))
190
+ .apply();
191
+ }
192
+ }
193
+ ```
194
+
114
195
### Clusters_Create
115
196
116
197
``` java
117
198
/* * Samples for Clusters Create. */
118
199
public final class ClustersCreateSamples {
119
200
/*
120
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/CreateCluster.json
201
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/CreateCluster.json
121
202
*/
122
203
/**
123
204
* Sample code: Create cluster.
@@ -138,6 +219,27 @@ public final class ClustersCreateSamples {
138
219
}
139
220
```
140
221
222
+ ### Clusters_CreateIdentity
223
+
224
+ ``` java
225
+ import com.azure.core.util.Context ;
226
+
227
+ /* * Samples for Clusters CreateIdentity. */
228
+ public final class ClustersCreateIdentitySamples {
229
+ /*
230
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/CreateClusterIdentity.json
231
+ */
232
+ /**
233
+ * Sample code: Create cluster Identity.
234
+ *
235
+ * @param manager Entry point to AzureStackHciManager.
236
+ */
237
+ public static void createClusterIdentity (com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager ) {
238
+ manager. clusters(). createIdentity(" test-rg" , " myCluster" , Context . NONE );
239
+ }
240
+ }
241
+ ```
242
+
141
243
### Clusters_Delete
142
244
143
245
``` java
@@ -146,15 +248,15 @@ import com.azure.core.util.Context;
146
248
/* * Samples for Clusters Delete. */
147
249
public final class ClustersDeleteSamples {
148
250
/*
149
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/DeleteCluster.json
251
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/DeleteCluster.json
150
252
*/
151
253
/**
152
254
* Sample code: Delete cluster.
153
255
*
154
256
* @param manager Entry point to AzureStackHciManager.
155
257
*/
156
258
public static void deleteCluster (com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager ) {
157
- manager. clusters(). deleteWithResponse (" test-rg" , " myCluster" , Context . NONE );
259
+ manager. clusters(). delete (" test-rg" , " myCluster" , Context . NONE );
158
260
}
159
261
}
160
262
```
@@ -167,7 +269,7 @@ import com.azure.core.util.Context;
167
269
/* * Samples for Clusters GetByResourceGroup. */
168
270
public final class ClustersGetByResourceGroupSamples {
169
271
/*
170
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/GetCluster.json
272
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/GetCluster.json
171
273
*/
172
274
/**
173
275
* Sample code: Get cluster.
@@ -188,7 +290,7 @@ import com.azure.core.util.Context;
188
290
/* * Samples for Clusters List. */
189
291
public final class ClustersListSamples {
190
292
/*
191
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/ListClustersBySubscription.json
293
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/ListClustersBySubscription.json
192
294
*/
193
295
/**
194
296
* Sample code: List clusters in a given subscription.
@@ -210,7 +312,7 @@ import com.azure.core.util.Context;
210
312
/* * Samples for Clusters ListByResourceGroup. */
211
313
public final class ClustersListByResourceGroupSamples {
212
314
/*
213
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/ListClustersByResourceGroup.json
315
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/ListClustersByResourceGroup.json
214
316
*/
215
317
/**
216
318
* Sample code: List clusters in a given resource group.
@@ -238,7 +340,7 @@ import java.util.Map;
238
340
/* * Samples for Clusters Update. */
239
341
public final class ClustersUpdateSamples {
240
342
/*
241
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/UpdateCluster.json
343
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/UpdateCluster.json
242
344
*/
243
345
/**
244
346
* Sample code: Update cluster.
@@ -272,6 +374,38 @@ public final class ClustersUpdateSamples {
272
374
}
273
375
```
274
376
377
+ ### Clusters_UploadCertificate
378
+
379
+ ``` java
380
+ import com.azure.core.util.Context ;
381
+ import com.azure.resourcemanager.azurestackhci.models.RawCertificateData ;
382
+ import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest ;
383
+ import java.util.Arrays ;
384
+
385
+ /* * Samples for Clusters UploadCertificate. */
386
+ public final class ClustersUploadCertificateSamples {
387
+ /*
388
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/UploadCertificate.json
389
+ */
390
+ /**
391
+ * Sample code: Upload certificate.
392
+ *
393
+ * @param manager Entry point to AzureStackHciManager.
394
+ */
395
+ public static void uploadCertificate (com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager ) {
396
+ manager
397
+ .clusters()
398
+ .uploadCertificate(
399
+ " test-rg" ,
400
+ " myCluster" ,
401
+ new UploadCertificateRequest ()
402
+ .withProperties(
403
+ new RawCertificateData (). withCertificates(Arrays . asList(" base64cert" , " base64cert" ))),
404
+ Context . NONE );
405
+ }
406
+ }
407
+ ```
408
+
275
409
### Extensions_Create
276
410
277
411
``` java
@@ -282,7 +416,7 @@ import java.io.IOException;
282
416
/* * Samples for Extensions Create. */
283
417
public final class ExtensionsCreateSamples {
284
418
/*
285
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/PutExtension.json
419
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/PutExtension.json
286
420
*/
287
421
/**
288
422
* Sample code: Create Arc Extension.
@@ -319,7 +453,7 @@ import com.azure.core.util.Context;
319
453
/* * Samples for Extensions Delete. */
320
454
public final class ExtensionsDeleteSamples {
321
455
/*
322
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/DeleteExtension.json
456
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/DeleteExtension.json
323
457
*/
324
458
/**
325
459
* Sample code: Delete Arc Extension.
@@ -340,7 +474,7 @@ import com.azure.core.util.Context;
340
474
/* * Samples for Extensions Get. */
341
475
public final class ExtensionsGetSamples {
342
476
/*
343
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/GetExtension.json
477
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/GetExtension.json
344
478
*/
345
479
/**
346
480
* Sample code: Get ArcSettings Extension.
@@ -363,7 +497,7 @@ import com.azure.core.util.Context;
363
497
/* * Samples for Extensions ListByArcSetting. */
364
498
public final class ExtensionsListByArcSettingSamples {
365
499
/*
366
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/ListExtensionsByArcSetting.json
500
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/ListExtensionsByArcSetting.json
367
501
*/
368
502
/**
369
503
* Sample code: List Extensions under ArcSetting resource.
@@ -389,7 +523,7 @@ import java.io.IOException;
389
523
/* * Samples for Extensions Update. */
390
524
public final class ExtensionsUpdateSamples {
391
525
/*
392
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/PatchExtension.json
526
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/PatchExtension.json
393
527
*/
394
528
/**
395
529
* Sample code: Update Arc Extension.
@@ -425,15 +559,14 @@ import com.azure.core.util.Context;
425
559
/* * Samples for Operations List. */
426
560
public final class OperationsListSamples {
427
561
/*
428
- * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-01 -01/examples/ListOperations.json
562
+ * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05 -01/examples/ListOperations.json
429
563
*/
430
564
/**
431
- * Sample code: List operations available with the Microsoft.AzureStackHCI provider .
565
+ * Sample code: Create cluster .
432
566
*
433
567
* @param manager Entry point to AzureStackHciManager.
434
568
*/
435
- public static void listOperationsAvailableWithTheMicrosoftAzureStackHCIProvider (
436
- com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager ) {
569
+ public static void createCluster (com.azure.resourcemanager.azurestackhci. AzureStackHciManager manager ) {
437
570
manager. operations(). listWithResponse(Context . NONE );
438
571
}
439
572
}
0 commit comments