11# Code snippets and samples
22
33
4+ ## AccountQuotas
5+
6+ - [ Get] ( #accountquotas_get )
7+ - [ ListByAccount] ( #accountquotas_listbyaccount )
8+
49## Accounts
510
11+ - [ CheckNameAvailability] ( #accounts_checknameavailability )
612- [ CreateOrUpdate] ( #accounts_createorupdate )
713- [ Delete] ( #accounts_delete )
814- [ GetByResourceGroup] ( #accounts_getbyresourcegroup )
1824
1925- [ Get] ( #quotas_get )
2026- [ ListBySubscription] ( #quotas_listbysubscription )
27+ ### AccountQuotas_Get
28+
29+ ``` java
30+ import com.azure.resourcemanager.playwrighttesting.models.QuotaNames ;
31+ import java.util.stream.Collectors ;
32+
33+ /**
34+ * Samples for AccountQuotas Get.
35+ */
36+ public final class AccountQuotasGetSamples {
37+ /*
38+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_Get.json
39+ */
40+ /**
41+ * Sample code: AccountQuotas_Get.
42+ *
43+ * @param manager Entry point to PlaywrightTestingManager.
44+ */
45+ public static void accountQuotasGet (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
46+ manager. accountQuotas(). getWithResponse(" dummyrg" , " myPlaywrightAccount" , QuotaNames . SCALABLE_EXECUTION , com.azure.core.util. Context . NONE );
47+ }
48+ }
49+ ```
50+
51+ ### AccountQuotas_ListByAccount
52+
53+ ``` java
54+ /**
55+ * Samples for AccountQuotas ListByAccount.
56+ */
57+ public final class AccountQuotasListByAccountSamples {
58+ /*
59+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_ListByAccount.json
60+ */
61+ /**
62+ * Sample code: AccountQuotas_ListByAccount.
63+ *
64+ * @param manager Entry point to PlaywrightTestingManager.
65+ */
66+ public static void accountQuotasListByAccount (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
67+ manager. accountQuotas(). listByAccount(" dummyrg" , " myPlaywrightAccount" , com.azure.core.util. Context . NONE );
68+ }
69+ }
70+ ```
71+
72+ ### Accounts_CheckNameAvailability
73+
74+ ``` java
75+ import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest ;
76+
77+ /**
78+ * Samples for Accounts CheckNameAvailability.
79+ */
80+ public final class AccountsCheckNameAvailabilitySamples {
81+ /*
82+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CheckNameAvailability.json
83+ */
84+ /**
85+ * Sample code: Accounts_CheckNameAvailability.
86+ *
87+ * @param manager Entry point to PlaywrightTestingManager.
88+ */
89+ public static void accountsCheckNameAvailability (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
90+ manager. accounts(). checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest (). withName(" dummyName" ). withType(" Microsoft.AzurePlaywrightService/Accounts" ), com.azure.core.util. Context . NONE );
91+ }
92+ }
93+ ```
94+
2195### Accounts_CreateOrUpdate
2296
2397``` java
98+ import com.azure.resourcemanager.playwrighttesting.models.AccountProperties ;
2499import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus ;
25100import java.util.HashMap ;
26101import java.util.Map ;
102+ import java.util.stream.Collectors ;
27103
28- /* * Samples for Accounts CreateOrUpdate. */
104+ /**
105+ * Samples for Accounts CreateOrUpdate.
106+ */
29107public final class AccountsCreateOrUpdateSamples {
30108 /*
31- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Accounts_CreateOrUpdate.json
109+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Accounts_CreateOrUpdate.json
32110 */
33111 /**
34112 * Sample code: Accounts_CreateOrUpdate.
35- *
113+ *
36114 * @param manager Entry point to PlaywrightTestingManager.
37115 */
38- public static void accountsCreateOrUpdate (
39- com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
40- manager
41- .accounts()
42- .define(" myPlaywrightAccount" )
43- .withRegion(" westus" )
44- .withExistingResourceGroup(" dummyrg" )
45- .withTags(mapOf(" Team" , " Dev Exp" ))
46- .withRegionalAffinity(EnablementStatus . ENABLED )
47- .create();
116+ public static void accountsCreateOrUpdate (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
117+ manager. accounts(). define(" myPlaywrightAccount" ). withRegion(" westus" ). withExistingResourceGroup(" dummyrg" ). withTags(mapOf(" Team" , " Dev Exp" )). withProperties(new AccountProperties (). withRegionalAffinity(EnablementStatus . ENABLED )). create();
48118 }
49119
50120 // Use "Map.of" if available
@@ -64,14 +134,16 @@ public final class AccountsCreateOrUpdateSamples {
64134### Accounts_Delete
65135
66136``` java
67- /* * Samples for Accounts Delete. */
137+ /**
138+ * Samples for Accounts Delete.
139+ */
68140public final class AccountsDeleteSamples {
69141 /*
70- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Accounts_Delete.json
142+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Accounts_Delete.json
71143 */
72144 /**
73145 * Sample code: Accounts_Delete.
74- *
146+ *
75147 * @param manager Entry point to PlaywrightTestingManager.
76148 */
77149 public static void accountsDelete (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
@@ -83,39 +155,40 @@ public final class AccountsDeleteSamples {
83155### Accounts_GetByResourceGroup
84156
85157``` java
86- /* * Samples for Accounts GetByResourceGroup. */
158+ /**
159+ * Samples for Accounts GetByResourceGroup.
160+ */
87161public final class AccountsGetByResourceGroupSamples {
88162 /*
89- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Accounts_Get.json
163+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Accounts_Get.json
90164 */
91165 /**
92166 * Sample code: Accounts_Get.
93- *
167+ *
94168 * @param manager Entry point to PlaywrightTestingManager.
95169 */
96170 public static void accountsGet (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
97- manager
98- .accounts()
99- .getByResourceGroupWithResponse(" dummyrg" , " myPlaywrightAccount" , com.azure.core.util. Context . NONE );
171+ manager. accounts(). getByResourceGroupWithResponse(" dummyrg" , " myPlaywrightAccount" , com.azure.core.util. Context . NONE );
100172 }
101173}
102174```
103175
104176### Accounts_List
105177
106178``` java
107- /* * Samples for Accounts List. */
179+ /**
180+ * Samples for Accounts List.
181+ */
108182public final class AccountsListSamples {
109183 /*
110- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Accounts_ListBySubscription.json
184+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Accounts_ListBySubscription.json
111185 */
112186 /**
113187 * Sample code: Accounts_ListBySubscription.
114- *
188+ *
115189 * @param manager Entry point to PlaywrightTestingManager.
116190 */
117- public static void accountsListBySubscription (
118- com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
191+ public static void accountsListBySubscription (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
119192 manager. accounts(). list(com.azure.core.util. Context . NONE );
120193 }
121194}
@@ -124,18 +197,19 @@ public final class AccountsListSamples {
124197### Accounts_ListByResourceGroup
125198
126199``` java
127- /* * Samples for Accounts ListByResourceGroup. */
200+ /**
201+ * Samples for Accounts ListByResourceGroup.
202+ */
128203public final class AccountsListByResourceGroupSamples {
129204 /*
130- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Accounts_ListByResourceGroup.json
205+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Accounts_ListByResourceGroup.json
131206 */
132207 /**
133208 * Sample code: Accounts_ListByResourceGroup.
134- *
209+ *
135210 * @param manager Entry point to PlaywrightTestingManager.
136211 */
137- public static void accountsListByResourceGroup (
138- com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
212+ public static void accountsListByResourceGroup (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
139213 manager. accounts(). listByResourceGroup(" dummyrg" , com.azure.core.util. Context . NONE );
140214 }
141215}
@@ -145,31 +219,27 @@ public final class AccountsListByResourceGroupSamples {
145219
146220``` java
147221import com.azure.resourcemanager.playwrighttesting.models.Account ;
222+ import com.azure.resourcemanager.playwrighttesting.models.AccountUpdateProperties ;
148223import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus ;
149224import java.util.HashMap ;
150225import java.util.Map ;
226+ import java.util.stream.Collectors ;
151227
152- /* * Samples for Accounts Update. */
228+ /**
229+ * Samples for Accounts Update.
230+ */
153231public final class AccountsUpdateSamples {
154232 /*
155- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Accounts_Update.json
233+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Accounts_Update.json
156234 */
157235 /**
158236 * Sample code: Accounts_Update.
159- *
237+ *
160238 * @param manager Entry point to PlaywrightTestingManager.
161239 */
162240 public static void accountsUpdate (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
163- Account resource =
164- manager
165- .accounts()
166- .getByResourceGroupWithResponse(" dummyrg" , " myPlaywrightAccount" , com.azure.core.util. Context . NONE )
167- .getValue();
168- resource
169- .update()
170- .withTags(mapOf(" Division" , " LT" , " Team" , " Dev Exp" ))
171- .withRegionalAffinity(EnablementStatus . ENABLED )
172- .apply();
241+ Account resource = manager. accounts(). getByResourceGroupWithResponse(" dummyrg" , " myPlaywrightAccount" , com.azure.core.util. Context . NONE ). getValue();
242+ resource. update(). withTags(mapOf(" Division" , " LT" , " Team" , " Dev Exp" )). withProperties(new AccountUpdateProperties (). withRegionalAffinity(EnablementStatus . ENABLED )). apply();
173243 }
174244
175245 // Use "Map.of" if available
@@ -189,14 +259,16 @@ public final class AccountsUpdateSamples {
189259### Operations_List
190260
191261``` java
192- /* * Samples for Operations List. */
262+ /**
263+ * Samples for Operations List.
264+ */
193265public final class OperationsListSamples {
194266 /*
195- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Operations_List.json
267+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Operations_List.json
196268 */
197269 /**
198270 * Sample code: Operations_List.
199- *
271+ *
200272 * @param manager Entry point to PlaywrightTestingManager.
201273 */
202274 public static void operationsList (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
@@ -209,15 +281,18 @@ public final class OperationsListSamples {
209281
210282``` java
211283import com.azure.resourcemanager.playwrighttesting.models.QuotaNames ;
284+ import java.util.stream.Collectors ;
212285
213- /* * Samples for Quotas Get. */
286+ /**
287+ * Samples for Quotas Get.
288+ */
214289public final class QuotasGetSamples {
215290 /*
216- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Quotas_Get.json
291+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Quotas_Get.json
217292 */
218293 /**
219294 * Sample code: Quotas_Get.
220- *
295+ *
221296 * @param manager Entry point to PlaywrightTestingManager.
222297 */
223298 public static void quotasGet (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
@@ -229,18 +304,19 @@ public final class QuotasGetSamples {
229304### Quotas_ListBySubscription
230305
231306``` java
232- /* * Samples for Quotas ListBySubscription. */
307+ /**
308+ * Samples for Quotas ListBySubscription.
309+ */
233310public final class QuotasListBySubscriptionSamples {
234311 /*
235- * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10 -01-preview /examples/Quotas_ListBySubscription.json
312+ * x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02 -01/examples/Quotas_ListBySubscription.json
236313 */
237314 /**
238315 * Sample code: Quotas_ListBySubscription.
239- *
316+ *
240317 * @param manager Entry point to PlaywrightTestingManager.
241318 */
242- public static void quotasListBySubscription (
243- com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
319+ public static void quotasListBySubscription (com.azure.resourcemanager.playwrighttesting. PlaywrightTestingManager manager ) {
244320 manager. quotas(). listBySubscription(" eastus" , com.azure.core.util. Context . NONE );
245321 }
246322}
0 commit comments