diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md
index debcd7bec318..d7a7186e2d1c 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-02-22)
+- Azure Resource Manager DevTestLabs client library for Java. This package contains Microsoft Azure SDK for DevTestLabs Management SDK. The DevTest Labs Client. Package tag package-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-15)
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md
index 889ade30fe18..c45594670d14 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager DevTestLabs client library for Java.
-This package contains Microsoft Azure SDK for DevTestLabs Management SDK. The DevTest Labs Client. Package tag package-2018-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for DevTestLabs Management SDK. The DevTest Labs Client. Package tag package-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-devtestlabs
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md
new file mode 100644
index 000000000000..60c02f59e7a2
--- /dev/null
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/SAMPLE.md
@@ -0,0 +1,4678 @@
+# Code snippets and samples
+
+
+## ArmTemplates
+
+- [Get](#armtemplates_get)
+- [List](#armtemplates_list)
+
+## ArtifactSources
+
+- [CreateOrUpdate](#artifactsources_createorupdate)
+- [Delete](#artifactsources_delete)
+- [Get](#artifactsources_get)
+- [List](#artifactsources_list)
+- [Update](#artifactsources_update)
+
+## Artifacts
+
+- [GenerateArmTemplate](#artifacts_generatearmtemplate)
+- [Get](#artifacts_get)
+- [List](#artifacts_list)
+
+## BastionHosts
+
+- [CreateOrUpdate](#bastionhosts_createorupdate)
+- [Delete](#bastionhosts_delete)
+- [Get](#bastionhosts_get)
+- [List](#bastionhosts_list)
+- [Update](#bastionhosts_update)
+
+## Costs
+
+- [CreateOrUpdate](#costs_createorupdate)
+- [Get](#costs_get)
+- [List](#costs_list)
+
+## CustomImages
+
+- [CreateOrUpdate](#customimages_createorupdate)
+- [Delete](#customimages_delete)
+- [Get](#customimages_get)
+- [List](#customimages_list)
+- [Update](#customimages_update)
+
+## Disks
+
+- [Attach](#disks_attach)
+- [CreateOrUpdate](#disks_createorupdate)
+- [Delete](#disks_delete)
+- [Detach](#disks_detach)
+- [Get](#disks_get)
+- [List](#disks_list)
+- [Update](#disks_update)
+
+## Environments
+
+- [CreateOrUpdate](#environments_createorupdate)
+- [Delete](#environments_delete)
+- [Get](#environments_get)
+- [List](#environments_list)
+- [Update](#environments_update)
+
+## Formulas
+
+- [CreateOrUpdate](#formulas_createorupdate)
+- [Delete](#formulas_delete)
+- [Get](#formulas_get)
+- [List](#formulas_list)
+- [Update](#formulas_update)
+
+## GalleryImages
+
+- [Get](#galleryimages_get)
+- [List](#galleryimages_list)
+
+## GlobalSchedules
+
+- [CreateOrUpdate](#globalschedules_createorupdate)
+- [Delete](#globalschedules_delete)
+- [Execute](#globalschedules_execute)
+- [GetByResourceGroup](#globalschedules_getbyresourcegroup)
+- [List](#globalschedules_list)
+- [ListByResourceGroup](#globalschedules_listbyresourcegroup)
+- [Retarget](#globalschedules_retarget)
+- [Update](#globalschedules_update)
+
+## LabSecrets
+
+- [CreateOrUpdate](#labsecrets_createorupdate)
+- [Delete](#labsecrets_delete)
+- [Get](#labsecrets_get)
+- [List](#labsecrets_list)
+- [Update](#labsecrets_update)
+
+## Labs
+
+- [ClaimAnyVm](#labs_claimanyvm)
+- [CreateEnvironment](#labs_createenvironment)
+- [CreateOrUpdate](#labs_createorupdate)
+- [Delete](#labs_delete)
+- [EnsureCurrentUserProfile](#labs_ensurecurrentuserprofile)
+- [ExportResourceUsage](#labs_exportresourceusage)
+- [GenerateUploadUri](#labs_generateuploaduri)
+- [GetByResourceGroup](#labs_getbyresourcegroup)
+- [ImportVirtualMachine](#labs_importvirtualmachine)
+- [List](#labs_list)
+- [ListByResourceGroup](#labs_listbyresourcegroup)
+- [ListVhds](#labs_listvhds)
+- [Update](#labs_update)
+
+## NotificationChannels
+
+- [CreateOrUpdate](#notificationchannels_createorupdate)
+- [Delete](#notificationchannels_delete)
+- [Get](#notificationchannels_get)
+- [List](#notificationchannels_list)
+- [Notify](#notificationchannels_notify)
+- [Update](#notificationchannels_update)
+
+## Operations
+
+- [Get](#operations_get)
+
+## Policies
+
+- [CreateOrUpdate](#policies_createorupdate)
+- [Delete](#policies_delete)
+- [Get](#policies_get)
+- [List](#policies_list)
+- [Update](#policies_update)
+
+## PolicySets
+
+- [EvaluatePolicies](#policysets_evaluatepolicies)
+- [List](#policysets_list)
+
+## ProviderOperations
+
+- [List](#provideroperations_list)
+
+## Schedules
+
+- [CreateOrUpdate](#schedules_createorupdate)
+- [Delete](#schedules_delete)
+- [Execute](#schedules_execute)
+- [Get](#schedules_get)
+- [List](#schedules_list)
+- [ListApplicable](#schedules_listapplicable)
+- [Update](#schedules_update)
+
+## Secrets
+
+- [CreateOrUpdate](#secrets_createorupdate)
+- [Delete](#secrets_delete)
+- [Get](#secrets_get)
+- [List](#secrets_list)
+- [Update](#secrets_update)
+
+## ServiceFabricSchedules
+
+- [CreateOrUpdate](#servicefabricschedules_createorupdate)
+- [Delete](#servicefabricschedules_delete)
+- [Execute](#servicefabricschedules_execute)
+- [Get](#servicefabricschedules_get)
+- [List](#servicefabricschedules_list)
+- [Update](#servicefabricschedules_update)
+
+## ServiceFabrics
+
+- [CreateOrUpdate](#servicefabrics_createorupdate)
+- [Delete](#servicefabrics_delete)
+- [Get](#servicefabrics_get)
+- [List](#servicefabrics_list)
+- [ListApplicableSchedules](#servicefabrics_listapplicableschedules)
+- [Start](#servicefabrics_start)
+- [Stop](#servicefabrics_stop)
+- [Update](#servicefabrics_update)
+
+## ServiceRunners
+
+- [CreateOrUpdate](#servicerunners_createorupdate)
+- [Delete](#servicerunners_delete)
+- [Get](#servicerunners_get)
+- [List](#servicerunners_list)
+
+## SharedGalleries
+
+- [CreateOrUpdate](#sharedgalleries_createorupdate)
+- [Delete](#sharedgalleries_delete)
+- [Get](#sharedgalleries_get)
+- [List](#sharedgalleries_list)
+- [Update](#sharedgalleries_update)
+
+## SharedImages
+
+- [CreateOrUpdate](#sharedimages_createorupdate)
+- [Delete](#sharedimages_delete)
+- [Get](#sharedimages_get)
+- [List](#sharedimages_list)
+- [Update](#sharedimages_update)
+
+## Users
+
+- [CreateOrUpdate](#users_createorupdate)
+- [Delete](#users_delete)
+- [Get](#users_get)
+- [List](#users_list)
+- [Update](#users_update)
+
+## VirtualMachineSchedules
+
+- [CreateOrUpdate](#virtualmachineschedules_createorupdate)
+- [Delete](#virtualmachineschedules_delete)
+- [Execute](#virtualmachineschedules_execute)
+- [Get](#virtualmachineschedules_get)
+- [List](#virtualmachineschedules_list)
+- [Update](#virtualmachineschedules_update)
+
+## VirtualMachines
+
+- [AddDataDisk](#virtualmachines_adddatadisk)
+- [ApplyArtifacts](#virtualmachines_applyartifacts)
+- [Claim](#virtualmachines_claim)
+- [ClearArtifactResults](#virtualmachines_clearartifactresults)
+- [CreateOrUpdate](#virtualmachines_createorupdate)
+- [Delete](#virtualmachines_delete)
+- [DetachDataDisk](#virtualmachines_detachdatadisk)
+- [Get](#virtualmachines_get)
+- [GetRdpFileContents](#virtualmachines_getrdpfilecontents)
+- [List](#virtualmachines_list)
+- [ListApplicableSchedules](#virtualmachines_listapplicableschedules)
+- [Redeploy](#virtualmachines_redeploy)
+- [Resize](#virtualmachines_resize)
+- [Restart](#virtualmachines_restart)
+- [Start](#virtualmachines_start)
+- [Stop](#virtualmachines_stop)
+- [TransferDisks](#virtualmachines_transferdisks)
+- [UnClaim](#virtualmachines_unclaim)
+- [Update](#virtualmachines_update)
+
+## VirtualNetworks
+
+- [CreateOrUpdate](#virtualnetworks_createorupdate)
+- [Delete](#virtualnetworks_delete)
+- [Get](#virtualnetworks_get)
+- [List](#virtualnetworks_list)
+- [Update](#virtualnetworks_update)
+### ArmTemplates_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArmTemplates Get. */
+public final class ArmTemplatesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ArmTemplates_Get.json
+ */
+ /**
+ * Sample code: ArmTemplates_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void armTemplatesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .armTemplates()
+ .getWithResponse(
+ "resourceGroupName", "{labName}", "{artifactSourceName}", "{armTemplateName}", Context.NONE);
+ }
+}
+```
+
+### ArmTemplates_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArmTemplates List. */
+public final class ArmTemplatesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ArmTemplates_List.json
+ */
+ /**
+ * Sample code: ArmTemplates_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void armTemplatesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .armTemplates()
+ .list("resourceGroupName", "{labName}", "{artifactSourceName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### ArtifactSources_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.EnableStatus;
+import com.azure.resourcemanager.devtestlabs.models.SourceControlType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ArtifactSources CreateOrUpdate. */
+public final class ArtifactSourcesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ArtifactSources_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: ArtifactSources_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactSourcesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .artifactSources()
+ .define("{artifactSourceName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withDisplayName("{displayName}")
+ .withUri("{artifactSourceUri}")
+ .withSourceType(SourceControlType.fromString("{VsoGit|GitHub|StorageAccount}"))
+ .withFolderPath("{folderPath}")
+ .withArmTemplateFolderPath("{armTemplateFolderPath}")
+ .withBranchRef("{branchRef}")
+ .withSecurityToken("{securityToken}")
+ .withStatus(EnableStatus.fromString("{Enabled|Disabled}"))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ArtifactSources_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources Delete. */
+public final class ArtifactSourcesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ArtifactSources_Delete.json
+ */
+ /**
+ * Sample code: ArtifactSources_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactSourcesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .artifactSources()
+ .deleteWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", Context.NONE);
+ }
+}
+```
+
+### ArtifactSources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources Get. */
+public final class ArtifactSourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ArtifactSources_Get.json
+ */
+ /**
+ * Sample code: ArtifactSources_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactSourcesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .artifactSources()
+ .getWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", Context.NONE);
+ }
+}
+```
+
+### ArtifactSources_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ArtifactSources List. */
+public final class ArtifactSourcesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ArtifactSources_List.json
+ */
+ /**
+ * Sample code: ArtifactSources_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactSourcesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.artifactSources().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### ArtifactSources_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ArtifactSource;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ArtifactSources Update. */
+public final class ArtifactSourcesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ArtifactSources_Update.json
+ */
+ /**
+ * Sample code: ArtifactSources_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactSourcesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ ArtifactSource resource =
+ manager
+ .artifactSources()
+ .getWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Artifacts_GenerateArmTemplate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.FileUploadOptions;
+import com.azure.resourcemanager.devtestlabs.models.GenerateArmTemplateRequest;
+
+/** Samples for Artifacts GenerateArmTemplate. */
+public final class ArtifactsGenerateArmTemplateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Artifacts_GenerateArmTemplate.json
+ */
+ /**
+ * Sample code: Artifacts_GenerateArmTemplate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactsGenerateArmTemplate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .artifacts()
+ .generateArmTemplateWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "{artifactSourceName}",
+ "{artifactName}",
+ new GenerateArmTemplateRequest()
+ .withVirtualMachineName("{vmName}")
+ .withLocation("{location}")
+ .withFileUploadOptions(FileUploadOptions.NONE),
+ Context.NONE);
+ }
+}
+```
+
+### Artifacts_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Artifacts Get. */
+public final class ArtifactsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Artifacts_Get.json
+ */
+ /**
+ * Sample code: Artifacts_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .artifacts()
+ .getWithResponse("resourceGroupName", "{labName}", "{artifactSourceName}", "{artifactName}", Context.NONE);
+ }
+}
+```
+
+### Artifacts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Artifacts List. */
+public final class ArtifactsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Artifacts_List.json
+ */
+ /**
+ * Sample code: Artifacts_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void artifactsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .artifacts()
+ .list("resourceGroupName", "{labName}", "{artifactSourceName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### BastionHosts_CreateOrUpdate
+
+```java
+/** Samples for BastionHosts CreateOrUpdate. */
+public final class BastionHostsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/BastionHosts_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: BastionHosts_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void bastionHostsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .bastionHosts()
+ .define("{bastionHostName}")
+ .withRegion("{location}")
+ .withExistingVirtualnetwork("resourceGroupName", "{labName}", "{virtualNetworkName}")
+ .create();
+ }
+}
+```
+
+### BastionHosts_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BastionHosts Delete. */
+public final class BastionHostsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/BastionHosts_Delete.json
+ */
+ /**
+ * Sample code: BastionHosts_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void bastionHostsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .bastionHosts()
+ .delete("resourceGroupName", "{labName}", "{virtualNetworkName}", "{bastionHostName}", Context.NONE);
+ }
+}
+```
+
+### BastionHosts_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BastionHosts Get. */
+public final class BastionHostsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/BastionHosts_Get.json
+ */
+ /**
+ * Sample code: BastionHosts_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void bastionHostsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .bastionHosts()
+ .getWithResponse(
+ "resourceGroupName", "{labName}", "{virtualNetworkName}", "{bastionHostName}", Context.NONE);
+ }
+}
+```
+
+### BastionHosts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BastionHosts List. */
+public final class BastionHostsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/BastionHosts_List.json
+ */
+ /**
+ * Sample code: BastionHosts_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void bastionHostsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .bastionHosts()
+ .list("resourceGroupName", "{labName}", "{virtualNetworkName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### BastionHosts_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.BastionHost;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for BastionHosts Update. */
+public final class BastionHostsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/BastionHosts_Update.json
+ */
+ /**
+ * Sample code: BastionHosts_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void bastionHostsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ BastionHost resource =
+ manager
+ .bastionHosts()
+ .getWithResponse(
+ "resourceGroupName", "{labName}", "{virtualNetworkName}", "{bastionHostName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Costs_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.CostThresholdProperties;
+import com.azure.resourcemanager.devtestlabs.models.CostThresholdStatus;
+import com.azure.resourcemanager.devtestlabs.models.ReportingCycleType;
+import com.azure.resourcemanager.devtestlabs.models.TargetCostStatus;
+import java.time.OffsetDateTime;
+import java.util.Arrays;
+
+/** Samples for Costs CreateOrUpdate. */
+public final class CostsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Costs_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Costs_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void costsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .costs()
+ .define("targetCost")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withCurrencyCode("USD")
+ .withStartDateTime(OffsetDateTime.parse("2020-12-01T00:00:00Z"))
+ .withEndDateTime(OffsetDateTime.parse("2020-12-31T23:59:59Z"))
+ .withStatus(TargetCostStatus.ENABLED)
+ .withTarget(100)
+ .withCostThresholds(
+ Arrays
+ .asList(
+ new CostThresholdProperties()
+ .withThresholdId("00000000-0000-0000-0000-000000000001")
+ .withDisplayOnChart(CostThresholdStatus.DISABLED)
+ .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED)
+ .withThresholdValue(25.0),
+ new CostThresholdProperties()
+ .withThresholdId("00000000-0000-0000-0000-000000000002")
+ .withDisplayOnChart(CostThresholdStatus.ENABLED)
+ .withSendNotificationWhenExceeded(CostThresholdStatus.ENABLED)
+ .withThresholdValue(50.0),
+ new CostThresholdProperties()
+ .withThresholdId("00000000-0000-0000-0000-000000000003")
+ .withDisplayOnChart(CostThresholdStatus.DISABLED)
+ .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED)
+ .withThresholdValue(75.0),
+ new CostThresholdProperties()
+ .withThresholdId("00000000-0000-0000-0000-000000000004")
+ .withDisplayOnChart(CostThresholdStatus.DISABLED)
+ .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED)
+ .withThresholdValue(100.0),
+ new CostThresholdProperties()
+ .withThresholdId("00000000-0000-0000-0000-000000000005")
+ .withDisplayOnChart(CostThresholdStatus.DISABLED)
+ .withSendNotificationWhenExceeded(CostThresholdStatus.DISABLED)
+ .withThresholdValue(125.0)))
+ .withCycleStartDateTime(OffsetDateTime.parse("2020-12-01T00:00:00.000Z"))
+ .withCycleEndDateTime(OffsetDateTime.parse("2020-12-31T00:00:00.000Z"))
+ .withCycleType(ReportingCycleType.CALENDAR_MONTH)
+ .create();
+ }
+}
+```
+
+### Costs_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Costs Get. */
+public final class CostsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Costs_Get.json
+ */
+ /**
+ * Sample code: Costs_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void costsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.costs().getWithResponse("resourceGroupName", "{labName}", "targetCost", null, Context.NONE);
+ }
+}
+```
+
+### Costs_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Costs List. */
+public final class CostsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Costs_List.json
+ */
+ /**
+ * Sample code: Costs_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void costsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.costs().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### CustomImages_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.LinuxOsState;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CustomImages CreateOrUpdate. */
+public final class CustomImagesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/CustomImages_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: CustomImages_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void customImagesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .customImages()
+ .define("{customImageName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withDescription("My Custom Image")
+ .withSourceVmId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}")
+ .withLinuxOsState(LinuxOsState.NON_DEPROVISIONED)
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### CustomImages_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomImages Delete. */
+public final class CustomImagesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/CustomImages_Delete.json
+ */
+ /**
+ * Sample code: CustomImages_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void customImagesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.customImages().delete("resourceGroupName", "{labName}", "{customImageName}", Context.NONE);
+ }
+}
+```
+
+### CustomImages_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomImages Get. */
+public final class CustomImagesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/CustomImages_Get.json
+ */
+ /**
+ * Sample code: CustomImages_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void customImagesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.customImages().getWithResponse("resourceGroupName", "{labName}", "{customImageName}", Context.NONE);
+ }
+}
+```
+
+### CustomImages_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CustomImages List. */
+public final class CustomImagesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/CustomImages_List.json
+ */
+ /**
+ * Sample code: CustomImages_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void customImagesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.customImages().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### CustomImages_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.CustomImage;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for CustomImages Update. */
+public final class CustomImagesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/CustomImages_Update.json
+ */
+ /**
+ * Sample code: CustomImages_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void customImagesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ CustomImage resource =
+ manager
+ .customImages()
+ .getWithResponse("resourceGroupName", "{labName}", "{customImageName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue2")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Disks_Attach
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.AttachDiskProperties;
+
+/** Samples for Disks Attach. */
+public final class DisksAttachSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Disks_Attach.json
+ */
+ /**
+ * Sample code: Disks_Attach.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void disksAttach(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .disks()
+ .attach(
+ "resourceGroupName",
+ "{labName}",
+ "{userId}",
+ "{diskName}",
+ new AttachDiskProperties()
+ .withLeasedByLabVmId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"),
+ Context.NONE);
+ }
+}
+```
+
+### Disks_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.StorageType;
+
+/** Samples for Disks CreateOrUpdate. */
+public final class DisksCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Disks_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Disks_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void disksCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .disks()
+ .define("{diskName}")
+ .withRegion("{location}")
+ .withExistingUser("resourceGroupName", "{labName}", "{userId}")
+ .withDiskType(StorageType.STANDARD)
+ .withDiskSizeGiB(1023)
+ .withLeasedByLabVmId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/vmName")
+ .create();
+ }
+}
+```
+
+### Disks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Disks Delete. */
+public final class DisksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Disks_Delete.json
+ */
+ /**
+ * Sample code: Disks_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void disksDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.disks().delete("resourceGroupName", "{labName}", "{userId}", "{diskName}", Context.NONE);
+ }
+}
+```
+
+### Disks_Detach
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.DetachDiskProperties;
+
+/** Samples for Disks Detach. */
+public final class DisksDetachSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Disks_Detach.json
+ */
+ /**
+ * Sample code: Disks_Detach.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void disksDetach(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .disks()
+ .detach(
+ "resourceGroupName",
+ "{labName}",
+ "{userId}",
+ "{diskName}",
+ new DetachDiskProperties()
+ .withLeasedByLabVmId(
+ "/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"),
+ Context.NONE);
+ }
+}
+```
+
+### Disks_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Disks Get. */
+public final class DisksGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Disks_Get.json
+ */
+ /**
+ * Sample code: Disks_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void disksGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.disks().getWithResponse("resourceGroupName", "{labName}", "@me", "{diskName}", Context.NONE);
+ }
+}
+```
+
+### Disks_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Disks List. */
+public final class DisksListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Disks_List.json
+ */
+ /**
+ * Sample code: Disks_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void disksList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.disks().list("resourceGroupName", "{labName}", "@me", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Disks_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.Disk;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Disks Update. */
+public final class DisksUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Disks_Update.json
+ */
+ /**
+ * Sample code: Disks_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void disksUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ Disk resource =
+ manager
+ .disks()
+ .getWithResponse("resourceGroupName", "{labName}", "@me", "diskName", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Environments_CreateOrUpdate
+
+```java
+/** Samples for Environments CreateOrUpdate. */
+public final class EnvironmentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Environments_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Environments_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void environmentsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .environments()
+ .define("{environmentName}")
+ .withRegion((String) null)
+ .withExistingUser("resourceGroupName", "{labName}", "@me")
+ .create();
+ }
+}
+```
+
+### Environments_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Environments Delete. */
+public final class EnvironmentsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Environments_Delete.json
+ */
+ /**
+ * Sample code: Environments_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void environmentsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.environments().delete("resourceGroupName", "{labName}", "@me", "{environmentName}", Context.NONE);
+ }
+}
+```
+
+### Environments_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Environments Get. */
+public final class EnvironmentsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Environments_Get.json
+ */
+ /**
+ * Sample code: Environments_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void environmentsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .environments()
+ .getWithResponse("resourceGroupName", "{labName}", "@me", "{environmentName}", Context.NONE);
+ }
+}
+```
+
+### Environments_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Environments List. */
+public final class EnvironmentsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Environments_List.json
+ */
+ /**
+ * Sample code: Environments_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void environmentsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.environments().list("resourceGroupName", "{labName}", "@me", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Environments_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.DtlEnvironment;
+
+/** Samples for Environments Update. */
+public final class EnvironmentsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Environments_Update.json
+ */
+ /**
+ * Sample code: Environments_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void environmentsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ DtlEnvironment resource =
+ manager
+ .environments()
+ .getWithResponse("resourceGroupName", "{labName}", "@me", "{environmentName}", Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+}
+```
+
+### Formulas_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties;
+import com.azure.resourcemanager.devtestlabs.models.InboundNatRule;
+import com.azure.resourcemanager.devtestlabs.models.StorageType;
+import com.azure.resourcemanager.devtestlabs.models.TransportProtocol;
+import java.util.Arrays;
+
+/** Samples for Formulas CreateOrUpdate. */
+public final class FormulasCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Formulas_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Formulas_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void formulasCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .formulas()
+ .define("{formulaName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withDescription("Formula using a Linux base")
+ .withLocationPropertiesLocation("{location}")
+ .withNotes("Ubuntu Server 20.10")
+ .withSize("Standard_B1ms")
+ .withUsername("user")
+ .withIsAuthenticationWithSshKey(false)
+ .withLabSubnetName("Dtl{labName}Subnet")
+ .withLabVirtualNetworkId("/virtualnetworks/dtl{labName}")
+ .withDisallowPublicIpAddress(true)
+ .withArtifacts(
+ Arrays
+ .asList(
+ new ArtifactInstallProperties()
+ .withArtifactId("/artifactsources/{artifactSourceName}/artifacts/linux-install-nodejs")
+ .withParameters(Arrays.asList())))
+ .withAllowClaim(false)
+ .withStorageType(StorageType.STANDARD)
+ .withOffer("0001-com-ubuntu-server-groovy")
+ .withPublisher("canonical")
+ .withSku("20_10")
+ .withOsTypeGalleryImageReferenceOsType("Linux")
+ .withVersion("latest")
+ .withInboundNatRules(
+ Arrays.asList(new InboundNatRule().withTransportProtocol(TransportProtocol.TCP).withBackendPort(22)))
+ .create();
+ }
+}
+```
+
+### Formulas_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Formulas Delete. */
+public final class FormulasDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Formulas_Delete.json
+ */
+ /**
+ * Sample code: Formulas_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void formulasDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.formulas().deleteWithResponse("resourceGroupName", "{labName}", "{formulaName}", Context.NONE);
+ }
+}
+```
+
+### Formulas_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Formulas Get. */
+public final class FormulasGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Formulas_Get.json
+ */
+ /**
+ * Sample code: Formulas_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void formulasGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.formulas().getWithResponse("resourceGroupName", "{labName}", "{formulaName}", Context.NONE);
+ }
+}
+```
+
+### Formulas_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Formulas List. */
+public final class FormulasListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Formulas_List.json
+ */
+ /**
+ * Sample code: Formulas_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void formulasList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.formulas().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Formulas_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.Formula;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Formulas Update. */
+public final class FormulasUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Formulas_Update.json
+ */
+ /**
+ * Sample code: Formulas_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void formulasUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ Formula resource =
+ manager
+ .formulas()
+ .getWithResponse("resourceGroupName", "{labName}", "{formulaName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### GalleryImages_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GalleryImages Get. */
+public final class GalleryImagesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GalleryImages_Get.json
+ */
+ /**
+ * Sample code: GalleryImages_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void galleryImagesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.galleryImages().getWithResponse("resourceGroupName", "{labName}", "{name}", Context.NONE);
+ }
+}
+```
+
+### GalleryImages_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GalleryImages List. */
+public final class GalleryImagesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GalleryImages_List.json
+ */
+ /**
+ * Sample code: GalleryImages_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void galleryImagesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.galleryImages().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### GlobalSchedules_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.EnableStatus;
+import java.util.Arrays;
+
+/** Samples for GlobalSchedules CreateOrUpdate. */
+public final class GlobalSchedulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: GlobalSchedules_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .globalSchedules()
+ .define("labvmautostart")
+ .withRegion("southeastasia")
+ .withExistingResourceGroup("resourceGroupName")
+ .withStatus(EnableStatus.ENABLED)
+ .withTaskType("LabVmsStartupTask")
+ .withTimeZoneId("Hawaiian Standard Time")
+ .withWeekdays(Arrays.asList("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"))
+ .withTime("0700")
+ .create();
+ }
+}
+```
+
+### GlobalSchedules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GlobalSchedules Delete. */
+public final class GlobalSchedulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_Delete.json
+ */
+ /**
+ * Sample code: GlobalSchedules_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.globalSchedules().deleteWithResponse("resourceGroupName", "labvmautostart", Context.NONE);
+ }
+}
+```
+
+### GlobalSchedules_Execute
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GlobalSchedules Execute. */
+public final class GlobalSchedulesExecuteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_Execute.json
+ */
+ /**
+ * Sample code: GlobalSchedules_Execute.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.globalSchedules().execute("resourceGroupName", "labvmautostart", Context.NONE);
+ }
+}
+```
+
+### GlobalSchedules_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GlobalSchedules GetByResourceGroup. */
+public final class GlobalSchedulesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_Get.json
+ */
+ /**
+ * Sample code: GlobalSchedules_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.globalSchedules().getByResourceGroupWithResponse("resourceGroupName", "labvmautostart", Context.NONE);
+ }
+}
+```
+
+### GlobalSchedules_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GlobalSchedules List. */
+public final class GlobalSchedulesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_ListBySubscription.json
+ */
+ /**
+ * Sample code: GlobalSchedules_ListBySubscription.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesListBySubscription(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.globalSchedules().list(null, null, null, Context.NONE);
+ }
+}
+```
+
+### GlobalSchedules_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for GlobalSchedules ListByResourceGroup. */
+public final class GlobalSchedulesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_ListByResourceGroup.json
+ */
+ /**
+ * Sample code: GlobalSchedules_ListByResourceGroup.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesListByResourceGroup(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.globalSchedules().listByResourceGroup("resourceGroupName", null, null, null, Context.NONE);
+ }
+}
+```
+
+### GlobalSchedules_Retarget
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.RetargetScheduleProperties;
+
+/** Samples for GlobalSchedules Retarget. */
+public final class GlobalSchedulesRetargetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_Retarget.json
+ */
+ /**
+ * Sample code: GlobalSchedules_Retarget.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesRetarget(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .globalSchedules()
+ .retarget(
+ "resourceGroupName",
+ "{scheduleName}",
+ new RetargetScheduleProperties()
+ .withCurrentResourceId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{targetLab}")
+ .withTargetResourceId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{currentLab}"),
+ Context.NONE);
+ }
+}
+```
+
+### GlobalSchedules_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.Schedule;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for GlobalSchedules Update. */
+public final class GlobalSchedulesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/GlobalSchedules_Update.json
+ */
+ /**
+ * Sample code: GlobalSchedules_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void globalSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ Schedule resource =
+ manager
+ .globalSchedules()
+ .getByResourceGroupWithResponse("resourceGroupName", "labvmautostart", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### LabSecrets_CreateOrUpdate
+
+```java
+/** Samples for LabSecrets CreateOrUpdate. */
+public final class LabSecretsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/LabSecrets_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: LabSecrets_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labSecretsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .labSecrets()
+ .define("{secretName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withValue("{secretValue}")
+ .withEnabledForArtifacts(true)
+ .withEnabledForVmCreation(true)
+ .withEnabledForArmEnvironments(true)
+ .create();
+ }
+}
+```
+
+### LabSecrets_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LabSecrets Delete. */
+public final class LabSecretsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/LabSecrets_Delete.json
+ */
+ /**
+ * Sample code: LabSecrets_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labSecretsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labSecrets().delete("resourceGroupName", "{labName}", "{secretName}", Context.NONE);
+ }
+}
+```
+
+### LabSecrets_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LabSecrets Get. */
+public final class LabSecretsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/LabSecrets_Get.json
+ */
+ /**
+ * Sample code: LabSecrets_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labSecretsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labSecrets().getWithResponse("resourceGroupName", "{labName}", "{secretName}", Context.NONE);
+ }
+}
+```
+
+### LabSecrets_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LabSecrets List. */
+public final class LabSecretsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/LabSecrets_List.json
+ */
+ /**
+ * Sample code: LabSecrets_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labSecretsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labSecrets().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### LabSecrets_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.LabSecret;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for LabSecrets Update. */
+public final class LabSecretsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/LabSecrets_Update.json
+ */
+ /**
+ * Sample code: LabSecrets_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labSecretsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ LabSecret resource =
+ manager
+ .labSecrets()
+ .getWithResponse("resourceGroupName", "{labName}", "{secretName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Labs_ClaimAnyVm
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Labs ClaimAnyVm. */
+public final class LabsClaimAnyVmSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_ClaimAnyVm.json
+ */
+ /**
+ * Sample code: Labs_ClaimAnyVm.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsClaimAnyVm(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labs().claimAnyVm("resourceGroupName", "{labName}", Context.NONE);
+ }
+}
+```
+
+### Labs_CreateEnvironment
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachineCreationParameterInner;
+import com.azure.resourcemanager.devtestlabs.models.StorageType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Labs CreateEnvironment. */
+public final class LabsCreateEnvironmentSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_CreateEnvironment.json
+ */
+ /**
+ * Sample code: Labs_CreateEnvironment.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsCreateEnvironment(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .labs()
+ .createEnvironment(
+ "resourceGroupName",
+ "{labName}",
+ new LabVirtualMachineCreationParameterInner()
+ .withName("{vmName}")
+ .withLocation("{location}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withSize("Standard_A2_v2")
+ .withUsername("{userName}")
+ .withPassword("{userPassword}")
+ .withLabSubnetName("{virtualnetwork-subnet-name}")
+ .withLabVirtualNetworkId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}")
+ .withDisallowPublicIpAddress(true)
+ .withAllowClaim(true)
+ .withStorageType(StorageType.STANDARD)
+ .withOffer("UbuntuServer")
+ .withPublisher("Canonical")
+ .withSku("16.04-LTS")
+ .withOsTypeGalleryImageReferenceOsType("Linux")
+ .withVersion("Latest"),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Labs_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.StorageType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Labs CreateOrUpdate. */
+public final class LabsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Labs_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .labs()
+ .define("{labName}")
+ .withRegion("{location}")
+ .withExistingResourceGroup("resourceGroupName")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withLabStorageType(StorageType.fromString("{Standard|Premium}"))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Labs_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Labs Delete. */
+public final class LabsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_Delete.json
+ */
+ /**
+ * Sample code: Labs_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labs().delete("resourceGroupName", "{labName}", Context.NONE);
+ }
+}
+```
+
+### Labs_EnsureCurrentUserProfile
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Labs EnsureCurrentUserProfile. */
+public final class LabsEnsureCurrentUserProfileSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_EnsureCurrentUserProfile.json
+ */
+ /**
+ * Sample code: Labs_EnsureCurrentUserProfile.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsEnsureCurrentUserProfile(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labs().ensureCurrentUserProfileWithResponse("resourceGroupName", "{labName}", Context.NONE);
+ }
+}
+```
+
+### Labs_ExportResourceUsage
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ExportResourceUsageParameters;
+import java.time.OffsetDateTime;
+
+/** Samples for Labs ExportResourceUsage. */
+public final class LabsExportResourceUsageSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_ExportResourceUsage.json
+ */
+ /**
+ * Sample code: Labs_ExportResourceUsage.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsExportResourceUsage(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .labs()
+ .exportResourceUsage(
+ "resourceGroupName",
+ "{labName}",
+ new ExportResourceUsageParameters()
+ .withBlobStorageAbsoluteSasUri(
+ "https://invalid.blob.core.windows.net/export.blob?sv=2015-07-08&sig={sas}&sp=rcw")
+ .withUsageStartDate(OffsetDateTime.parse("2020-12-01T00:00:00Z")),
+ Context.NONE);
+ }
+}
+```
+
+### Labs_GenerateUploadUri
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.GenerateUploadUriParameter;
+
+/** Samples for Labs GenerateUploadUri. */
+public final class LabsGenerateUploadUriSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_GenerateUploadUri.json
+ */
+ /**
+ * Sample code: Labs_GenerateUploadUri.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsGenerateUploadUri(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .labs()
+ .generateUploadUriWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ new GenerateUploadUriParameter().withBlobName("{blob-name}"),
+ Context.NONE);
+ }
+}
+```
+
+### Labs_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Labs GetByResourceGroup. */
+public final class LabsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_Get.json
+ */
+ /**
+ * Sample code: Labs_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labs().getByResourceGroupWithResponse("resourceGroupName", "{labName}", Context.NONE);
+ }
+}
+```
+
+### Labs_ImportVirtualMachine
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ImportLabVirtualMachineRequest;
+
+/** Samples for Labs ImportVirtualMachine. */
+public final class LabsImportVirtualMachineSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_ImportVirtualMachine.json
+ */
+ /**
+ * Sample code: Labs_ImportVirtualMachine.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsImportVirtualMachine(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .labs()
+ .importVirtualMachine(
+ "resourceGroupName",
+ "{labName}",
+ new ImportLabVirtualMachineRequest()
+ .withSourceVirtualMachineResourceId(
+ "/subscriptions/{subscriptionId}/resourceGroups/{otherResourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}")
+ .withDestinationVirtualMachineName("{vmName}"),
+ Context.NONE);
+ }
+}
+```
+
+### Labs_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Labs List. */
+public final class LabsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_ListBySubscription.json
+ */
+ /**
+ * Sample code: Labs_ListBySubscription.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsListBySubscription(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labs().list(null, null, null, Context.NONE);
+ }
+}
+```
+
+### Labs_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Labs ListByResourceGroup. */
+public final class LabsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_ListByResourceGroup.json
+ */
+ /**
+ * Sample code: Labs_ListByResourceGroup.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsListByResourceGroup(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labs().listByResourceGroup("resourceGroupName", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Labs_ListVhds
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Labs ListVhds. */
+public final class LabsListVhdsSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_ListVhds.json
+ */
+ /**
+ * Sample code: Labs_ListVhds.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsListVhds(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.labs().listVhds("resourceGroupName", "{labName}", Context.NONE);
+ }
+}
+```
+
+### Labs_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.Lab;
+
+/** Samples for Labs Update. */
+public final class LabsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Labs_Update.json
+ */
+ /**
+ * Sample code: Labs_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void labsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ Lab resource =
+ manager.labs().getByResourceGroupWithResponse("resourceGroupName", "{labName}", Context.NONE).getValue();
+ resource.update().apply();
+ }
+}
+```
+
+### NotificationChannels_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.Event;
+import com.azure.resourcemanager.devtestlabs.models.NotificationChannelEventType;
+import java.util.Arrays;
+
+/** Samples for NotificationChannels CreateOrUpdate. */
+public final class NotificationChannelsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/NotificationChannels_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: NotificationChannels_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void notificationChannelsCreateOrUpdate(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .notificationChannels()
+ .define("{notificationChannelName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withWebhookUrl("{webhookUrl}")
+ .withEmailRecipient("{email}")
+ .withNotificationLocale("en")
+ .withDescription("Integration configured for auto-shutdown")
+ .withEvents(Arrays.asList(new Event().withEventName(NotificationChannelEventType.AUTO_SHUTDOWN)))
+ .create();
+ }
+}
+```
+
+### NotificationChannels_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NotificationChannels Delete. */
+public final class NotificationChannelsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/NotificationChannels_Delete.json
+ */
+ /**
+ * Sample code: NotificationChannels_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void notificationChannelsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .notificationChannels()
+ .deleteWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", Context.NONE);
+ }
+}
+```
+
+### NotificationChannels_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NotificationChannels Get. */
+public final class NotificationChannelsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/NotificationChannels_Get.json
+ */
+ /**
+ * Sample code: NotificationChannels_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void notificationChannelsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .notificationChannels()
+ .getWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", Context.NONE);
+ }
+}
+```
+
+### NotificationChannels_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for NotificationChannels List. */
+public final class NotificationChannelsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/NotificationChannels_List.json
+ */
+ /**
+ * Sample code: NotificationChannels_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void notificationChannelsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.notificationChannels().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### NotificationChannels_Notify
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.NotificationChannelEventType;
+import com.azure.resourcemanager.devtestlabs.models.NotifyParameters;
+
+/** Samples for NotificationChannels Notify. */
+public final class NotificationChannelsNotifySamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/NotificationChannels_Notify.json
+ */
+ /**
+ * Sample code: NotificationChannels_Notify.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void notificationChannelsNotify(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .notificationChannels()
+ .notifyWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "{notificationChannelName}",
+ new NotifyParameters()
+ .withEventName(NotificationChannelEventType.AUTO_SHUTDOWN)
+ .withJsonPayload(
+ "{\"eventType\":\"AutoShutdown\",\"subscriptionId\":\"{subscriptionId}\",\"resourceGroupName\":\"resourceGroupName\",\"labName\":\"{labName}\"}"),
+ Context.NONE);
+ }
+}
+```
+
+### NotificationChannels_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.NotificationChannel;
+
+/** Samples for NotificationChannels Update. */
+public final class NotificationChannelsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/NotificationChannels_Update.json
+ */
+ /**
+ * Sample code: NotificationChannels_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void notificationChannelsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ NotificationChannel resource =
+ manager
+ .notificationChannels()
+ .getWithResponse("resourceGroupName", "{labName}", "{notificationChannelName}", Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+}
+```
+
+### Operations_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations Get. */
+public final class OperationsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Operations_Get.json
+ */
+ /**
+ * Sample code: Operations_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void operationsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.operations().getWithResponse(null, "{operationName}", Context.NONE);
+ }
+}
+```
+
+### Policies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.PolicyEvaluatorType;
+import com.azure.resourcemanager.devtestlabs.models.PolicyFactName;
+import com.azure.resourcemanager.devtestlabs.models.PolicyStatus;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Policies CreateOrUpdate. */
+public final class PoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Policies_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Policies_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void policiesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .policies()
+ .define("{policyName}")
+ .withRegion("{location}")
+ .withExistingPolicyset("resourceGroupName", "{labName}", "{policySetName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withDescription("{policyDescription}")
+ .withStatus(PolicyStatus.fromString("{policyStatus}"))
+ .withFactName(PolicyFactName.fromString("{policyFactName}"))
+ .withFactData("{policyFactData}")
+ .withThreshold("{policyThreshold}")
+ .withEvaluatorType(PolicyEvaluatorType.fromString("{policyEvaluatorType}"))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Policies_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Policies Delete. */
+public final class PoliciesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Policies_Delete.json
+ */
+ /**
+ * Sample code: Policies_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void policiesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .policies()
+ .deleteWithResponse("resourceGroupName", "{labName}", "{policySetName}", "{policyName}", Context.NONE);
+ }
+}
+```
+
+### Policies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Policies Get. */
+public final class PoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Policies_Get.json
+ */
+ /**
+ * Sample code: Policies_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void policiesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .policies()
+ .getWithResponse("resourceGroupName", "{labName}", "{policySetName}", "{policyName}", Context.NONE);
+ }
+}
+```
+
+### Policies_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Policies List. */
+public final class PoliciesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Policies_List.json
+ */
+ /**
+ * Sample code: Policies_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void policiesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.policies().list("resourceGroupName", "{labName}", "{policySetName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Policies_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.Policy;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Policies Update. */
+public final class PoliciesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Policies_Update.json
+ */
+ /**
+ * Sample code: Policies_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void policiesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ Policy resource =
+ manager
+ .policies()
+ .getWithResponse("resourceGroupName", "{labName}", "{policySetName}", "{policyName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### PolicySets_EvaluatePolicies
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesProperties;
+import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesRequest;
+import java.util.Arrays;
+
+/** Samples for PolicySets EvaluatePolicies. */
+public final class PolicySetsEvaluatePoliciesSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/PolicySets_EvaluatePolicies.json
+ */
+ /**
+ * Sample code: PolicySets_EvaluatePolicies.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void policySetsEvaluatePolicies(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .policySets()
+ .evaluatePoliciesWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "{policySetName}",
+ new EvaluatePoliciesRequest()
+ .withPolicies(
+ Arrays
+ .asList(new EvaluatePoliciesProperties().withFactName("LabVmCount").withValueOffset("1"))),
+ Context.NONE);
+ }
+}
+```
+
+### PolicySets_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PolicySets List. */
+public final class PolicySetsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/PolicySets_List.json
+ */
+ /**
+ * Sample code: PolicySets_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void policySetsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.policySets().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### ProviderOperations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProviderOperations List. */
+public final class ProviderOperationsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ProviderOperations_List.json
+ */
+ /**
+ * Sample code: ProviderOperations_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void providerOperationsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.providerOperations().list(Context.NONE);
+ }
+}
+```
+
+### Schedules_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner;
+import com.azure.resourcemanager.devtestlabs.models.EnableStatus;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Schedules CreateOrUpdate. */
+public final class SchedulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Schedules_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Schedules_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void schedulesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .schedules()
+ .createOrUpdateWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "{scheduleName}",
+ new ScheduleInner()
+ .withLocation("{location}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withStatus(EnableStatus.fromString("{Enabled|Disabled}"))
+ .withTaskType("{myLabVmTaskType}")
+ .withTimeZoneId("Pacific Standard Time")
+ .withTargetResourceId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}")
+ .withWeekdays(Arrays.asList("Monday", "Wednesday", "Friday"))
+ .withTime("{timeOfTheDayTheScheduleWillOccurOnThoseDays}")
+ .withMinute(30)
+ .withStatusNotificationSettingsStatus(EnableStatus.fromString("{Enabled|Disabled}"))
+ .withTimeInMinutes(15)
+ .withWebhookUrl("{webhookUrl}")
+ .withEmailRecipient("{email}")
+ .withNotificationLocale("EN"),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Schedules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Schedules Delete. */
+public final class SchedulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Schedules_Delete.json
+ */
+ /**
+ * Sample code: Schedules_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void schedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.schedules().deleteWithResponse("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE);
+ }
+}
+```
+
+### Schedules_Execute
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Schedules Execute. */
+public final class SchedulesExecuteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Schedules_Execute.json
+ */
+ /**
+ * Sample code: Schedules_Execute.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void schedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.schedules().execute("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE);
+ }
+}
+```
+
+### Schedules_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Schedules Get. */
+public final class SchedulesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Schedules_Get.json
+ */
+ /**
+ * Sample code: Schedules_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void schedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.schedules().getWithResponse("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE);
+ }
+}
+```
+
+### Schedules_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Schedules List. */
+public final class SchedulesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Schedules_List.json
+ */
+ /**
+ * Sample code: Schedules_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void schedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.schedules().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Schedules_ListApplicable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Schedules ListApplicable. */
+public final class SchedulesListApplicableSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Schedules_ListApplicable.json
+ */
+ /**
+ * Sample code: Schedules_ListApplicable.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void schedulesListApplicable(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.schedules().listApplicable("resourceGroupName", "{labName}", "{scheduleName}", Context.NONE);
+ }
+}
+```
+
+### Schedules_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Schedules Update. */
+public final class SchedulesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Schedules_Update.json
+ */
+ /**
+ * Sample code: Schedules_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void schedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .schedules()
+ .updateWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "{scheduleName}",
+ new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Secrets_CreateOrUpdate
+
+```java
+/** Samples for Secrets CreateOrUpdate. */
+public final class SecretsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Secrets_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Secrets_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void secretsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .secrets()
+ .define("{secretName}")
+ .withRegion("{location}")
+ .withExistingUser("resourceGroupName", "{labName}", "{userName}")
+ .withValue("{secret}")
+ .create();
+ }
+}
+```
+
+### Secrets_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Secrets Delete. */
+public final class SecretsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Secrets_Delete.json
+ */
+ /**
+ * Sample code: Secrets_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void secretsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .secrets()
+ .deleteWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", Context.NONE);
+ }
+}
+```
+
+### Secrets_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Secrets Get. */
+public final class SecretsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Secrets_Get.json
+ */
+ /**
+ * Sample code: Secrets_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void secretsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.secrets().getWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", Context.NONE);
+ }
+}
+```
+
+### Secrets_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Secrets List. */
+public final class SecretsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Secrets_List.json
+ */
+ /**
+ * Sample code: Secrets_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void secretsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.secrets().list("resourceGroupName", "{labName}", "{userName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Secrets_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.Secret;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Secrets Update. */
+public final class SecretsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Secrets_Update.json
+ */
+ /**
+ * Sample code: Secrets_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void secretsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ Secret resource =
+ manager
+ .secrets()
+ .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{secretName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceFabricSchedules_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner;
+import com.azure.resourcemanager.devtestlabs.models.EnableStatus;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceFabricSchedules CreateOrUpdate. */
+public final class ServiceFabricSchedulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabricSchedules_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: ServiceFabricSchedules_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricSchedulesCreateOrUpdate(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabricSchedules()
+ .createOrUpdateWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "@me",
+ "{serviceFrabicName}",
+ "{scheduleName}",
+ new ScheduleInner()
+ .withLocation("{location}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withStatus(EnableStatus.fromString("{Enabled|Disabled}"))
+ .withTaskType(
+ "{Unknown|LabVmsShutdownTask|LabVmsStartupTask|LabVmReclamationTask|ComputeVmShutdownTask}")
+ .withTimeZoneId("Pacific Standard Time")
+ .withTargetResourceId(
+ "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/users/{uniqueIdentifier}/servicefabrics/{serviceFrabicName}")
+ .withWeekdays(
+ Arrays.asList("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"))
+ .withTime("19:00")
+ .withMinute(0)
+ .withStatusNotificationSettingsStatus(EnableStatus.fromString("{Enabled|Disabled}"))
+ .withTimeInMinutes(15)
+ .withWebhookUrl("{webhoolUrl}")
+ .withEmailRecipient("{email}")
+ .withNotificationLocale("EN"),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceFabricSchedules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabricSchedules Delete. */
+public final class ServiceFabricSchedulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabricSchedules_Delete.json
+ */
+ /**
+ * Sample code: ServiceFabricSchedules_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabricSchedules()
+ .deleteWithResponse(
+ "resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", Context.NONE);
+ }
+}
+```
+
+### ServiceFabricSchedules_Execute
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabricSchedules Execute. */
+public final class ServiceFabricSchedulesExecuteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabricSchedules_Execute.json
+ */
+ /**
+ * Sample code: ServiceFabricSchedules_Execute.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricSchedulesExecute(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabricSchedules()
+ .execute("resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", Context.NONE);
+ }
+}
+```
+
+### ServiceFabricSchedules_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabricSchedules Get. */
+public final class ServiceFabricSchedulesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabricSchedules_Get.json
+ */
+ /**
+ * Sample code: ServiceFabricSchedules_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabricSchedules()
+ .getWithResponse(
+ "resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", "{scheduleName}", Context.NONE);
+ }
+}
+```
+
+### ServiceFabricSchedules_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabricSchedules List. */
+public final class ServiceFabricSchedulesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabricSchedules_List.json
+ */
+ /**
+ * Sample code: ServiceFabricSchedules_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricSchedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabricSchedules()
+ .list("resourceGroupName", "{labName}", "@me", "{serviceFrabicName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### ServiceFabricSchedules_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceFabricSchedules Update. */
+public final class ServiceFabricSchedulesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabricSchedules_Update.json
+ */
+ /**
+ * Sample code: ServiceFabricSchedules_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabricSchedules()
+ .updateWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "@me",
+ "{serviceFrabicName}",
+ "{scheduleName}",
+ new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceFabrics_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceFabrics CreateOrUpdate. */
+public final class ServiceFabricsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: ServiceFabrics_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabrics()
+ .define("{serviceFabricName}")
+ .withRegion("{location}")
+ .withExistingUser("resourceGroupName", "{labName}", "{userName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withExternalServiceFabricId("{serviceFabricId}")
+ .withEnvironmentId("{environmentId}")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceFabrics_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabrics Delete. */
+public final class ServiceFabricsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_Delete.json
+ */
+ /**
+ * Sample code: ServiceFabrics_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabrics()
+ .delete("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE);
+ }
+}
+```
+
+### ServiceFabrics_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabrics Get. */
+public final class ServiceFabricsGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_Get.json
+ */
+ /**
+ * Sample code: ServiceFabrics_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabrics()
+ .getWithResponse("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", null, Context.NONE);
+ }
+}
+```
+
+### ServiceFabrics_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabrics List. */
+public final class ServiceFabricsListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_List.json
+ */
+ /**
+ * Sample code: ServiceFabrics_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabrics()
+ .list("resourceGroupName", "{labName}", "{userName}", null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### ServiceFabrics_ListApplicableSchedules
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabrics ListApplicableSchedules. */
+public final class ServiceFabricsListApplicableSchedulesSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_ListApplicableSchedules.json
+ */
+ /**
+ * Sample code: ServiceFabrics_ListApplicableSchedules.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsListApplicableSchedules(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabrics()
+ .listApplicableSchedulesWithResponse(
+ "resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE);
+ }
+}
+```
+
+### ServiceFabrics_Start
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabrics Start. */
+public final class ServiceFabricsStartSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_Start.json
+ */
+ /**
+ * Sample code: ServiceFabrics_Start.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsStart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabrics()
+ .start("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE);
+ }
+}
+```
+
+### ServiceFabrics_Stop
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceFabrics Stop. */
+public final class ServiceFabricsStopSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_Stop.json
+ */
+ /**
+ * Sample code: ServiceFabrics_Stop.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsStop(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceFabrics()
+ .stop("resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", Context.NONE);
+ }
+}
+```
+
+### ServiceFabrics_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ServiceFabric;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceFabrics Update. */
+public final class ServiceFabricsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceFabrics_Update.json
+ */
+ /**
+ * Sample code: ServiceFabrics_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceFabricsUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ ServiceFabric resource =
+ manager
+ .serviceFabrics()
+ .getWithResponse(
+ "resourceGroupName", "{labName}", "{userName}", "{serviceFabricName}", null, Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceRunners_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.ManagedIdentityType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ServiceRunners CreateOrUpdate. */
+public final class ServiceRunnersCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceRunners_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: ServiceRunners_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceRunnersCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceRunners()
+ .define("{servicerunnerName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{devtestlabName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withTypeIdentityType(ManagedIdentityType.fromString("{identityType}"))
+ .withPrincipalId("{identityPrincipalId}")
+ .withTenantId("{identityTenantId}")
+ .withClientSecretUrl("{identityClientSecretUrl}")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### ServiceRunners_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceRunners Delete. */
+public final class ServiceRunnersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceRunners_Delete.json
+ */
+ /**
+ * Sample code: ServiceRunners_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceRunnersDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.serviceRunners().delete("resourceGroupName", "{devtestlabName}", "{servicerunnerName}", Context.NONE);
+ }
+}
+```
+
+### ServiceRunners_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceRunners Get. */
+public final class ServiceRunnersGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceRunners_Get.json
+ */
+ /**
+ * Sample code: ServiceRunners_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceRunnersGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .serviceRunners()
+ .getWithResponse("resourceGroupName", "{devtestlabName}", "{servicerunnerName}", Context.NONE);
+ }
+}
+```
+
+### ServiceRunners_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceRunners List. */
+public final class ServiceRunnersListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/ServiceRunners_List.json
+ */
+ /**
+ * Sample code: ServiceRunners_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void serviceRunnersList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.serviceRunners().list("resourceGroupName", "{devtestlabName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### SharedGalleries_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.EnableState;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SharedGalleries CreateOrUpdate. */
+public final class SharedGalleriesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedGalleries_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: SharedGalleries_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedGalleriesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .sharedGalleries()
+ .define("{sharedGalleryName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withGalleryId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.compute/galleries/{sharedGalleryName}")
+ .withAllowAllImages(EnableState.fromString("{Enabled|Disabled}"))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SharedGalleries_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedGalleries Delete. */
+public final class SharedGalleriesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedGalleries_Delete.json
+ */
+ /**
+ * Sample code: SharedGalleries_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedGalleriesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .sharedGalleries()
+ .deleteWithResponse("resourceGroupName", "{labName}", "{sharedGalleryName}", Context.NONE);
+ }
+}
+```
+
+### SharedGalleries_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedGalleries Get. */
+public final class SharedGalleriesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedGalleries_Get.json
+ */
+ /**
+ * Sample code: SharedGalleries_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedGalleriesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .sharedGalleries()
+ .getWithResponse("resourceGroupName", "{labName}", "{sharedGalleryName}", Context.NONE);
+ }
+}
+```
+
+### SharedGalleries_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedGalleries List. */
+public final class SharedGalleriesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedGalleries_List.json
+ */
+ /**
+ * Sample code: SharedGalleries_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedGalleriesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.sharedGalleries().list("resourceGroupName", "{labName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### SharedGalleries_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.SharedGallery;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SharedGalleries Update. */
+public final class SharedGalleriesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedGalleries_Update.json
+ */
+ /**
+ * Sample code: SharedGalleries_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedGalleriesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ SharedGallery resource =
+ manager
+ .sharedGalleries()
+ .getWithResponse("resourceGroupName", "{labName}", "{sharedGalleryName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SharedImages_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.devtestlabs.models.EnableState;
+import com.azure.resourcemanager.devtestlabs.models.ImageType;
+import com.azure.resourcemanager.devtestlabs.models.OsType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SharedImages CreateOrUpdate. */
+public final class SharedImagesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedImages_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: SharedImages_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedImagesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .sharedImages()
+ .define("{name}")
+ .withRegion("{location}")
+ .withExistingSharedgallery("resourceGroupName", "{labName}", "{sharedGalleryName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withDefinitionName("{definitionName}")
+ .withOsType(OsType.fromString("{osType}"))
+ .withImageType(ImageType.fromString("{imageType}"))
+ .withEnableState(EnableState.fromString("{enabledState}"))
+ .withDisplayName("{displayName}")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SharedImages_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedImages Delete. */
+public final class SharedImagesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedImages_Delete.json
+ */
+ /**
+ * Sample code: SharedImages_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedImagesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .sharedImages()
+ .deleteWithResponse("resourceGroupName", "{labName}", "{sharedGalleryName}", "{name}", Context.NONE);
+ }
+}
+```
+
+### SharedImages_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedImages Get. */
+public final class SharedImagesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedImages_Get.json
+ */
+ /**
+ * Sample code: SharedImages_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedImagesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .sharedImages()
+ .getWithResponse("resourceGroupName", "{labName}", "{sharedGalleryName}", "{name}", null, Context.NONE);
+ }
+}
+```
+
+### SharedImages_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedImages List. */
+public final class SharedImagesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedImages_List.json
+ */
+ /**
+ * Sample code: SharedImages_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedImagesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .sharedImages()
+ .list("resourceGroupName", "{labName}", "{sharedGalleryName}", null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### SharedImages_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.SharedImage;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SharedImages Update. */
+public final class SharedImagesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/SharedImages_Update.json
+ */
+ /**
+ * Sample code: SharedImages_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void sharedImagesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ SharedImage resource =
+ manager
+ .sharedImages()
+ .getWithResponse("resourceGroupName", "{labName}", "{sharedGalleryName}", "{name}", null, Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Users_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Users CreateOrUpdate. */
+public final class UsersCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Users_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Users_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void usersCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .users()
+ .define("{userName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{devtestlabName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withPrincipalName("{principalName}")
+ .withPrincipalId("{principalId}")
+ .withTenantId("{tenantId}")
+ .withObjectId("{objectId}")
+ .withAppId("{appId}")
+ .withKeyVaultUri("{keyVaultUri}")
+ .withKeyVaultId("{keyVaultId}")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Users_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Users Delete. */
+public final class UsersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Users_Delete.json
+ */
+ /**
+ * Sample code: Users_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void usersDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.users().delete("resourceGroupName", "{devtestlabName}", "{userName}", Context.NONE);
+ }
+}
+```
+
+### Users_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Users Get. */
+public final class UsersGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Users_Get.json
+ */
+ /**
+ * Sample code: Users_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void usersGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.users().getWithResponse("resourceGroupName", "{devtestlabName}", "{userName}", Context.NONE);
+ }
+}
+```
+
+### Users_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Users List. */
+public final class UsersListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Users_List.json
+ */
+ /**
+ * Sample code: Users_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void usersList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.users().list("resourceGroupName", "{devtestlabName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### Users_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.User;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Users Update. */
+public final class UsersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/Users_Update.json
+ */
+ /**
+ * Sample code: Users_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void usersUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ User resource =
+ manager
+ .users()
+ .getWithResponse("resourceGroupName", "{devtestlabName}", "{userName}", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### VirtualMachineSchedules_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.fluent.models.ScheduleInner;
+import com.azure.resourcemanager.devtestlabs.models.EnableStatus;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for VirtualMachineSchedules CreateOrUpdate. */
+public final class VirtualMachineSchedulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachineSchedules_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: VirtualMachineSchedules_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachineSchedulesCreateOrUpdate(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachineSchedules()
+ .createOrUpdateWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "{vmName}",
+ "LabVmsShutdown",
+ new ScheduleInner()
+ .withLocation("{location}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .withStatus(EnableStatus.ENABLED)
+ .withTaskType("LabVmsShutdownTask")
+ .withTimeZoneId("Pacific Standard Time")
+ .withTargetResourceId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualMachines/{vmName}")
+ .withWeekdays(Arrays.asList("Friday", "Saturday", "Sunday"))
+ .withTime("1700")
+ .withMinute(30)
+ .withStatusNotificationSettingsStatus(EnableStatus.ENABLED)
+ .withTimeInMinutes(30)
+ .withWebhookUrl("{webhookUrl}")
+ .withEmailRecipient("{email}")
+ .withNotificationLocale("EN"),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### VirtualMachineSchedules_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachineSchedules Delete. */
+public final class VirtualMachineSchedulesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachineSchedules_Delete.json
+ */
+ /**
+ * Sample code: VirtualMachineSchedules_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachineSchedulesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachineSchedules()
+ .deleteWithResponse("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", Context.NONE);
+ }
+}
+```
+
+### VirtualMachineSchedules_Execute
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachineSchedules Execute. */
+public final class VirtualMachineSchedulesExecuteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachineSchedules_Execute.json
+ */
+ /**
+ * Sample code: VirtualMachineSchedules_Execute.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachineSchedulesExecute(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachineSchedules()
+ .execute("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", Context.NONE);
+ }
+}
+```
+
+### VirtualMachineSchedules_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachineSchedules Get. */
+public final class VirtualMachineSchedulesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachineSchedules_Get.json
+ */
+ /**
+ * Sample code: VirtualMachineSchedules_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachineSchedulesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachineSchedules()
+ .getWithResponse("resourceGroupName", "{labName}", "{vmName}", "LabVmsShutdown", Context.NONE);
+ }
+}
+```
+
+### VirtualMachineSchedules_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachineSchedules List. */
+public final class VirtualMachineSchedulesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachineSchedules_List.json
+ */
+ /**
+ * Sample code: VirtualMachineSchedules_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachineSchedulesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachineSchedules()
+ .list("resourceGroupName", "{labName}", "{vmName}", null, null, null, Context.NONE);
+ }
+}
+```
+
+### VirtualMachineSchedules_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ScheduleFragment;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for VirtualMachineSchedules Update. */
+public final class VirtualMachineSchedulesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachineSchedules_Update.json
+ */
+ /**
+ * Sample code: VirtualMachineSchedules_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachineSchedulesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachineSchedules()
+ .updateWithResponse(
+ "resourceGroupName",
+ "{labName}",
+ "{vmName}",
+ "LabVmsShutdown",
+ new ScheduleFragment().withTags(mapOf("tagName1", "tagValue1")),
+ Context.NONE);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### VirtualMachines_AddDataDisk
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.DataDiskProperties;
+import com.azure.resourcemanager.devtestlabs.models.StorageType;
+
+/** Samples for VirtualMachines AddDataDisk. */
+public final class VirtualMachinesAddDataDiskSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_AddDataDisk.json
+ */
+ /**
+ * Sample code: VirtualMachines_AddDataDisk.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesAddDataDisk(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .addDataDisk(
+ "resourceGroupName",
+ "{labName}",
+ "{virtualMachineName}",
+ new DataDiskProperties()
+ .withDiskSizeGiB(127)
+ .withDiskName("{diskName}")
+ .withDiskType(StorageType.fromString("{diskType}")),
+ Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_ApplyArtifacts
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ApplyArtifactsRequest;
+import com.azure.resourcemanager.devtestlabs.models.ArtifactInstallProperties;
+import java.util.Arrays;
+
+/** Samples for VirtualMachines ApplyArtifacts. */
+public final class VirtualMachinesApplyArtifactsSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_ApplyArtifacts.json
+ */
+ /**
+ * Sample code: VirtualMachines_ApplyArtifacts.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesApplyArtifacts(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .applyArtifacts(
+ "resourceGroupName",
+ "{labName}",
+ "{vmName}",
+ new ApplyArtifactsRequest()
+ .withArtifacts(
+ Arrays
+ .asList(
+ new ArtifactInstallProperties()
+ .withArtifactId(
+ "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/public"
+ + " repo/artifacts/windows-restart"))),
+ Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Claim
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines Claim. */
+public final class VirtualMachinesClaimSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Claim.json
+ */
+ /**
+ * Sample code: VirtualMachines_Claim.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesClaim(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().claim("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_ClearArtifactResults
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines ClearArtifactResults. */
+public final class VirtualMachinesClearArtifactResultsSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_ClearArtifactResults.json
+ */
+ /**
+ * Sample code: VirtualMachines_ClearArtifactResults.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesClearArtifactResults(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .clearArtifactResultsWithResponse("resourceGroupName", "{labName}", "{vmNname}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_CreateOrUpdate
+
+```java
+/** Samples for VirtualMachines CreateOrUpdate. */
+public final class VirtualMachinesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: VirtualMachines_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .define("{vmName}")
+ .withRegion((String) null)
+ .withExistingLab("resourceGroupName", "{labName}")
+ .create();
+ }
+}
+```
+
+### VirtualMachines_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines Delete. */
+public final class VirtualMachinesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Delete.json
+ */
+ /**
+ * Sample code: VirtualMachines_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().delete("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_DetachDataDisk
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.DetachDataDiskProperties;
+
+/** Samples for VirtualMachines DetachDataDisk. */
+public final class VirtualMachinesDetachDataDiskSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_DetachDataDisk.json
+ */
+ /**
+ * Sample code: VirtualMachines_DetachDataDisk.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesDetachDataDisk(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .detachDataDisk(
+ "resourceGroupName",
+ "{labName}",
+ "{virtualMachineName}",
+ new DetachDataDiskProperties()
+ .withExistingLabDiskId(
+ "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{virtualMachineName}"),
+ Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines Get. */
+public final class VirtualMachinesGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Get.json
+ */
+ /**
+ * Sample code: VirtualMachines_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().getWithResponse("resourceGroupName", "{labName}", "{vmName}", null, Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_GetRdpFileContents
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines GetRdpFileContents. */
+public final class VirtualMachinesGetRdpFileContentsSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_GetRdpFileContents.json
+ */
+ /**
+ * Sample code: VirtualMachines_GetRdpFileContents.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesGetRdpFileContents(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .getRdpFileContentsWithResponse("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines List. */
+public final class VirtualMachinesListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_List.json
+ */
+ /**
+ * Sample code: VirtualMachines_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_ListApplicableSchedules
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines ListApplicableSchedules. */
+public final class VirtualMachinesListApplicableSchedulesSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_ListApplicableSchedules.json
+ */
+ /**
+ * Sample code: VirtualMachines_ListApplicableSchedules.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesListApplicableSchedules(
+ com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .listApplicableSchedulesWithResponse("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Redeploy
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines Redeploy. */
+public final class VirtualMachinesRedeploySamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Redeploy.json
+ */
+ /**
+ * Sample code: VirtualMachines_Redeploy.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesRedeploy(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().redeploy("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Resize
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.ResizeLabVirtualMachineProperties;
+
+/** Samples for VirtualMachines Resize. */
+public final class VirtualMachinesResizeSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Resize.json
+ */
+ /**
+ * Sample code: VirtualMachines_Resize.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesResize(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualMachines()
+ .resize(
+ "resourceGroupName",
+ "{labName}",
+ "{vmName}",
+ new ResizeLabVirtualMachineProperties().withSize("Standard_A4_v2"),
+ Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Restart
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines Restart. */
+public final class VirtualMachinesRestartSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Restart.json
+ */
+ /**
+ * Sample code: VirtualMachines_Restart.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesRestart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().restart("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Start
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines Start. */
+public final class VirtualMachinesStartSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Start.json
+ */
+ /**
+ * Sample code: VirtualMachines_Start.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesStart(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().start("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Stop
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines Stop. */
+public final class VirtualMachinesStopSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Stop.json
+ */
+ /**
+ * Sample code: VirtualMachines_Stop.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesStop(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().stop("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_TransferDisks
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines TransferDisks. */
+public final class VirtualMachinesTransferDisksSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_TransferDisks.json
+ */
+ /**
+ * Sample code: VirtualMachines_TransferDisks.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesTransferDisks(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().transferDisks("resourceGroupName", "{labName}", "{virtualmachineName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_UnClaim
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualMachines UnClaim. */
+public final class VirtualMachinesUnClaimSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_UnClaim.json
+ */
+ /**
+ * Sample code: VirtualMachines_UnClaim.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesUnClaim(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualMachines().unClaim("resourceGroupName", "{labName}", "{vmName}", Context.NONE);
+ }
+}
+```
+
+### VirtualMachines_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachine;
+
+/** Samples for VirtualMachines Update. */
+public final class VirtualMachinesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualMachines_Update.json
+ */
+ /**
+ * Sample code: VirtualMachines_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualMachinesUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ LabVirtualMachine resource =
+ manager
+ .virtualMachines()
+ .getWithResponse("resourceGroupName", "{labName}", "{vmName}", null, Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+}
+```
+
+### VirtualNetworks_CreateOrUpdate
+
+```java
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for VirtualNetworks CreateOrUpdate. */
+public final class VirtualNetworksCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualNetworks_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: VirtualNetworks_CreateOrUpdate.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualNetworksCreateOrUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualNetworks()
+ .define("{virtualNetworkName}")
+ .withRegion("{location}")
+ .withExistingLab("resourceGroupName", "{labName}")
+ .withTags(mapOf("tagName1", "tagValue1"))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### VirtualNetworks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualNetworks Delete. */
+public final class VirtualNetworksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualNetworks_Delete.json
+ */
+ /**
+ * Sample code: VirtualNetworks_Delete.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualNetworksDelete(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualNetworks().delete("resourceGroupName", "{labName}", "{virtualNetworkName}", Context.NONE);
+ }
+}
+```
+
+### VirtualNetworks_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualNetworks Get. */
+public final class VirtualNetworksGetSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualNetworks_Get.json
+ */
+ /**
+ * Sample code: VirtualNetworks_Get.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualNetworksGet(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager
+ .virtualNetworks()
+ .getWithResponse("resourceGroupName", "{labName}", "{virtualNetworkName}", null, Context.NONE);
+ }
+}
+```
+
+### VirtualNetworks_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VirtualNetworks List. */
+public final class VirtualNetworksListSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualNetworks_List.json
+ */
+ /**
+ * Sample code: VirtualNetworks_List.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualNetworksList(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ manager.virtualNetworks().list("resourceGroupName", "{labName}", null, null, null, null, Context.NONE);
+ }
+}
+```
+
+### VirtualNetworks_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.devtestlabs.models.VirtualNetwork;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for VirtualNetworks Update. */
+public final class VirtualNetworksUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2021-09-01/examples/VirtualNetworks_Update.json
+ */
+ /**
+ * Sample code: VirtualNetworks_Update.
+ *
+ * @param manager Entry point to DevTestLabsManager.
+ */
+ public static void virtualNetworksUpdate(com.azure.resourcemanager.devtestlabs.DevTestLabsManager manager) {
+ VirtualNetwork resource =
+ manager
+ .virtualNetworks()
+ .getWithResponse("resourceGroupName", "{labName}", "{virtualNetworkName}", null, Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("tagName1", "tagValue1")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml
index 4d27c23e43d3..7d49ac0a9dce 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-devtestlabs
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-devtestlabs
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for DevTestLabs Management
- This package contains Microsoft Azure SDK for DevTestLabs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The DevTest Labs Client. Package tag package-2018-09.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for DevTestLabs Management
+ This package contains Microsoft Azure SDK for DevTestLabs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The DevTest Labs Client. Package tag package-2021-09.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.25.0
-
-
- com.azure
- azure-core-management
- 1.5.2
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.25.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.2
+
+
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java
index 96929b98af39..799a1fb8d1bc 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/DevTestLabsManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -24,6 +25,7 @@
import com.azure.resourcemanager.devtestlabs.implementation.ArmTemplatesImpl;
import com.azure.resourcemanager.devtestlabs.implementation.ArtifactSourcesImpl;
import com.azure.resourcemanager.devtestlabs.implementation.ArtifactsImpl;
+import com.azure.resourcemanager.devtestlabs.implementation.BastionHostsImpl;
import com.azure.resourcemanager.devtestlabs.implementation.CostsImpl;
import com.azure.resourcemanager.devtestlabs.implementation.CustomImagesImpl;
import com.azure.resourcemanager.devtestlabs.implementation.DevTestLabsClientBuilder;
@@ -32,6 +34,7 @@
import com.azure.resourcemanager.devtestlabs.implementation.FormulasImpl;
import com.azure.resourcemanager.devtestlabs.implementation.GalleryImagesImpl;
import com.azure.resourcemanager.devtestlabs.implementation.GlobalSchedulesImpl;
+import com.azure.resourcemanager.devtestlabs.implementation.LabSecretsImpl;
import com.azure.resourcemanager.devtestlabs.implementation.LabsImpl;
import com.azure.resourcemanager.devtestlabs.implementation.NotificationChannelsImpl;
import com.azure.resourcemanager.devtestlabs.implementation.OperationsImpl;
@@ -43,6 +46,8 @@
import com.azure.resourcemanager.devtestlabs.implementation.ServiceFabricSchedulesImpl;
import com.azure.resourcemanager.devtestlabs.implementation.ServiceFabricsImpl;
import com.azure.resourcemanager.devtestlabs.implementation.ServiceRunnersImpl;
+import com.azure.resourcemanager.devtestlabs.implementation.SharedGalleriesImpl;
+import com.azure.resourcemanager.devtestlabs.implementation.SharedImagesImpl;
import com.azure.resourcemanager.devtestlabs.implementation.UsersImpl;
import com.azure.resourcemanager.devtestlabs.implementation.VirtualMachineSchedulesImpl;
import com.azure.resourcemanager.devtestlabs.implementation.VirtualMachinesImpl;
@@ -50,6 +55,7 @@
import com.azure.resourcemanager.devtestlabs.models.ArmTemplates;
import com.azure.resourcemanager.devtestlabs.models.ArtifactSources;
import com.azure.resourcemanager.devtestlabs.models.Artifacts;
+import com.azure.resourcemanager.devtestlabs.models.BastionHosts;
import com.azure.resourcemanager.devtestlabs.models.Costs;
import com.azure.resourcemanager.devtestlabs.models.CustomImages;
import com.azure.resourcemanager.devtestlabs.models.Disks;
@@ -57,6 +63,7 @@
import com.azure.resourcemanager.devtestlabs.models.Formulas;
import com.azure.resourcemanager.devtestlabs.models.GalleryImages;
import com.azure.resourcemanager.devtestlabs.models.GlobalSchedules;
+import com.azure.resourcemanager.devtestlabs.models.LabSecrets;
import com.azure.resourcemanager.devtestlabs.models.Labs;
import com.azure.resourcemanager.devtestlabs.models.NotificationChannels;
import com.azure.resourcemanager.devtestlabs.models.Operations;
@@ -68,6 +75,8 @@
import com.azure.resourcemanager.devtestlabs.models.ServiceFabricSchedules;
import com.azure.resourcemanager.devtestlabs.models.ServiceFabrics;
import com.azure.resourcemanager.devtestlabs.models.ServiceRunners;
+import com.azure.resourcemanager.devtestlabs.models.SharedGalleries;
+import com.azure.resourcemanager.devtestlabs.models.SharedImages;
import com.azure.resourcemanager.devtestlabs.models.Users;
import com.azure.resourcemanager.devtestlabs.models.VirtualMachineSchedules;
import com.azure.resourcemanager.devtestlabs.models.VirtualMachines;
@@ -77,6 +86,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to DevTestLabsManager. The DevTest Labs Client. */
public final class DevTestLabsManager {
@@ -110,8 +120,14 @@ public final class DevTestLabsManager {
private Schedules schedules;
+ private LabSecrets labSecrets;
+
private ServiceRunners serviceRunners;
+ private SharedGalleries sharedGalleries;
+
+ private SharedImages sharedImages;
+
private Users users;
private Disks disks;
@@ -130,6 +146,8 @@ public final class DevTestLabsManager {
private VirtualNetworks virtualNetworks;
+ private BastionHosts bastionHosts;
+
private final DevTestLabsClient clientObject;
private DevTestLabsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -173,6 +191,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -212,6 +231,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -268,20 +298,33 @@ public DevTestLabsManager authenticate(TokenCredential credential, AzureProfile
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -413,6 +456,14 @@ public Schedules schedules() {
return schedules;
}
+ /** @return Resource collection API of LabSecrets. */
+ public LabSecrets labSecrets() {
+ if (this.labSecrets == null) {
+ this.labSecrets = new LabSecretsImpl(clientObject.getLabSecrets(), this);
+ }
+ return labSecrets;
+ }
+
/** @return Resource collection API of ServiceRunners. */
public ServiceRunners serviceRunners() {
if (this.serviceRunners == null) {
@@ -421,6 +472,22 @@ public ServiceRunners serviceRunners() {
return serviceRunners;
}
+ /** @return Resource collection API of SharedGalleries. */
+ public SharedGalleries sharedGalleries() {
+ if (this.sharedGalleries == null) {
+ this.sharedGalleries = new SharedGalleriesImpl(clientObject.getSharedGalleries(), this);
+ }
+ return sharedGalleries;
+ }
+
+ /** @return Resource collection API of SharedImages. */
+ public SharedImages sharedImages() {
+ if (this.sharedImages == null) {
+ this.sharedImages = new SharedImagesImpl(clientObject.getSharedImages(), this);
+ }
+ return sharedImages;
+ }
+
/** @return Resource collection API of Users. */
public Users users() {
if (this.users == null) {
@@ -495,6 +562,14 @@ public VirtualNetworks virtualNetworks() {
return virtualNetworks;
}
+ /** @return Resource collection API of BastionHosts. */
+ public BastionHosts bastionHosts() {
+ if (this.bastionHosts == null) {
+ this.bastionHosts = new BastionHostsImpl(clientObject.getBastionHosts(), this);
+ }
+ return bastionHosts;
+ }
+
/**
* @return Wrapped service client DevTestLabsClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java
index 14fabcf6ad45..7500d36fab57 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArmTemplatesClient.java
@@ -22,7 +22,7 @@ public interface ArmTemplatesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of armTemplates and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName, String artifactSourceName);
@@ -33,22 +33,20 @@ public interface ArmTemplatesClient {
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param artifactSourceName The name of the artifact source.
- * @param expand Specify the $expand query. Example: 'properties($select=displayName)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of armTemplates and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
String resourceGroupName,
String labName,
String artifactSourceName,
- String expand,
String filter,
Integer top,
String orderby,
@@ -76,19 +74,13 @@ PagedIterable list(
* @param labName The name of the lab.
* @param artifactSourceName The name of the artifact source.
* @param name The name of the azure resource manager template.
- * @param expand Specify the $expand query. Example: 'properties($select=displayName)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return azure resource manager template.
+ * @return azure resource manager template along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
- String resourceGroupName,
- String labName,
- String artifactSourceName,
- String name,
- String expand,
- Context context);
+ String resourceGroupName, String labName, String artifactSourceName, String name, Context context);
}
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java
index c0dc5ca47d10..a04143590237 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactSourcesClient.java
@@ -22,7 +22,7 @@ public interface ArtifactSourcesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of artifactSources and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName);
@@ -32,25 +32,18 @@ public interface ArtifactSourcesClient {
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
- * @param expand Specify the $expand query. Example: 'properties($select=displayName)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of artifactSources and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String resourceGroupName,
- String labName,
- String expand,
- String filter,
- Integer top,
- String orderby,
- Context context);
+ String resourceGroupName, String labName, String filter, Integer top, String orderby, Context context);
/**
* Get artifact source.
@@ -72,16 +65,15 @@ PagedIterable list(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the artifact source.
- * @param expand Specify the $expand query. Example: 'properties($select=displayName)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return artifact source.
+ * @return artifact source along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
- String resourceGroupName, String labName, String name, String expand, Context context);
+ String resourceGroupName, String labName, String name, Context context);
/**
* Create or replace an existing artifact source.
@@ -110,7 +102,7 @@ ArtifactSourceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return properties of an artifact source.
+ * @return properties of an artifact source along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -139,7 +131,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context);
@@ -150,7 +142,7 @@ Response createOrUpdateWithResponse(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the artifact source.
- * @param artifactSource Properties of an artifact source.
+ * @param artifactSource Allows modifying tags of artifact sources. All other properties will be ignored.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -166,12 +158,12 @@ ArtifactSourceInner update(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the artifact source.
- * @param artifactSource Properties of an artifact source.
+ * @param artifactSource Allows modifying tags of artifact sources. All other properties will be ignored.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return properties of an artifact source.
+ * @return properties of an artifact source along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java
index 84683b96e417..b6a1627a9b55 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/ArtifactsClient.java
@@ -24,7 +24,7 @@ public interface ArtifactsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of artifacts and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName, String artifactSourceName);
@@ -35,22 +35,20 @@ public interface ArtifactsClient {
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param artifactSourceName The name of the artifact source.
- * @param expand Specify the $expand query. Example: 'properties($select=title)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of artifacts and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
String resourceGroupName,
String labName,
String artifactSourceName,
- String expand,
String filter,
Integer top,
String orderby,
@@ -78,21 +76,15 @@ PagedIterable list(
* @param labName The name of the lab.
* @param artifactSourceName The name of the artifact source.
* @param name The name of the artifact.
- * @param expand Specify the $expand query. Example: 'properties($select=title)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return artifact.
+ * @return artifact along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
- String resourceGroupName,
- String labName,
- String artifactSourceName,
- String name,
- String expand,
- Context context);
+ String resourceGroupName, String labName, String artifactSourceName, String name, Context context);
/**
* Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates
@@ -129,7 +121,7 @@ ArmTemplateInfoInner generateArmTemplate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about a generated ARM template.
+ * @return information about a generated ARM template along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response generateArmTemplateWithResponse(
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/BastionHostsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/BastionHostsClient.java
new file mode 100644
index 000000000000..61e66900faa8
--- /dev/null
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/BastionHostsClient.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.devtestlabs.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.devtestlabs.fluent.models.BastionHostInner;
+import com.azure.resourcemanager.devtestlabs.models.BastionHostFragment;
+
+/** An instance of this class provides access to all the operations defined in BastionHostsClient. */
+public interface BastionHostsClient {
+ /**
+ * List bastionhosts in a given virtual network.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return contains a list of bastionHosts and their properties as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String labName, String virtualNetworkName);
+
+ /**
+ * List bastionhosts in a given virtual network.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
+ * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
+ * @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return contains a list of bastionHosts and their properties as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName,
+ String labName,
+ String virtualNetworkName,
+ String filter,
+ Integer top,
+ String orderby,
+ Context context);
+
+ /**
+ * Get bastionhost.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return bastionhost.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BastionHostInner get(String resourceGroupName, String labName, String virtualNetworkName, String name);
+
+ /**
+ * Get bastionhost.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return bastionhost along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String labName, String virtualNetworkName, String name, Context context);
+
+ /**
+ * Create or replace an existing bastionHost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param bastionHost Profile of a Bastion Host.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of profile of a Bastion Host.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BastionHostInner> beginCreateOrUpdate(
+ String resourceGroupName, String labName, String virtualNetworkName, String name, BastionHostInner bastionHost);
+
+ /**
+ * Create or replace an existing bastionHost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param bastionHost Profile of a Bastion Host.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of profile of a Bastion Host.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BastionHostInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String labName,
+ String virtualNetworkName,
+ String name,
+ BastionHostInner bastionHost,
+ Context context);
+
+ /**
+ * Create or replace an existing bastionHost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param bastionHost Profile of a Bastion Host.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return profile of a Bastion Host.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BastionHostInner createOrUpdate(
+ String resourceGroupName, String labName, String virtualNetworkName, String name, BastionHostInner bastionHost);
+
+ /**
+ * Create or replace an existing bastionHost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param bastionHost Profile of a Bastion Host.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return profile of a Bastion Host.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BastionHostInner createOrUpdate(
+ String resourceGroupName,
+ String labName,
+ String virtualNetworkName,
+ String name,
+ BastionHostInner bastionHost,
+ Context context);
+
+ /**
+ * Delete bastionhost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String labName, String virtualNetworkName, String name);
+
+ /**
+ * Delete bastionhost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String labName, String virtualNetworkName, String name, Context context);
+
+ /**
+ * Delete bastionhost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String labName, String virtualNetworkName, String name);
+
+ /**
+ * Delete bastionhost. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String labName, String virtualNetworkName, String name, Context context);
+
+ /**
+ * Allows modifying tags of bastionhosts. All other properties will be ignored.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param bastionHost Allows modifying tags of bastionhosts. All other properties will be ignored.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return profile of a Bastion Host.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BastionHostInner update(
+ String resourceGroupName,
+ String labName,
+ String virtualNetworkName,
+ String name,
+ BastionHostFragment bastionHost);
+
+ /**
+ * Allows modifying tags of bastionhosts. All other properties will be ignored.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param virtualNetworkName The name of the virtual network.
+ * @param name The name of the bastionhost.
+ * @param bastionHost Allows modifying tags of bastionhosts. All other properties will be ignored.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return profile of a Bastion Host along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String labName,
+ String virtualNetworkName,
+ String name,
+ BastionHostFragment bastionHost,
+ Context context);
+}
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java
index 08f46abf1cd6..6884d9f468ac 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CostsClient.java
@@ -6,12 +6,51 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.devtestlabs.fluent.models.LabCostInner;
/** An instance of this class provides access to all the operations defined in CostsClient. */
public interface CostsClient {
+ /**
+ * List costs in a given lab.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return contains a list of costs and their properties as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String labName);
+
+ /**
+ * List costs in a given lab.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param expand Specify the $expand query. Example: 'properties($expand=labCostDetails)'.
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
+ * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
+ * @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return contains a list of costs and their properties as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName,
+ String labName,
+ String expand,
+ String filter,
+ Integer top,
+ String orderby,
+ Context context);
+
/**
* Get cost.
*
@@ -37,7 +76,7 @@ public interface CostsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cost.
+ * @return cost along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -69,7 +108,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a cost item.
+ * @return a cost item along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java
index f62f57f8cb68..c4cc536689bc 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/CustomImagesClient.java
@@ -24,7 +24,7 @@ public interface CustomImagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of customImages and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName);
@@ -34,25 +34,18 @@ public interface CustomImagesClient {
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
- * @param expand Specify the $expand query. Example: 'properties($select=vm)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of customImages and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String resourceGroupName,
- String labName,
- String expand,
- String filter,
- Integer top,
- String orderby,
- Context context);
+ String resourceGroupName, String labName, String filter, Integer top, String orderby, Context context);
/**
* Get custom image.
@@ -74,16 +67,14 @@ PagedIterable list(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the custom image.
- * @param expand Specify the $expand query. Example: 'properties($select=vm)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return custom image.
+ * @return custom image along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String labName, String name, String expand, Context context);
+ Response getWithResponse(String resourceGroupName, String labName, String name, Context context);
/**
* Create or replace an existing custom image. This operation can take a while to complete.
@@ -95,9 +86,9 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a custom image.
+ * @return the {@link SyncPoller} for polling of a custom image.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CustomImageInner> beginCreateOrUpdate(
String resourceGroupName, String labName, String name, CustomImageInner customImage);
@@ -112,9 +103,9 @@ SyncPoller, CustomImageInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a custom image.
+ * @return the {@link SyncPoller} for polling of a custom image.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CustomImageInner> beginCreateOrUpdate(
String resourceGroupName, String labName, String name, CustomImageInner customImage, Context context);
@@ -160,9 +151,9 @@ CustomImageInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name);
/**
@@ -175,9 +166,9 @@ CustomImageInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String labName, String name, Context context);
@@ -214,7 +205,7 @@ SyncPoller, Void> beginDelete(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the custom image.
- * @param customImage A custom image.
+ * @param customImage Allows modifying tags of custom images. All other properties will be ignored.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -229,12 +220,12 @@ SyncPoller, Void> beginDelete(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the custom image.
- * @param customImage A custom image.
+ * @param customImage Allows modifying tags of custom images. All other properties will be ignored.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a custom image.
+ * @return a custom image along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DevTestLabsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DevTestLabsClient.java
index 04b690fea67d..3f0c29b0fe90 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DevTestLabsClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DevTestLabsClient.java
@@ -149,6 +149,13 @@ public interface DevTestLabsClient {
*/
SchedulesClient getSchedules();
+ /**
+ * Gets the LabSecretsClient object to access its operations.
+ *
+ * @return the LabSecretsClient object.
+ */
+ LabSecretsClient getLabSecrets();
+
/**
* Gets the ServiceRunnersClient object to access its operations.
*
@@ -156,6 +163,20 @@ public interface DevTestLabsClient {
*/
ServiceRunnersClient getServiceRunners();
+ /**
+ * Gets the SharedGalleriesClient object to access its operations.
+ *
+ * @return the SharedGalleriesClient object.
+ */
+ SharedGalleriesClient getSharedGalleries();
+
+ /**
+ * Gets the SharedImagesClient object to access its operations.
+ *
+ * @return the SharedImagesClient object.
+ */
+ SharedImagesClient getSharedImages();
+
/**
* Gets the UsersClient object to access its operations.
*
@@ -218,4 +239,11 @@ public interface DevTestLabsClient {
* @return the VirtualNetworksClient object.
*/
VirtualNetworksClient getVirtualNetworks();
+
+ /**
+ * Gets the BastionHostsClient object to access its operations.
+ *
+ * @return the BastionHostsClient object.
+ */
+ BastionHostsClient getBastionHosts();
}
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java
index 4e6fda42b3e6..044921f4802f 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/DisksClient.java
@@ -27,7 +27,7 @@ public interface DisksClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of disks and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName, String username);
@@ -38,22 +38,20 @@ public interface DisksClient {
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param username The name of the user profile.
- * @param expand Specify the $expand query. Example: 'properties($select=diskType)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of disks and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
String resourceGroupName,
String labName,
String username,
- String expand,
String filter,
Integer top,
String orderby,
@@ -81,16 +79,15 @@ PagedIterable list(
* @param labName The name of the lab.
* @param username The name of the user profile.
* @param name The name of the disk.
- * @param expand Specify the $expand query. Example: 'properties($select=diskType)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return disk.
+ * @return disk along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
- String resourceGroupName, String labName, String username, String name, String expand, Context context);
+ String resourceGroupName, String labName, String username, String name, Context context);
/**
* Create or replace an existing disk. This operation can take a while to complete.
@@ -103,9 +100,9 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a Disk.
+ * @return the {@link SyncPoller} for polling of a Disk.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DiskInner> beginCreateOrUpdate(
String resourceGroupName, String labName, String username, String name, DiskInner disk);
@@ -121,9 +118,9 @@ SyncPoller, DiskInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a Disk.
+ * @return the {@link SyncPoller} for polling of a Disk.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DiskInner> beginCreateOrUpdate(
String resourceGroupName, String labName, String username, String name, DiskInner disk, Context context);
@@ -171,9 +168,9 @@ DiskInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String labName, String username, String name);
@@ -188,9 +185,9 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String labName, String username, String name, Context context);
@@ -230,7 +227,7 @@ SyncPoller, Void> beginDelete(
* @param labName The name of the lab.
* @param username The name of the user profile.
* @param name The name of the disk.
- * @param disk A Disk.
+ * @param disk Allows modifying tags of disks. All other properties will be ignored.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -246,12 +243,12 @@ SyncPoller, Void> beginDelete(
* @param labName The name of the lab.
* @param username The name of the user profile.
* @param name The name of the disk.
- * @param disk A Disk.
+ * @param disk Allows modifying tags of disks. All other properties will be ignored.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a Disk.
+ * @return a Disk along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -268,9 +265,9 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginAttach(
String resourceGroupName,
String labName,
@@ -290,9 +287,9 @@ SyncPoller, Void> beginAttach(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginAttach(
String resourceGroupName,
String labName,
@@ -355,9 +352,9 @@ void attach(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDetach(
String resourceGroupName,
String labName,
@@ -378,9 +375,9 @@ SyncPoller, Void> beginDetach(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDetach(
String resourceGroupName,
String labName,
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java
index c7cc0d54c506..6ef165209a5b 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/EnvironmentsClient.java
@@ -25,7 +25,7 @@ public interface EnvironmentsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of environments and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName, String username);
@@ -36,22 +36,20 @@ public interface EnvironmentsClient {
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param username The name of the user profile.
- * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of environments and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
String resourceGroupName,
String labName,
String username,
- String expand,
String filter,
Integer top,
String orderby,
@@ -79,16 +77,15 @@ PagedIterable list(
* @param labName The name of the lab.
* @param username The name of the user profile.
* @param name The name of the environment.
- * @param expand Specify the $expand query. Example: 'properties($select=deploymentProperties)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return environment.
+ * @return environment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
- String resourceGroupName, String labName, String username, String name, String expand, Context context);
+ String resourceGroupName, String labName, String username, String name, Context context);
/**
* Create or replace an existing environment. This operation can take a while to complete.
@@ -101,9 +98,9 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an environment, which is essentially an ARM template deployment.
+ * @return the {@link SyncPoller} for polling of an environment, which is essentially an ARM template deployment.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DtlEnvironmentInner> beginCreateOrUpdate(
String resourceGroupName, String labName, String username, String name, DtlEnvironmentInner dtlEnvironment);
@@ -119,9 +116,9 @@ SyncPoller, DtlEnvironmentInner> beginCreateOrUp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an environment, which is essentially an ARM template deployment.
+ * @return the {@link SyncPoller} for polling of an environment, which is essentially an ARM template deployment.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DtlEnvironmentInner> beginCreateOrUpdate(
String resourceGroupName,
String labName,
@@ -180,9 +177,9 @@ DtlEnvironmentInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String labName, String username, String name);
@@ -197,9 +194,9 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String labName, String username, String name, Context context);
@@ -239,7 +236,7 @@ SyncPoller, Void> beginDelete(
* @param labName The name of the lab.
* @param username The name of the user profile.
* @param name The name of the environment.
- * @param dtlEnvironment An environment, which is essentially an ARM template deployment.
+ * @param dtlEnvironment Allows modifying tags of environments. All other properties will be ignored.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -256,12 +253,12 @@ DtlEnvironmentInner update(
* @param labName The name of the lab.
* @param username The name of the user profile.
* @param name The name of the environment.
- * @param dtlEnvironment An environment, which is essentially an ARM template deployment.
+ * @param dtlEnvironment Allows modifying tags of environments. All other properties will be ignored.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an environment, which is essentially an ARM template deployment.
+ * @return an environment, which is essentially an ARM template deployment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java
index e5897892f1d3..0706fdc2d1a3 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/FormulasClient.java
@@ -24,7 +24,7 @@ public interface FormulasClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of formulas and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName);
@@ -34,25 +34,18 @@ public interface FormulasClient {
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
- * @param expand Specify the $expand query. Example: 'properties($select=description)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of formulas and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String resourceGroupName,
- String labName,
- String expand,
- String filter,
- Integer top,
- String orderby,
- Context context);
+ String resourceGroupName, String labName, String filter, Integer top, String orderby, Context context);
/**
* Get formula.
@@ -74,19 +67,17 @@ PagedIterable list(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the formula.
- * @param expand Specify the $expand query. Example: 'properties($select=description)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return formula.
+ * @return formula along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String labName, String name, String expand, Context context);
+ Response getWithResponse(String resourceGroupName, String labName, String name, Context context);
/**
- * Create or replace an existing formula. This operation can take a while to complete.
+ * Create or replace an existing Formula. This operation can take a while to complete.
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
@@ -95,14 +86,15 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a formula for creating a VM, specifying an image base and other parameters.
+ * @return the {@link SyncPoller} for polling of a formula for creating a VM, specifying an image base and other
+ * parameters.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, FormulaInner> beginCreateOrUpdate(
String resourceGroupName, String labName, String name, FormulaInner formula);
/**
- * Create or replace an existing formula. This operation can take a while to complete.
+ * Create or replace an existing Formula. This operation can take a while to complete.
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
@@ -112,14 +104,15 @@ SyncPoller, FormulaInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a formula for creating a VM, specifying an image base and other parameters.
+ * @return the {@link SyncPoller} for polling of a formula for creating a VM, specifying an image base and other
+ * parameters.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, FormulaInner> beginCreateOrUpdate(
String resourceGroupName, String labName, String name, FormulaInner formula, Context context);
/**
- * Create or replace an existing formula. This operation can take a while to complete.
+ * Create or replace an existing Formula. This operation can take a while to complete.
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
@@ -134,7 +127,7 @@ SyncPoller, FormulaInner> beginCreateOrUpdate(
FormulaInner createOrUpdate(String resourceGroupName, String labName, String name, FormulaInner formula);
/**
- * Create or replace an existing formula. This operation can take a while to complete.
+ * Create or replace an existing Formula. This operation can take a while to complete.
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
@@ -173,7 +166,7 @@ FormulaInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String labName, String name, Context context);
@@ -184,7 +177,7 @@ FormulaInner createOrUpdate(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the formula.
- * @param formula A formula for creating a VM, specifying an image base and other parameters.
+ * @param formula Allows modifying tags of formulas. All other properties will be ignored.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -199,12 +192,12 @@ FormulaInner createOrUpdate(
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the formula.
- * @param formula A formula for creating a VM, specifying an image base and other parameters.
+ * @param formula Allows modifying tags of formulas. All other properties will be ignored.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a formula for creating a VM, specifying an image base and other parameters.
+ * @return a formula for creating a VM, specifying an image base and other parameters along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java
index 4dde1cab7c18..bc1fcaf8a3c2 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GalleryImagesClient.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.devtestlabs.fluent.models.GalleryImageInner;
@@ -20,7 +21,7 @@ public interface GalleryImagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of galleryImages and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String labName);
@@ -30,23 +31,45 @@ public interface GalleryImagesClient {
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
- * @param expand Specify the $expand query. Example: 'properties($select=author)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of galleryImages and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
- String resourceGroupName,
- String labName,
- String expand,
- String filter,
- Integer top,
- String orderby,
- Context context);
+ String resourceGroupName, String labName, String filter, Integer top, String orderby, Context context);
+
+ /**
+ * Get gallery image.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the gallery image.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return gallery image.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GalleryImageInner get(String resourceGroupName, String labName, String name);
+
+ /**
+ * Get gallery image.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the gallery image.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return gallery image along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String labName, String name, Context context);
}
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java
index 2056c0c2030a..6d804397516b 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/GlobalSchedulesClient.java
@@ -22,7 +22,7 @@ public interface GlobalSchedulesClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of schedules and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -30,18 +30,17 @@ public interface GlobalSchedulesClient {
/**
* List schedules in a subscription.
*
- * @param expand Specify the $expand query. Example: 'properties($select=status)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of schedules and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String expand, String filter, Integer top, String orderby, Context context);
+ PagedIterable list(String filter, Integer top, String orderby, Context context);
/**
* List schedules in a resource group.
@@ -50,7 +49,7 @@ public interface GlobalSchedulesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of schedules and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -59,19 +58,18 @@ public interface GlobalSchedulesClient {
* List schedules in a resource group.
*
* @param resourceGroupName The name of the resource group.
- * @param expand Specify the $expand query. Example: 'properties($select=status)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of schedules and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(
- String resourceGroupName, String expand, String filter, Integer top, String orderby, Context context);
+ String resourceGroupName, String filter, Integer top, String orderby, Context context);
/**
* Get schedule.
@@ -91,16 +89,14 @@ PagedIterable listByResourceGroup(
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the schedule.
- * @param expand Specify the $expand query. Example: 'properties($select=status)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return schedule.
+ * @return schedule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String name, String expand, Context context);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);
/**
* Create or replace an existing schedule.
@@ -126,7 +122,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a schedule.
+ * @return a schedule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -153,7 +149,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String name, Context context);
@@ -163,7 +159,7 @@ Response createOrUpdateWithResponse(
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the schedule.
- * @param schedule A schedule.
+ * @param schedule Allows modifying tags of schedules. All other properties will be ignored.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -177,12 +173,12 @@ Response createOrUpdateWithResponse(
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the schedule.
- * @param schedule A schedule.
+ * @param schedule Allows modifying tags of schedules. All other properties will be ignored.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a schedule.
+ * @return a schedule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -196,9 +192,9 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginExecute(String resourceGroupName, String name);
/**
@@ -210,9 +206,9 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginExecute(String resourceGroupName, String name, Context context);
/**
@@ -249,9 +245,9 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginRetarget(
String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties);
@@ -265,9 +261,9 @@ SyncPoller, Void> beginRetarget(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginRetarget(
String resourceGroupName, String name, RetargetScheduleProperties retargetScheduleProperties, Context context);
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabSecretsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabSecretsClient.java
new file mode 100644
index 000000000000..e7f4064ce634
--- /dev/null
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabSecretsClient.java
@@ -0,0 +1,232 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.devtestlabs.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.devtestlabs.fluent.models.LabSecretInner;
+import com.azure.resourcemanager.devtestlabs.models.SecretFragment;
+
+/** An instance of this class provides access to all the operations defined in LabSecretsClient. */
+public interface LabSecretsClient {
+ /**
+ * List lab secrets in a given lab.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return contains a list of secrets and their properties as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String labName);
+
+ /**
+ * List lab secrets in a given lab.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
+ * @param top The maximum number of resources to return from the operation. Example: '$top=10'.
+ * @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return contains a list of secrets and their properties as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName, String labName, String filter, Integer top, String orderby, Context context);
+
+ /**
+ * Get lab secret.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return lab secret.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LabSecretInner get(String resourceGroupName, String labName, String name);
+
+ /**
+ * Get lab secret.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return lab secret along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String labName, String name, Context context);
+
+ /**
+ * Create or replace an existing Lab Secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param labSecret A shared secret in a lab.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a shared secret in a lab.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, LabSecretInner> beginCreateOrUpdate(
+ String resourceGroupName, String labName, String name, LabSecretInner labSecret);
+
+ /**
+ * Create or replace an existing Lab Secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param labSecret A shared secret in a lab.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a shared secret in a lab.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, LabSecretInner> beginCreateOrUpdate(
+ String resourceGroupName, String labName, String name, LabSecretInner labSecret, Context context);
+
+ /**
+ * Create or replace an existing Lab Secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param labSecret A shared secret in a lab.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a shared secret in a lab.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LabSecretInner createOrUpdate(String resourceGroupName, String labName, String name, LabSecretInner labSecret);
+
+ /**
+ * Create or replace an existing Lab Secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param labSecret A shared secret in a lab.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a shared secret in a lab.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LabSecretInner createOrUpdate(
+ String resourceGroupName, String labName, String name, LabSecretInner labSecret, Context context);
+
+ /**
+ * Delete lab secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String labName, String name);
+
+ /**
+ * Delete lab secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String labName, String name, Context context);
+
+ /**
+ * Delete lab secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String labName, String name);
+
+ /**
+ * Delete lab secret. This operation can take a while to complete.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String labName, String name, Context context);
+
+ /**
+ * Allows modifying tags of lab secrets. All other properties will be ignored.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param secret Allows modifying tags of lab secrets. All other properties will be ignored.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a shared secret in a lab.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LabSecretInner update(String resourceGroupName, String labName, String name, SecretFragment secret);
+
+ /**
+ * Allows modifying tags of lab secrets. All other properties will be ignored.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param labName The name of the lab.
+ * @param name The name of the lab secret.
+ * @param secret Allows modifying tags of lab secrets. All other properties will be ignored.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a shared secret in a lab along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String labName, String name, SecretFragment secret, Context context);
+}
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java
index 7c67e3a3e40d..9bf818d424a6 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/LabsClient.java
@@ -14,11 +14,11 @@
import com.azure.resourcemanager.devtestlabs.fluent.models.GenerateUploadUriResponseInner;
import com.azure.resourcemanager.devtestlabs.fluent.models.LabInner;
import com.azure.resourcemanager.devtestlabs.fluent.models.LabVhdInner;
+import com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachineCreationParameterInner;
import com.azure.resourcemanager.devtestlabs.models.ExportResourceUsageParameters;
import com.azure.resourcemanager.devtestlabs.models.GenerateUploadUriParameter;
import com.azure.resourcemanager.devtestlabs.models.ImportLabVirtualMachineRequest;
import com.azure.resourcemanager.devtestlabs.models.LabFragment;
-import com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter;
/** An instance of this class provides access to all the operations defined in LabsClient. */
public interface LabsClient {
@@ -27,7 +27,7 @@ public interface LabsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of labs and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -35,18 +35,17 @@ public interface LabsClient {
/**
* List labs in a subscription.
*
- * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of labs and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String expand, String filter, Integer top, String orderby, Context context);
+ PagedIterable list(String filter, Integer top, String orderby, Context context);
/**
* List labs in a resource group.
@@ -55,7 +54,7 @@ public interface LabsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of labs and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -64,19 +63,18 @@ public interface LabsClient {
* List labs in a resource group.
*
* @param resourceGroupName The name of the resource group.
- * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
- * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName').
+ * @param filter The filter to apply to the operation. Example: '$filter=contains(name,'myName')'.
* @param top The maximum number of resources to return from the operation. Example: '$top=10'.
* @param orderby The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of a list operation.
+ * @return contains a list of labs and their properties as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(
- String resourceGroupName, String expand, String filter, Integer top, String orderby, Context context);
+ String resourceGroupName, String filter, Integer top, String orderby, Context context);
/**
* Get lab.
@@ -96,16 +94,14 @@ PagedIterable listByResourceGroup(
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the lab.
- * @param expand Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return lab.
+ * @return lab along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String name, String expand, Context context);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);
/**
* Create or replace an existing lab. This operation can take a while to complete.
@@ -116,9 +112,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a lab.
+ * @return the {@link SyncPoller} for polling of a lab.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, LabInner> beginCreateOrUpdate(String resourceGroupName, String name, LabInner lab);
/**
@@ -131,9 +127,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a lab.
+ * @return the {@link SyncPoller} for polling of a lab.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, LabInner> beginCreateOrUpdate(
String resourceGroupName, String name, LabInner lab, Context context);
@@ -174,9 +170,9 @@ SyncPoller, LabInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String name);
/**
@@ -188,9 +184,9 @@ SyncPoller, LabInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context);
/**
@@ -223,7 +219,7 @@ SyncPoller, LabInner> beginCreateOrUpdate(
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the lab.
- * @param lab A lab.
+ * @param lab Allows modifying tags of labs. All other properties will be ignored.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -237,12 +233,12 @@ SyncPoller, LabInner> beginCreateOrUpdate(
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the lab.
- * @param lab A lab.
+ * @param lab Allows modifying tags of labs. All other properties will be ignored.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a lab.
+ * @return a lab along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(String resourceGroupName, String name, LabFragment lab, Context context);
@@ -255,9 +251,9 @@ SyncPoller, LabInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginClaimAnyVm(String resourceGroupName, String name);
/**
@@ -269,9 +265,9 @@ SyncPoller, LabInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginClaimAnyVm(String resourceGroupName, String name, Context context);
/**
@@ -308,11 +304,13 @@ SyncPoller, LabInner> beginCreateOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginCreateEnvironment(
- String resourceGroupName, String name, LabVirtualMachineCreationParameter labVirtualMachineCreationParameter);
+ String resourceGroupName,
+ String name,
+ LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter);
/**
* Create virtual machines in a lab. This operation can take a while to complete.
@@ -324,13 +322,13 @@ SyncPoller, Void> beginCreateEnvironment(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginCreateEnvironment(
String resourceGroupName,
String name,
- LabVirtualMachineCreationParameter labVirtualMachineCreationParameter,
+ LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter,
Context context);
/**
@@ -345,7 +343,9 @@ SyncPoller, Void> beginCreateEnvironment(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void createEnvironment(
- String resourceGroupName, String name, LabVirtualMachineCreationParameter labVirtualMachineCreationParameter);
+ String resourceGroupName,
+ String name,
+ LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter);
/**
* Create virtual machines in a lab. This operation can take a while to complete.
@@ -362,9 +362,35 @@ void createEnvironment(
void createEnvironment(
String resourceGroupName,
String name,
- LabVirtualMachineCreationParameter labVirtualMachineCreationParameter,
+ LabVirtualMachineCreationParameterInner labVirtualMachineCreationParameter,
Context context);
+ /**
+ * Ensure the current user has a valid profile in the lab.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the lab.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void ensureCurrentUserProfile(String resourceGroupName, String name);
+
+ /**
+ * Ensure the current user has a valid profile in the lab.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param name The name of the lab.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response ensureCurrentUserProfileWithResponse(String resourceGroupName, String name, Context context);
+
/**
* Exports the lab resource usage into a storage account This operation can take a while to complete.
*
@@ -374,9 +400,9 @@ void createEnvironment(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginExportResourceUsage(
String resourceGroupName, String name, ExportResourceUsageParameters exportResourceUsageParameters);
@@ -390,9 +416,9 @@ SyncPoller, Void> beginExportResourceUsage(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginExportResourceUsage(
String resourceGroupName,
String name,
@@ -456,7 +482,7 @@ GenerateUploadUriResponseInner generateUploadUri(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response body for generating an upload URI.
+ * @return response body for generating an upload URI along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response generateUploadUriWithResponse(
@@ -472,9 +498,9 @@ Response