diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md
index 1fa818252c6e..cd34878a1b53 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-11-25)
+- Azure Resource Manager RecoveryServicesBackup client library for Java. This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-08. 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-05-24)
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md
index 5c2914d45b0b..949f267e88c1 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager RecoveryServicesBackup client library for Java.
-This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-01. 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 RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-08. 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-recoveryservicesbackup
- 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/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md
new file mode 100644
index 000000000000..f93bade3953f
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md
@@ -0,0 +1,3292 @@
+# Code snippets and samples
+
+
+## AadPropertiesOperation
+
+- [Get](#aadpropertiesoperation_get)
+
+## BackupCrrJobDetails
+
+- [Get](#backupcrrjobdetails_get)
+
+## BackupCrrJobs
+
+- [List](#backupcrrjobs_list)
+
+## BackupEngines
+
+- [Get](#backupengines_get)
+- [List](#backupengines_list)
+
+## BackupJobs
+
+- [List](#backupjobs_list)
+
+## BackupOperationResults
+
+- [Get](#backupoperationresults_get)
+
+## BackupOperationStatuses
+
+- [Get](#backupoperationstatuses_get)
+
+## BackupPolicies
+
+- [List](#backuppolicies_list)
+
+## BackupProtectableItems
+
+- [List](#backupprotectableitems_list)
+
+## BackupProtectedItems
+
+- [List](#backupprotecteditems_list)
+
+## BackupProtectedItemsCrr
+
+- [List](#backupprotecteditemscrr_list)
+
+## BackupProtectionContainers
+
+- [List](#backupprotectioncontainers_list)
+
+## BackupProtectionIntent
+
+- [List](#backupprotectionintent_list)
+
+## BackupResourceEncryptionConfigs
+
+- [Get](#backupresourceencryptionconfigs_get)
+- [Update](#backupresourceencryptionconfigs_update)
+
+## BackupResourceStorageConfigs
+
+- [Get](#backupresourcestorageconfigs_get)
+- [Patch](#backupresourcestorageconfigs_patch)
+- [Update](#backupresourcestorageconfigs_update)
+
+## BackupResourceStorageConfigsNonCrr
+
+- [Get](#backupresourcestorageconfigsnoncrr_get)
+- [Patch](#backupresourcestorageconfigsnoncrr_patch)
+- [Update](#backupresourcestorageconfigsnoncrr_update)
+
+## BackupResourceVaultConfigs
+
+- [Get](#backupresourcevaultconfigs_get)
+- [Put](#backupresourcevaultconfigs_put)
+- [Update](#backupresourcevaultconfigs_update)
+
+## BackupStatus
+
+- [Get](#backupstatus_get)
+
+## BackupUsageSummaries
+
+- [List](#backupusagesummaries_list)
+
+## BackupUsageSummariesCrr
+
+- [List](#backupusagesummariescrr_list)
+
+## BackupWorkloadItems
+
+- [List](#backupworkloaditems_list)
+
+## Backups
+
+- [Trigger](#backups_trigger)
+
+## BmsPrepareDataMoveOperationResult
+
+- [Get](#bmspreparedatamoveoperationresult_get)
+
+## CrossRegionRestore
+
+- [Trigger](#crossregionrestore_trigger)
+
+## CrrOperationResults
+
+- [Get](#crroperationresults_get)
+
+## CrrOperationStatus
+
+- [Get](#crroperationstatus_get)
+
+## ExportJobsOperationResults
+
+- [Get](#exportjobsoperationresults_get)
+
+## FeatureSupport
+
+- [Validate](#featuresupport_validate)
+
+## ItemLevelRecoveryConnections
+
+- [Provision](#itemlevelrecoveryconnections_provision)
+- [Revoke](#itemlevelrecoveryconnections_revoke)
+
+## JobCancellations
+
+- [Trigger](#jobcancellations_trigger)
+
+## JobDetails
+
+- [Get](#jobdetails_get)
+
+## JobOperationResults
+
+- [Get](#joboperationresults_get)
+
+## Jobs
+
+- [Export](#jobs_export)
+
+## OperationOperation
+
+- [Validate](#operationoperation_validate)
+
+## Operations
+
+- [List](#operations_list)
+
+## PrivateEndpoint
+
+- [GetOperationStatus](#privateendpoint_getoperationstatus)
+
+## PrivateEndpointConnection
+
+- [Delete](#privateendpointconnection_delete)
+- [Get](#privateendpointconnection_get)
+- [Put](#privateendpointconnection_put)
+
+## ProtectableContainers
+
+- [List](#protectablecontainers_list)
+
+## ProtectedItemOperationResults
+
+- [Get](#protecteditemoperationresults_get)
+
+## ProtectedItemOperationStatuses
+
+- [Get](#protecteditemoperationstatuses_get)
+
+## ProtectedItems
+
+- [CreateOrUpdate](#protecteditems_createorupdate)
+- [Delete](#protecteditems_delete)
+- [Get](#protecteditems_get)
+
+## ProtectionContainerOperationResults
+
+- [Get](#protectioncontaineroperationresults_get)
+
+## ProtectionContainerRefreshOperationResults
+
+- [Get](#protectioncontainerrefreshoperationresults_get)
+
+## ProtectionContainers
+
+- [Get](#protectioncontainers_get)
+- [Inquire](#protectioncontainers_inquire)
+- [Refresh](#protectioncontainers_refresh)
+- [Register](#protectioncontainers_register)
+- [Unregister](#protectioncontainers_unregister)
+
+## ProtectionIntent
+
+- [CreateOrUpdate](#protectionintent_createorupdate)
+- [Delete](#protectionintent_delete)
+- [Get](#protectionintent_get)
+- [Validate](#protectionintent_validate)
+
+## ProtectionPolicies
+
+- [CreateOrUpdate](#protectionpolicies_createorupdate)
+- [Delete](#protectionpolicies_delete)
+- [Get](#protectionpolicies_get)
+
+## ProtectionPolicyOperationResults
+
+- [Get](#protectionpolicyoperationresults_get)
+
+## ProtectionPolicyOperationStatuses
+
+- [Get](#protectionpolicyoperationstatuses_get)
+
+## RecoveryPoints
+
+- [Get](#recoverypoints_get)
+- [GetAccessToken](#recoverypoints_getaccesstoken)
+- [List](#recoverypoints_list)
+
+## RecoveryPointsCrr
+
+- [List](#recoverypointscrr_list)
+
+## RecoveryPointsRecommendedForMove
+
+- [List](#recoverypointsrecommendedformove_list)
+
+## ResourceGuardProxies
+
+- [Get](#resourceguardproxies_get)
+
+## ResourceGuardProxyOperation
+
+- [Delete](#resourceguardproxyoperation_delete)
+- [Get](#resourceguardproxyoperation_get)
+- [Put](#resourceguardproxyoperation_put)
+- [UnlockDelete](#resourceguardproxyoperation_unlockdelete)
+
+## ResourceProvider
+
+- [BmsPrepareDataMove](#resourceprovider_bmspreparedatamove)
+- [BmsTriggerDataMove](#resourceprovider_bmstriggerdatamove)
+- [GetOperationStatus](#resourceprovider_getoperationstatus)
+- [MoveRecoveryPoint](#resourceprovider_moverecoverypoint)
+
+## Restores
+
+- [Trigger](#restores_trigger)
+
+## SecurityPINs
+
+- [Get](#securitypins_get)
+### AadPropertiesOperation_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AadPropertiesOperation Get. */
+public final class AadPropertiesOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/BackupAadProperties_Get.json
+ */
+ /**
+ * Sample code: Get AAD Properties for authentication in the third region.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getAADPropertiesForAuthenticationInTheThirdRegion(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.aadPropertiesOperations().getWithResponse("southeastasia", null, Context.NONE);
+ }
+}
+```
+
+### BackupCrrJobDetails_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.CrrJobRequest;
+
+/** Samples for BackupCrrJobDetails Get. */
+public final class BackupCrrJobDetailsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetCrrJob_Post.json
+ */
+ /**
+ * Sample code: Get Cross Region Restore Job Details in the secondary region.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getCrossRegionRestoreJobDetailsInTheSecondaryRegion(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupCrrJobDetails()
+ .getWithResponse(
+ "southeastasia",
+ new CrrJobRequest()
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Compute/VirtualMachines/testVm")
+ .withJobName("02585cc9-d7f4-4b46-860c-14c048cce178"),
+ Context.NONE);
+ }
+}
+```
+
+### BackupCrrJobs_List
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.CrrJobRequest;
+
+/** Samples for BackupCrrJobs List. */
+public final class BackupCrrJobsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/ListCrrJobs_Post.json
+ */
+ /**
+ * Sample code: List Cross Region Restore Jobs in the secondary region.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listCrossRegionRestoreJobsInTheSecondaryRegion(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupCrrJobs()
+ .list(
+ "southeastasia",
+ new CrrJobRequest()
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Compute/VirtualMachines/testVm")
+ .withJobName("02585cc9-d7f4-4b46-860c-14c048cce178"),
+ null,
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### BackupEngines_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupEngines Get. */
+public final class BackupEnginesGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Dpm/BackupEngines_Get.json
+ */
+ /**
+ * Sample code: Get Dpm/AzureBackupServer/Lajolla Backup Engine Details.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getDpmAzureBackupServerLajollaBackupEngineDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.backupEngines().getWithResponse("testVault", "testRG", "testServer", null, null, Context.NONE);
+ }
+}
+```
+
+### BackupEngines_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupEngines List. */
+public final class BackupEnginesListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Dpm/BackupEngines_List.json
+ */
+ /**
+ * Sample code: List Dpm/AzureBackupServer/Lajolla Backup Engines.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listDpmAzureBackupServerLajollaBackupEngines(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.backupEngines().list("testVault", "testRG", null, null, Context.NONE);
+ }
+}
+```
+
+### BackupJobs_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupJobs List. */
+public final class BackupJobsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/ListJobs.json
+ */
+ /**
+ * Sample code: List All Jobs.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listAllJobs(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.backupJobs().list("NetSDKTestRsVault", "SwaggerTestRg", null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/ListJobsWithAllSupportedFilters.json
+ */
+ /**
+ * Sample code: List Jobs With Filters.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listJobsWithFilters(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupJobs()
+ .list(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "startTime eq '2016-01-01 00:00:00 AM' and endTime eq '2017-11-29 00:00:00 AM' and operation eq"
+ + " 'Backup' and backupManagementType eq 'AzureIaasVM' and status eq 'InProgress'",
+ null,
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json
+ */
+ /**
+ * Sample code: List Jobs With Time Filter.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listJobsWithTimeFilter(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupJobs()
+ .list(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "startTime eq '2016-01-01 00:00:00 AM' and endTime eq '2017-11-29 00:00:00 AM'",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### BackupOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupOperationResults Get. */
+public final class BackupOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/ProtectedItem_Delete_OperationResult.json
+ */
+ /**
+ * Sample code: Get Result for Protected Item Delete Operation.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getResultForProtectedItemDeleteOperation(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupOperationResults()
+ .getWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### BackupOperationStatuses_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupOperationStatuses Get. */
+public final class BackupOperationStatusesGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/ProtectedItem_Delete_OperationStatus.json
+ */
+ /**
+ * Sample code: Get Protected Item Delete Operation Status.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedItemDeleteOperationStatus(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupOperationStatuses()
+ .getWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### BackupPolicies_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupPolicies List. */
+public final class BackupPoliciesListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/BackupPolicies_List.json
+ */
+ /**
+ * Sample code: List protection policies with backupManagementType filter as AzureWorkload.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupPolicies()
+ .list("NetSDKTestRsVault", "SwaggerTestRg", "backupManagementType eq 'AzureWorkload'", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/BackupPolicies_List.json
+ */
+ /**
+ * Sample code: List protection policies with backupManagementType filter as AzureIaasVm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupPolicies()
+ .list("NetSDKTestRsVault", "SwaggerTestRg", "backupManagementType eq 'AzureIaasVM'", Context.NONE);
+ }
+}
+```
+
+### BackupProtectableItems_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupProtectableItems List. */
+public final class BackupProtectableItemsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/BackupProtectableItems_List.json
+ */
+ /**
+ * Sample code: List protectable items with backupManagementType filter as AzureIaasVm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupProtectableItems()
+ .list("NetSDKTestRsVault", "SwaggerTestRg", "backupManagementType eq 'AzureIaasVM'", null, Context.NONE);
+ }
+}
+```
+
+### BackupProtectedItems_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupProtectedItems List. */
+public final class BackupProtectedItemsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/BackupProtectedItems_List.json
+ */
+ /**
+ * Sample code: List protected items with backupManagementType filter as AzureIaasVm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupProtectedItems()
+ .list(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "backupManagementType eq 'AzureIaasVM' and itemType eq 'VM'",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### BackupProtectedItemsCrr_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupProtectedItemsCrr List. */
+public final class BackupProtectedItemsCrrListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/BackupProtectedItems_List.json
+ */
+ /**
+ * Sample code: List protected items with backupManagementType filter as AzureIaasVm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupProtectedItemsCrrs()
+ .list(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "backupManagementType eq 'AzureIaasVM' and itemType eq 'VM'",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### BackupProtectionContainers_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupProtectionContainers List. */
+public final class BackupProtectionContainersListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureStorage/ProtectionContainers_List.json
+ */
+ /**
+ * Sample code: List Backup Protection Containers.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listBackupProtectionContainers(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupProtectionContainers()
+ .list("testVault", "testRg", "backupManagementType eq 'AzureWorkload'", Context.NONE);
+ }
+}
+```
+
+### BackupProtectionIntent_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupProtectionIntent List. */
+public final class BackupProtectionIntentListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/BackupProtectionIntent_List.json
+ */
+ /**
+ * Sample code: List protection intent with backupManagementType filter.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listProtectionIntentWithBackupManagementTypeFilter(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.backupProtectionIntents().list("myVault", "myRG", null, null, Context.NONE);
+ }
+}
+```
+
+### BackupResourceEncryptionConfigs_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupResourceEncryptionConfigs Get. */
+public final class BackupResourceEncryptionConfigsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/BackupResourceEncryptionConfig_Get.json
+ */
+ /**
+ * Sample code: Get Vault Encryption Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getVaultEncryptionConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.backupResourceEncryptionConfigs().getWithResponse("rishTestVault", "rishgrp", Context.NONE);
+ }
+}
+```
+
+### BackupResourceEncryptionConfigs_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource;
+import com.azure.resourcemanager.recoveryservicesbackup.models.EncryptionAtRestType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.InfrastructureEncryptionState;
+
+/** Samples for BackupResourceEncryptionConfigs Update. */
+public final class BackupResourceEncryptionConfigsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/BackupResourceEncryptionConfig_Put.json
+ */
+ /**
+ * Sample code: Update Vault Encryption Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updateVaultEncryptionConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceEncryptionConfigs()
+ .updateWithResponse(
+ "source-rsv",
+ "test-rg",
+ new BackupResourceEncryptionConfigResource()
+ .withProperties(
+ new BackupResourceEncryptionConfig()
+ .withEncryptionAtRestType(EncryptionAtRestType.CUSTOMER_MANAGED)
+ .withKeyUri("https://gktestkv1.vault.azure.net/keys/Test1/ed2e8cdc7f86477ebf0c6462b504a9ed")
+ .withSubscriptionId("1a2311d9-66f5-47d3-a9fb-7a37da63934b")
+ .withInfrastructureEncryptionState(InfrastructureEncryptionState.fromString("true"))),
+ Context.NONE);
+ }
+}
+```
+
+### BackupResourceStorageConfigs_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupResourceStorageConfigs Get. */
+public final class BackupResourceStorageConfigsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Get.json
+ */
+ /**
+ * Sample code: Get Vault Storage Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getVaultStorageConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceStorageConfigs()
+ .getWithResponse("PySDKBackupTestRsVault", "PythonSDKBackupTestRg", Context.NONE);
+ }
+}
+```
+
+### BackupResourceStorageConfigs_Patch
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState;
+
+/** Samples for BackupResourceStorageConfigs Patch. */
+public final class BackupResourceStorageConfigsPatchSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Patch.json
+ */
+ /**
+ * Sample code: Update Vault Storage Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updateVaultStorageConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceStorageConfigs()
+ .patchWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ new BackupResourceConfigResourceInner()
+ .withProperties(
+ new BackupResourceConfig()
+ .withStorageType(StorageType.LOCALLY_REDUNDANT)
+ .withStorageTypeState(StorageTypeState.UNLOCKED)),
+ Context.NONE);
+ }
+}
+```
+
+### BackupResourceStorageConfigs_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState;
+
+/** Samples for BackupResourceStorageConfigs Update. */
+public final class BackupResourceStorageConfigsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Put.json
+ */
+ /**
+ * Sample code: Update Vault Storage Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updateVaultStorageConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceStorageConfigs()
+ .updateWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ new BackupResourceConfigResourceInner()
+ .withProperties(
+ new BackupResourceConfig()
+ .withStorageType(StorageType.LOCALLY_REDUNDANT)
+ .withStorageTypeState(StorageTypeState.UNLOCKED)),
+ Context.NONE);
+ }
+}
+```
+
+### BackupResourceStorageConfigsNonCrr_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupResourceStorageConfigsNonCrr Get. */
+public final class BackupResourceStorageConfigsNonCrrGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupStorageConfig_Get.json
+ */
+ /**
+ * Sample code: Get Vault Storage Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getVaultStorageConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceStorageConfigsNonCrrs()
+ .getWithResponse("PySDKBackupTestRsVault", "PythonSDKBackupTestRg", Context.NONE);
+ }
+}
+```
+
+### BackupResourceStorageConfigsNonCrr_Patch
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState;
+
+/** Samples for BackupResourceStorageConfigsNonCrr Patch. */
+public final class BackupResourceStorageConfigsNonCrrPatchSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupStorageConfig_Patch.json
+ */
+ /**
+ * Sample code: Update Vault Storage Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updateVaultStorageConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceStorageConfigsNonCrrs()
+ .patchWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ new BackupResourceConfigResourceInner()
+ .withProperties(
+ new BackupResourceConfig()
+ .withStorageType(StorageType.LOCALLY_REDUNDANT)
+ .withStorageTypeState(StorageTypeState.UNLOCKED)),
+ Context.NONE);
+ }
+}
+```
+
+### BackupResourceStorageConfigsNonCrr_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState;
+
+/** Samples for BackupResourceStorageConfigsNonCrr Update. */
+public final class BackupResourceStorageConfigsNonCrrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupStorageConfig_Put.json
+ */
+ /**
+ * Sample code: Update Vault Storage Configuration.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updateVaultStorageConfiguration(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceStorageConfigsNonCrrs()
+ .updateWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ new BackupResourceConfigResourceInner()
+ .withProperties(
+ new BackupResourceConfig()
+ .withStorageType(StorageType.LOCALLY_REDUNDANT)
+ .withStorageTypeState(StorageTypeState.UNLOCKED)),
+ Context.NONE);
+ }
+}
+```
+
+### BackupResourceVaultConfigs_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupResourceVaultConfigs Get. */
+public final class BackupResourceVaultConfigsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupResourceVaultConfigs_Get.json
+ */
+ /**
+ * Sample code: Get Vault Security Config.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getVaultSecurityConfig(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.backupResourceVaultConfigs().getWithResponse("SwaggerTest", "SwaggerTestRg", Context.NONE);
+ }
+}
+```
+
+### BackupResourceVaultConfigs_Put
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityState;
+import com.azure.resourcemanager.recoveryservicesbackup.models.SoftDeleteFeatureState;
+
+/** Samples for BackupResourceVaultConfigs Put. */
+public final class BackupResourceVaultConfigsPutSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupResourceVaultConfigs_Put.json
+ */
+ /**
+ * Sample code: Update Vault Security Config.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updateVaultSecurityConfig(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceVaultConfigs()
+ .putWithResponse(
+ "SwaggerTest",
+ "SwaggerTestRg",
+ new BackupResourceVaultConfigResourceInner()
+ .withProperties(
+ new BackupResourceVaultConfig()
+ .withEnhancedSecurityState(EnhancedSecurityState.ENABLED)
+ .withSoftDeleteFeatureState(SoftDeleteFeatureState.ENABLED)),
+ Context.NONE);
+ }
+}
+```
+
+### BackupResourceVaultConfigs_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityState;
+
+/** Samples for BackupResourceVaultConfigs Update. */
+public final class BackupResourceVaultConfigsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupResourceVaultConfigs_Patch.json
+ */
+ /**
+ * Sample code: Update Vault Security Config.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updateVaultSecurityConfig(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupResourceVaultConfigs()
+ .updateWithResponse(
+ "SwaggerTest",
+ "SwaggerTestRg",
+ new BackupResourceVaultConfigResourceInner()
+ .withProperties(
+ new BackupResourceVaultConfig().withEnhancedSecurityState(EnhancedSecurityState.ENABLED)),
+ Context.NONE);
+ }
+}
+```
+
+### BackupStatus_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupStatusRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType;
+
+/** Samples for BackupStatus Get. */
+public final class BackupStatusGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/GetBackupStatus.json
+ */
+ /**
+ * Sample code: Get Azure Virtual Machine Backup Status.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getAzureVirtualMachineBackupStatus(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupStatus()
+ .getWithResponse(
+ "southeastasia",
+ new BackupStatusRequest()
+ .withResourceType(DataSourceType.VM)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Compute/VirtualMachines/testVm"),
+ Context.NONE);
+ }
+}
+```
+
+### BackupUsageSummaries_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupUsageSummaries List. */
+public final class BackupUsageSummariesListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json
+ */
+ /**
+ * Sample code: Get Protected Items Usages Summary.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedItemsUsagesSummary(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupUsageSummaries()
+ .list("testVault", "testRG", "type eq 'BackupProtectedItemCountSummary'", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json
+ */
+ /**
+ * Sample code: Get Protected Containers Usages Summary.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedContainersUsagesSummary(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupUsageSummaries()
+ .list("testVault", "testRG", "type eq 'BackupProtectionContainerCountSummary'", null, Context.NONE);
+ }
+}
+```
+
+### BackupUsageSummariesCrr_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupUsageSummariesCrr List. */
+public final class BackupUsageSummariesCrrListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupProtectedItem_UsageSummary_Get.json
+ */
+ /**
+ * Sample code: Get Protected Items Usages Summary.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedItemsUsagesSummary(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupUsageSummariesCrrs()
+ .list("testVault", "testRG", "type eq 'BackupProtectedItemCountSummary'", null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupProtectionContainers_UsageSummary_Get.json
+ */
+ /**
+ * Sample code: Get Protected Containers Usages Summary.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedContainersUsagesSummary(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupUsageSummariesCrrs()
+ .list("testVault", "testRG", "type eq 'BackupProtectionContainerCountSummary'", null, Context.NONE);
+ }
+}
+```
+
+### BackupWorkloadItems_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BackupWorkloadItems List. */
+public final class BackupWorkloadItemsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/BackupWorkloadItems_List.json
+ */
+ /**
+ * Sample code: List Workload Items in Container.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listWorkloadItemsInContainer(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backupWorkloadItems()
+ .list(
+ "suchandr-seacan-rsv",
+ "testRg",
+ "Azure",
+ "VMAppContainer;Compute;bvtdtestag;sqlserver-1",
+ "backupManagementType eq 'AzureWorkload'",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### Backups_Trigger
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequestResource;
+import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMBackupRequest;
+
+/** Samples for Backups Trigger. */
+public final class BackupsTriggerSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/TriggerBackup_Post.json
+ */
+ /**
+ * Sample code: Trigger Backup.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void triggerBackup(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .backups()
+ .triggerWithResponse(
+ "linuxRsVault",
+ "linuxRsVaultRG",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;testrg;v1win2012r",
+ "VM;iaasvmcontainerv2;testrg;v1win2012r",
+ new BackupRequestResource().withProperties(new IaasVMBackupRequest()),
+ Context.NONE);
+ }
+}
+```
+
+### BmsPrepareDataMoveOperationResult_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BmsPrepareDataMoveOperationResult Get. */
+public final class BmsPrepareDataMoveOperationResultGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json
+ */
+ /**
+ * Sample code: Get operation result for PrepareDataMove.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getOperationResultForPrepareDataMove(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .bmsPrepareDataMoveOperationResults()
+ .getWithResponse("source-rsv", "sourceRG", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### CrossRegionRestore_Trigger
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.CrossRegionRestoreRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.EncryptionDetails;
+import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRestoreRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.IdentityInfo;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadCrrAccessToken;
+import java.util.Arrays;
+
+/** Samples for CrossRegionRestore Trigger. */
+public final class CrossRegionRestoreTriggerSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/TriggerCrossRegionRestore_Post.json
+ */
+ /**
+ * Sample code: Trigger Cross Region Restore.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void triggerCrossRegionRestore(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .crossRegionRestores()
+ .trigger(
+ "southeastasia",
+ new CrossRegionRestoreRequest()
+ .withCrossRegionRestoreAccessDetails(
+ new WorkloadCrrAccessToken()
+ .withAccessTokenString(
+ "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkhqaUJHdVExa2lWV2hyc2lzLUhEckhyWVZNbyJ9.eyJVc2VySWRlbnRpdHlUeXBlIjoiQUFEIiwiQWFkVGVuYW50SWQiOiIzM2UwMTkyMS00ZDY0LTRmOGMtYTA1NS01YmRhZmZkNWUzM2QiLCJBYWRTUE9iamVjdElkIjoiOTMzMjc2ZmMtMWJiNy00ZWNiLTk0ZTYtYWY3ODMyNWY3MjZhIiwiUmVzdG9yZVBvaW50UGVybWlzc2lvbnMiOiJSZWFkIiwiUmVzdG9yZVBvaW50SUQiOiJyZXNvdXJjZXMvMTMzMDgzNzkwNjQxODEzODE2MC9wcm90ZWN0aW9uQ29udGFpbmVycy8xMTE0Ni9wcm90ZWN0ZWRJdGVtcy8xMTQyOTM3MDMxL3JlY292ZXJ5UG9pbnRzLzg3MTc4MzU1MzkyNzE2IiwiaXNzIjoiaHR0cHM6Ly9SZWNvdmVyeVNlcnZpY2UiLCJhdWQiOiJodHRwczovL1JlY292ZXJ5U2VydmljZXMvUHJvdGVjdGlvblNlcnZpY2UiLCJleHAiOjE1NzExMjE5ODYsIm5iZiI6MTU3MTAzNTI4Nn0.oNbeX8ueE6JRGU0IagFjkOlU-o48ez9gCeCrn1-8XEsaVtYJIFKq9FeHfPAoCMxiLQvwL7S0JTjDTjiEsZEvr_VM7tDVwW3sESo2oW-SZlxT_1dJiUBn0jVlQyfDcHEMzbkaTuZswgNWfowgOrnJ67y-ztSUcegf3eVKPEhN1enBBS7pIuL9bZ3SVwMuqznUen6dH54y9lN2w6H14X0UK2CwSN94Uh-spB27j9SbksxLY_tyZm6xsamZFTHpwbgZwR24-GDtElPSxpFL6n_tWLSCHQtN9s84o0X7PfFaMkVmGWbOf4AZmP9M6agagG0JLnlOwObr07YrzZRkg3s2eQ")
+ .withSubscriptionId("f2edfd5d-5496-4683-b94f-b3588c579009")
+ .withResourceGroupName("srinivasccyrg")
+ .withResourceName("sriniccyvault")
+ .withResourceId("1330837906418138160")
+ .withRecoveryPointId("87178355392716")
+ .withRecoveryPointTime("10/9/2019 6:05:54 PM")
+ .withContainerName("iaasvmcontainerv2;srinivasccyrg;sriniccylinux")
+ .withContainerType("IaasVMContainer")
+ .withBackupManagementType("AzureIaasVM")
+ .withDatasourceType("VM")
+ .withDatasourceName("sriniccylinux")
+ .withDatasourceId("1142937031")
+ .withDatasourceContainerName("iaasvmcontainerv2;srinivasccyrg;sriniccylinux")
+ .withCoordinatorServiceStampUri("https://pod01-coord1.ccy.backup.windowsazure.com")
+ .withProtectionServiceStampId("90d98224-2ac6-4bda-9f35-33fb22841f2a")
+ .withProtectionServiceStampUri("https://pod01-prot1-int.ccy.backup.windowsazure.com")
+ .withTokenExtendedInformation(
+ "V2015_09f2edfd5d-5496-4683-b94f-b3588c579009;AzureBackup_sriniccylinux_1142937031;AzureBackup_20191009_060554;AzureBackupRG_centraluseuap_1truetruefalseLinuxFileSystemConsistentPremiumVMOnPremiumStorageStandard_D2s_v3"))
+ .withRestoreRequest(
+ new IaasVMRestoreRequest()
+ .withRecoveryPointId("87178355392716")
+ .withRecoveryType(RecoveryType.ALTERNATE_LOCATION)
+ .withSourceResourceId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/srinivasccyrg/providers/Microsoft.Compute/virtualMachines/sriniccylinux")
+ .withTargetVirtualMachineId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl/providers/Microsoft.Compute/virtualMachines/gaallaVM")
+ .withTargetResourceGroupId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl")
+ .withStorageAccountId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00prjaiTestRg1/providers/Microsoft.Storage/storageAccounts/00prjaitestrg1disks993")
+ .withVirtualNetworkId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet")
+ .withSubnetId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet/subnets/default")
+ .withRegion("eastus2euap")
+ .withAffinityGroup("")
+ .withCreateNewCloudService(false)
+ .withOriginalStorageAccountOption(false)
+ .withEncryptionDetails(new EncryptionDetails().withEncryptionEnabled(false))
+ .withZones(Arrays.asList("2"))
+ .withIdentityInfo(
+ new IdentityInfo()
+ .withIsSystemAssignedIdentity(false)
+ .withManagedIdentityResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asmaskarRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asmaskartestmsi"))),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/TriggerCrossRegionRestore_IdentityBasedRestoreDetails_Post.json
+ */
+ /**
+ * Sample code: Trigger Cross Region Restore with identityBasedRestoreDetails.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void triggerCrossRegionRestoreWithIdentityBasedRestoreDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .crossRegionRestores()
+ .trigger(
+ "southeastasia",
+ new CrossRegionRestoreRequest()
+ .withCrossRegionRestoreAccessDetails(
+ new WorkloadCrrAccessToken()
+ .withAccessTokenString(
+ "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkhqaUJHdVExa2lWV2hyc2lzLUhEckhyWVZNbyJ9.eyJVc2VySWRlbnRpdHlUeXBlIjoiQUFEIiwiQWFkVGVuYW50SWQiOiIzM2UwMTkyMS00ZDY0LTRmOGMtYTA1NS01YmRhZmZkNWUzM2QiLCJBYWRTUE9iamVjdElkIjoiOTMzMjc2ZmMtMWJiNy00ZWNiLTk0ZTYtYWY3ODMyNWY3MjZhIiwiUmVzdG9yZVBvaW50UGVybWlzc2lvbnMiOiJSZWFkIiwiUmVzdG9yZVBvaW50SUQiOiJyZXNvdXJjZXMvMTMzMDgzNzkwNjQxODEzODE2MC9wcm90ZWN0aW9uQ29udGFpbmVycy8xMTE0Ni9wcm90ZWN0ZWRJdGVtcy8xMTQyOTM3MDMxL3JlY292ZXJ5UG9pbnRzLzg3MTc4MzU1MzkyNzE2IiwiaXNzIjoiaHR0cHM6Ly9SZWNvdmVyeVNlcnZpY2UiLCJhdWQiOiJodHRwczovL1JlY292ZXJ5U2VydmljZXMvUHJvdGVjdGlvblNlcnZpY2UiLCJleHAiOjE1NzExMjE5ODYsIm5iZiI6MTU3MTAzNTI4Nn0.oNbeX8ueE6JRGU0IagFjkOlU-o48ez9gCeCrn1-8XEsaVtYJIFKq9FeHfPAoCMxiLQvwL7S0JTjDTjiEsZEvr_VM7tDVwW3sESo2oW-SZlxT_1dJiUBn0jVlQyfDcHEMzbkaTuZswgNWfowgOrnJ67y-ztSUcegf3eVKPEhN1enBBS7pIuL9bZ3SVwMuqznUen6dH54y9lN2w6H14X0UK2CwSN94Uh-spB27j9SbksxLY_tyZm6xsamZFTHpwbgZwR24-GDtElPSxpFL6n_tWLSCHQtN9s84o0X7PfFaMkVmGWbOf4AZmP9M6agagG0JLnlOwObr07YrzZRkg3s2eQ")
+ .withSubscriptionId("f2edfd5d-5496-4683-b94f-b3588c579009")
+ .withResourceGroupName("srinivasccyrg")
+ .withResourceName("sriniccyvault")
+ .withResourceId("1330837906418138160")
+ .withRecoveryPointId("87178355392716")
+ .withRecoveryPointTime("10/9/2019 6:05:54 PM")
+ .withContainerName("iaasvmcontainerv2;srinivasccyrg;sriniccylinux")
+ .withContainerType("IaasVMContainer")
+ .withBackupManagementType("AzureIaasVM")
+ .withDatasourceType("VM")
+ .withDatasourceName("sriniccylinux")
+ .withDatasourceId("1142937031")
+ .withDatasourceContainerName("iaasvmcontainerv2;srinivasccyrg;sriniccylinux")
+ .withCoordinatorServiceStampUri("https://pod01-coord1.ccy.backup.windowsazure.com")
+ .withProtectionServiceStampId("90d98224-2ac6-4bda-9f35-33fb22841f2a")
+ .withProtectionServiceStampUri("https://pod01-prot1-int.ccy.backup.windowsazure.com")
+ .withTokenExtendedInformation(
+ "V2015_09f2edfd5d-5496-4683-b94f-b3588c579009;AzureBackup_sriniccylinux_1142937031;AzureBackup_20191009_060554;AzureBackupRG_centraluseuap_1truetruefalseLinuxFileSystemConsistentPremiumVMOnPremiumStorageStandard_D2s_v3"))
+ .withRestoreRequest(
+ new IaasVMRestoreRequest()
+ .withRecoveryPointId("87178355392716")
+ .withRecoveryType(RecoveryType.ALTERNATE_LOCATION)
+ .withSourceResourceId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/srinivasccyrg/providers/Microsoft.Compute/virtualMachines/sriniccylinux")
+ .withTargetVirtualMachineId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl/providers/Microsoft.Compute/virtualMachines/gaallaVM")
+ .withTargetResourceGroupId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl")
+ .withVirtualNetworkId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet")
+ .withSubnetId(
+ "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet/subnets/default")
+ .withRegion("eastus2euap")
+ .withAffinityGroup("")
+ .withCreateNewCloudService(false)
+ .withOriginalStorageAccountOption(false)
+ .withEncryptionDetails(new EncryptionDetails().withEncryptionEnabled(false))
+ .withZones(Arrays.asList("2"))
+ .withIdentityInfo(
+ new IdentityInfo()
+ .withIsSystemAssignedIdentity(false)
+ .withManagedIdentityResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asmaskarRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asmaskartestmsi"))),
+ Context.NONE);
+ }
+}
+```
+
+### CrrOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CrrOperationResults Get. */
+public final class CrrOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetCrrOperationResults_Get.json
+ */
+ /**
+ * Sample code: Get Operation Results for Cross Region Restore.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getOperationResultsForCrossRegionRestore(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .crrOperationResults()
+ .getWithResponse("southeastasia", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### CrrOperationStatus_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for CrrOperationStatus Get. */
+public final class CrrOperationStatusGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetCrrOperationStatus_Get.json
+ */
+ /**
+ * Sample code: Get Operation Status for Cross Region Restore.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getOperationStatusForCrossRegionRestore(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .crrOperationStatus()
+ .getWithResponse("southeastasia", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### ExportJobsOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ExportJobsOperationResults Get. */
+public final class ExportJobsOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/ExportJobsOperationResult.json
+ */
+ /**
+ * Sample code: Export Jobs Operation Results.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void exportJobsOperationResults(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .exportJobsOperationResults()
+ .getWithResponse(
+ "NetSDKTestRsVault", "SwaggerTestRg", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### FeatureSupport_Validate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMResourceFeatureSupportRequest;
+
+/** Samples for FeatureSupport Validate. */
+public final class FeatureSupportValidateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/BackupFeature_Validate.json
+ */
+ /**
+ * Sample code: Check Azure Vm Backup Feature Support.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void checkAzureVmBackupFeatureSupport(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .featureSupports()
+ .validateWithResponse(
+ "southeastasia",
+ new AzureVMResourceFeatureSupportRequest().withVmSize("Basic_A0").withVmSku("Premium"),
+ Context.NONE);
+ }
+}
+```
+
+### ItemLevelRecoveryConnections_Provision
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVmilrRegistrationRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequestResource;
+
+/** Samples for ItemLevelRecoveryConnections Provision. */
+public final class ItemLevelRecoveryConnectionsProvisionSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/Provision_Ilr.json
+ */
+ /**
+ * Sample code: Provision Instant Item Level Recovery for Azure Vm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void provisionInstantItemLevelRecoveryForAzureVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .itemLevelRecoveryConnections()
+ .provisionWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ "Azure",
+ "iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
+ "vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
+ "1",
+ new IlrRequestResource()
+ .withProperties(
+ new IaasVmilrRegistrationRequest()
+ .withRecoveryPointId("38823086363464")
+ .withVirtualMachineId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pysdktestrg/providers/Microsoft.Compute/virtualMachines/pysdktestv2vm1")
+ .withInitiatorName("Hello World")
+ .withRenewExistingRegistration(true)),
+ Context.NONE);
+ }
+}
+```
+
+### ItemLevelRecoveryConnections_Revoke
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ItemLevelRecoveryConnections Revoke. */
+public final class ItemLevelRecoveryConnectionsRevokeSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/Revoke_Ilr.json
+ */
+ /**
+ * Sample code: Revoke Instant Item Level Recovery for Azure Vm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void revokeInstantItemLevelRecoveryForAzureVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .itemLevelRecoveryConnections()
+ .revokeWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ "Azure",
+ "iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
+ "vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
+ "1",
+ Context.NONE);
+ }
+}
+```
+
+### JobCancellations_Trigger
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobCancellations Trigger. */
+public final class JobCancellationsTriggerSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/TriggerCancelJob.json
+ */
+ /**
+ * Sample code: Cancel Job.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void cancelJob(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .jobCancellations()
+ .triggerWithResponse(
+ "NetSDKTestRsVault", "SwaggerTestRg", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### JobDetails_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobDetails Get. */
+public final class JobDetailsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/GetJobDetails.json
+ */
+ /**
+ * Sample code: Get Job Details.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getJobDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .jobDetails()
+ .getWithResponse(
+ "NetSDKTestRsVault", "SwaggerTestRg", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### JobOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for JobOperationResults Get. */
+public final class JobOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/CancelJobOperationResult.json
+ */
+ /**
+ * Sample code: Cancel Job Operation Result.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void cancelJobOperationResult(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .jobOperationResults()
+ .getWithResponse(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "00000000-0000-0000-0000-000000000000",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### Jobs_Export
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs Export. */
+public final class JobsExportSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/TriggerExportJobs.json
+ */
+ /**
+ * Sample code: Export Jobs.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void exportJobs(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.jobs().exportWithResponse("NetSDKTestRsVault", "SwaggerTestRg", null, Context.NONE);
+ }
+}
+```
+
+### OperationOperation_Validate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest;
+
+/** Samples for OperationOperation Validate. */
+public final class OperationOperationValidateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json
+ */
+ /**
+ * Sample code: Validate Operation.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void validateOperation(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .operationOperations()
+ .validateWithResponse("testVault", "testRG", new ValidateOperationRequest(), Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/ListOperations.json
+ */
+ /**
+ * Sample code: ListOperations.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listOperations(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### PrivateEndpoint_GetOperationStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpoint GetOperationStatus. */
+public final class PrivateEndpointGetOperationStatusSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json
+ */
+ /**
+ * Sample code: Get OperationStatus.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getOperationStatus(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .privateEndpoints()
+ .getOperationStatusWithResponse(
+ "gaallavaultbvtd2msi",
+ "gaallaRG",
+ "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b",
+ "0f48183b-0a44-4dca-aec1-bba5daab888a",
+ Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnection_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnection Delete. */
+public final class PrivateEndpointConnectionDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Delete PrivateEndpointConnection.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void deletePrivateEndpointConnection(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .privateEndpointConnections()
+ .delete(
+ "gaallavaultbvtd2msi", "gaallaRG", "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnection_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnection Get. */
+public final class PrivateEndpointConnectionGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Get PrivateEndpointConnection.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getPrivateEndpointConnection(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse(
+ "gaallavaultbvtd2msi", "gaallaRG", "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnection_Put
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoint;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionResource;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionStatus;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateLinkServiceConnectionState;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ProvisioningState;
+
+/** Samples for PrivateEndpointConnection Put. */
+public final class PrivateEndpointConnectionPutSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Update PrivateEndpointConnection.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void updatePrivateEndpointConnection(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ PrivateEndpointConnectionResource resource =
+ manager
+ .privateEndpointConnections()
+ .getWithResponse(
+ "gaallavaultbvtd2msi",
+ "gaallaRG",
+ "gaallatestpe2.5704c932-249a-490b-a142-1396838cd3b",
+ Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new PrivateEndpointConnection()
+ .withProvisioningState(ProvisioningState.SUCCEEDED)
+ .withPrivateEndpoint(
+ new PrivateEndpoint()
+ .withId(
+ "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/gaallaRG/providers/Microsoft.Network/privateEndpoints/gaallatestpe3"))
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointConnectionStatus.APPROVED)
+ .withDescription("Approved by johndoe@company.com")))
+ .apply();
+ }
+}
+```
+
+### ProtectableContainers_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectableContainers List. */
+public final class ProtectableContainersListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureStorage/ProtectableContainers_List.json
+ */
+ /**
+ * Sample code: List protectable items with backupManagementType filter as AzureStorage.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void listProtectableItemsWithBackupManagementTypeFilterAsAzureStorage(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectableContainers()
+ .list(
+ "testvault",
+ "testRg",
+ "Azure",
+ "backupManagementType eq 'AzureStorage' and workloadType eq 'AzureFileShare'",
+ Context.NONE);
+ }
+}
+```
+
+### ProtectedItemOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectedItemOperationResults Get. */
+public final class ProtectedItemOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectedItemOperationResults.json
+ */
+ /**
+ * Sample code: Get Operation Results of Protected Vm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getOperationResultsOfProtectedVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectedItemOperationResults()
+ .getWithResponse(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### ProtectedItemOperationStatuses_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectedItemOperationStatuses Get. */
+public final class ProtectedItemOperationStatusesGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json
+ */
+ /**
+ * Sample code: Get Operation Status of Protected Vm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getOperationStatusOfProtectedVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectedItemOperationStatuses()
+ .getWithResponse(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### ProtectedItems_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem;
+
+/** Samples for ProtectedItems CreateOrUpdate. */
+public final class ProtectedItemsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/StopProtection.json
+ */
+ /**
+ * Sample code: Stop Protection with retain data on Azure IaasVm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void stopProtectionWithRetainDataOnAzureIaasVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectedItems()
+ .define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
+ .withRegion((String) null)
+ .withExistingProtectionContainer(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
+ .withProperties(
+ new ProtectedItem()
+ .withSourceResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ConfigureProtection.json
+ */
+ /**
+ * Sample code: Enable Protection on Azure IaasVm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void enableProtectionOnAzureIaasVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectedItems()
+ .define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
+ .withRegion((String) null)
+ .withExistingProtectionContainer(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
+ .withProperties(
+ new ProtectedItem()
+ .withSourceResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1")
+ .withPolicyId(
+ "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy"))
+ .create();
+ }
+}
+```
+
+### ProtectedItems_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectedItems Delete. */
+public final class ProtectedItemsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/ProtectedItem_Delete.json
+ */
+ /**
+ * Sample code: Delete Protection from Azure Virtual Machine.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void deleteProtectionFromAzureVirtualMachine(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectedItems()
+ .deleteWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ "Azure",
+ "iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
+ "vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
+ Context.NONE);
+ }
+}
+```
+
+### ProtectedItems_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectedItems Get. */
+public final class ProtectedItemsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json
+ */
+ /**
+ * Sample code: Get Protected Classic Virtual Machine Details.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedClassicVirtualMachineDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectedItems()
+ .getWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ "Azure",
+ "iaasvmcontainer;iaasvmcontainer;iaasvm-rg;iaasvm-1",
+ "vm;iaasvmcontainer;iaasvm-rg;iaasvm-1",
+ null,
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json
+ */
+ /**
+ * Sample code: Get Protected Virtual Machine Details.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedVirtualMachineDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectedItems()
+ .getWithResponse(
+ "PySDKBackupTestRsVault",
+ "PythonSDKBackupTestRg",
+ "Azure",
+ "iaasvmcontainer;iaasvmcontainerv2;iaasvm-rg;iaasvm-1",
+ "vm;iaasvmcontainerv2;iaasvm-rg;iaasvm-1",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### ProtectionContainerOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionContainerOperationResults Get. */
+public final class ProtectionContainerOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json
+ */
+ /**
+ * Sample code: Get Azure Storage Protection Container Operation Result.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getAzureStorageProtectionContainerOperationResult(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionContainerOperationResults()
+ .getWithResponse(
+ "testvault",
+ "test-rg",
+ "Azure",
+ "VMAppContainer;Compute;testRG;testSQL",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### ProtectionContainerRefreshOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionContainerRefreshOperationResults Get. */
+public final class ProtectionContainerRefreshOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/RefreshContainers_OperationResults.json
+ */
+ /**
+ * Sample code: Azure Vm Discovery Operation Result.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void azureVmDiscoveryOperationResult(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionContainerRefreshOperationResults()
+ .getWithResponse(
+ "NetSDKTestRsVault", "SwaggerTestRg", "Azure", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### ProtectionContainers_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionContainers Get. */
+public final class ProtectionContainersGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/ProtectionContainers_Get.json
+ */
+ /**
+ * Sample code: Get Protection Container Details.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectionContainerDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionContainers()
+ .getWithResponse("testVault", "testRg", "Azure", "VMAppContainer;Compute;testRG;testSQL", Context.NONE);
+ }
+}
+```
+
+### ProtectionContainers_Inquire
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionContainers Inquire. */
+public final class ProtectionContainersInquireSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureStorage/ProtectionContainers_Inquire.json
+ */
+ /**
+ * Sample code: Inquire Azure Storage Protection Containers.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void inquireAzureStorageProtectionContainers(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionContainers()
+ .inquireWithResponse(
+ "testvault", "test-rg", "Azure", "storagecontainer;Storage;test-rg;teststorage", null, Context.NONE);
+ }
+}
+```
+
+### ProtectionContainers_Refresh
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionContainers Refresh. */
+public final class ProtectionContainersRefreshSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/RefreshContainers.json
+ */
+ /**
+ * Sample code: Trigger Azure Vm Discovery.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void triggerAzureVmDiscovery(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionContainers()
+ .refreshWithResponse("NetSDKTestRsVault", "SwaggerTestRg", "Azure", null, Context.NONE);
+ }
+}
+```
+
+### ProtectionContainers_Register
+
+```java
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainer;
+
+/** Samples for ProtectionContainers Register. */
+public final class ProtectionContainersRegisterSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureStorage/ProtectionContainers_Register.json
+ */
+ /**
+ * Sample code: RegisterAzure Storage ProtectionContainers.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void registerAzureStorageProtectionContainers(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionContainers()
+ .define("VMAppContainer;Compute;testRG;testSQL")
+ .withRegion((String) null)
+ .withExistingBackupFabric("testvault", "test-rg", "Azure")
+ .withProperties(
+ new ProtectionContainer()
+ .withFriendlyName("testSQL")
+ .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD))
+ .create();
+ }
+}
+```
+
+### ProtectionContainers_Unregister
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionContainers Unregister. */
+public final class ProtectionContainersUnregisterSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/ProtectionContainers_Unregister.json
+ */
+ /**
+ * Sample code: Unregister Protection Container.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void unregisterProtectionContainer(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionContainers()
+ .unregisterWithResponse(
+ "testVault", "testRg", "Azure", "storagecontainer;Storage;test-rg;teststorage", Context.NONE);
+ }
+}
+```
+
+### ProtectionIntent_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.recoveryservicesbackup.models.AzureResourceProtectionIntent;
+
+/** Samples for ProtectionIntent CreateOrUpdate. */
+public final class ProtectionIntentCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create or Update Azure Vm Protection Intent.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void createOrUpdateAzureVmProtectionIntent(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionIntents()
+ .define("vm;iaasvmcontainerv2;chamsrgtest;chamscandel")
+ .withRegion((String) null)
+ .withExistingBackupFabric("myVault", "myRG", "Azure")
+ .withProperties(
+ new AzureResourceProtectionIntent()
+ .withSourceResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/chamsrgtest/providers/Microsoft.Compute/virtualMachines/chamscandel")
+ .withPolicyId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.RecoveryServices/vaults/myVault/backupPolicies/myPolicy"))
+ .create();
+ }
+}
+```
+
+### ProtectionIntent_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionIntent Delete. */
+public final class ProtectionIntentDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json
+ */
+ /**
+ * Sample code: Delete Protection intent from item.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void deleteProtectionIntentFromItem(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionIntents()
+ .deleteWithResponse("myVault", "myRG", "Azure", "249D9B07-D2EF-4202-AA64-65F35418564E", Context.NONE);
+ }
+}
+```
+
+### ProtectionIntent_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionIntent Get. */
+public final class ProtectionIntentGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/BackupProtectionIntent_Get.json
+ */
+ /**
+ * Sample code: Get ProtectionIntent for an item.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectionIntentForAnItem(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionIntents()
+ .getWithResponse("myVault", "myRG", "Azure", "249D9B07-D2EF-4202-AA64-65F35418564E", Context.NONE);
+ }
+}
+```
+
+### ProtectionIntent_Validate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnableBackupRequest;
+
+/** Samples for ProtectionIntent Validate. */
+public final class ProtectionIntentValidateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionIntent_Validate.json
+ */
+ /**
+ * Sample code: Validate Enable Protection on Azure Vm.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void validateEnableProtectionOnAzureVm(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionIntents()
+ .validateWithResponse(
+ "southeastasia",
+ new PreValidateEnableBackupRequest()
+ .withResourceType(DataSourceType.VM)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/arunaupgrade/providers/Microsoft.Compute/VirtualMachines/upgrade1")
+ .withVaultId(
+ "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.RecoveryServices/Vaults/myVault")
+ .withProperties(""),
+ Context.NONE);
+ }
+}
+```
+
+### ProtectionPolicies_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectionPolicy;
+import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectionPolicy;
+import com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionSchedule;
+import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek;
+import com.azure.resourcemanager.recoveryservicesbackup.models.LogSchedulePolicy;
+import com.azure.resourcemanager.recoveryservicesbackup.models.LongTermRetentionPolicy;
+import com.azure.resourcemanager.recoveryservicesbackup.models.MonthOfYear;
+import com.azure.resourcemanager.recoveryservicesbackup.models.MonthlyRetentionSchedule;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PolicyType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionScheduleFormat;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ScheduleRunType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.Settings;
+import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy;
+import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicy;
+import com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy;
+import com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth;
+import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat;
+import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionSchedule;
+import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.YearlyRetentionSchedule;
+import java.time.OffsetDateTime;
+import java.util.Arrays;
+
+/** Samples for ProtectionPolicies CreateOrUpdate. */
+public final class ProtectionPoliciesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json
+ */
+ /**
+ * Sample code: Create or Update Full Azure Workload Protection Policy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void createOrUpdateFullAzureWorkloadProtectionPolicy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionPolicies()
+ .define("testPolicy1")
+ .withRegion((String) null)
+ .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg")
+ .withProperties(
+ new AzureVmWorkloadProtectionPolicy()
+ .withWorkLoadType(WorkloadType.SQLDATA_BASE)
+ .withSettings(new Settings().withTimeZone("Pacific Standard Time").withIssqlcompression(false))
+ .withSubProtectionPolicy(
+ Arrays
+ .asList(
+ new SubProtectionPolicy()
+ .withPolicyType(PolicyType.FULL)
+ .withSchedulePolicy(
+ new SimpleSchedulePolicy()
+ .withScheduleRunFrequency(ScheduleRunType.WEEKLY)
+ .withScheduleRunDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.TUESDAY))
+ .withScheduleRunTimes(
+ Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z"))))
+ .withRetentionPolicy(
+ new LongTermRetentionPolicy()
+ .withWeeklySchedule(
+ new WeeklyRetentionSchedule()
+ .withDaysOfTheWeek(
+ Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.TUESDAY))
+ .withRetentionTimes(
+ Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z")))
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(2)
+ .withDurationType(RetentionDurationType.WEEKS)))
+ .withMonthlySchedule(
+ new MonthlyRetentionSchedule()
+ .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY)
+ .withRetentionScheduleWeekly(
+ new WeeklyRetentionFormat()
+ .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY))
+ .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.SECOND)))
+ .withRetentionTimes(
+ Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z")))
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(1)
+ .withDurationType(RetentionDurationType.MONTHS)))
+ .withYearlySchedule(
+ new YearlyRetentionSchedule()
+ .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY)
+ .withMonthsOfYear(
+ Arrays
+ .asList(
+ MonthOfYear.JANUARY,
+ MonthOfYear.JUNE,
+ MonthOfYear.DECEMBER))
+ .withRetentionScheduleWeekly(
+ new WeeklyRetentionFormat()
+ .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY))
+ .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.LAST)))
+ .withRetentionTimes(
+ Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z")))
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(1)
+ .withDurationType(RetentionDurationType.YEARS)))),
+ new SubProtectionPolicy()
+ .withPolicyType(PolicyType.DIFFERENTIAL)
+ .withSchedulePolicy(
+ new SimpleSchedulePolicy()
+ .withScheduleRunFrequency(ScheduleRunType.WEEKLY)
+ .withScheduleRunDays(Arrays.asList(DayOfWeek.FRIDAY))
+ .withScheduleRunTimes(
+ Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z"))))
+ .withRetentionPolicy(
+ new SimpleRetentionPolicy()
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(8)
+ .withDurationType(RetentionDurationType.DAYS))),
+ new SubProtectionPolicy()
+ .withPolicyType(PolicyType.LOG)
+ .withSchedulePolicy(new LogSchedulePolicy().withScheduleFrequencyInMins(60))
+ .withRetentionPolicy(
+ new SimpleRetentionPolicy()
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(7)
+ .withDurationType(RetentionDurationType.DAYS))))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json
+ */
+ /**
+ * Sample code: Create or Update Simple Azure Vm Protection Policy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void createOrUpdateSimpleAzureVmProtectionPolicy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionPolicies()
+ .define("testPolicy1")
+ .withRegion((String) null)
+ .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg")
+ .withProperties(
+ new AzureIaaSvmProtectionPolicy()
+ .withSchedulePolicy(
+ new SimpleSchedulePolicy()
+ .withScheduleRunFrequency(ScheduleRunType.DAILY)
+ .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z"))))
+ .withRetentionPolicy(
+ new LongTermRetentionPolicy()
+ .withDailySchedule(
+ new DailyRetentionSchedule()
+ .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z")))
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(1)
+ .withDurationType(RetentionDurationType.DAYS))))
+ .withTimeZone("Pacific Standard Time"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json
+ */
+ /**
+ * Sample code: Create or Update Full Azure Vm Protection Policy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void createOrUpdateFullAzureVmProtectionPolicy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionPolicies()
+ .define("testPolicy1")
+ .withRegion((String) null)
+ .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg")
+ .withProperties(
+ new AzureIaaSvmProtectionPolicy()
+ .withSchedulePolicy(
+ new SimpleSchedulePolicy()
+ .withScheduleRunFrequency(ScheduleRunType.WEEKLY)
+ .withScheduleRunDays(
+ Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY))
+ .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z"))))
+ .withRetentionPolicy(
+ new LongTermRetentionPolicy()
+ .withWeeklySchedule(
+ new WeeklyRetentionSchedule()
+ .withDaysOfTheWeek(
+ Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY))
+ .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z")))
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(1)
+ .withDurationType(RetentionDurationType.WEEKS)))
+ .withMonthlySchedule(
+ new MonthlyRetentionSchedule()
+ .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY)
+ .withRetentionScheduleWeekly(
+ new WeeklyRetentionFormat()
+ .withDaysOfTheWeek(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY))
+ .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.FIRST, WeekOfMonth.THIRD)))
+ .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z")))
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(2)
+ .withDurationType(RetentionDurationType.MONTHS)))
+ .withYearlySchedule(
+ new YearlyRetentionSchedule()
+ .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY)
+ .withMonthsOfYear(Arrays.asList(MonthOfYear.FEBRUARY, MonthOfYear.NOVEMBER))
+ .withRetentionScheduleWeekly(
+ new WeeklyRetentionFormat()
+ .withDaysOfTheWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.THURSDAY))
+ .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.FOURTH)))
+ .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T10:00:00Z")))
+ .withRetentionDuration(
+ new RetentionDuration()
+ .withCount(4)
+ .withDurationType(RetentionDurationType.YEARS))))
+ .withTimeZone("Pacific Standard Time"))
+ .create();
+ }
+}
+```
+
+### ProtectionPolicies_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionPolicies Delete. */
+public final class ProtectionPoliciesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json
+ */
+ /**
+ * Sample code: Delete Azure Vm Protection Policy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void deleteAzureVmProtectionPolicy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.protectionPolicies().delete("NetSDKTestRsVault", "SwaggerTestRg", "testPolicy1", Context.NONE);
+ }
+}
+```
+
+### ProtectionPolicies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionPolicies Get. */
+public final class ProtectionPoliciesGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionPolicies_Get.json
+ */
+ /**
+ * Sample code: Get Azure IaasVm Protection Policy Details.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getAzureIaasVmProtectionPolicyDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.protectionPolicies().getWithResponse("NetSDKTestRsVault", "SwaggerTestRg", "testPolicy1", Context.NONE);
+ }
+}
+```
+
+### ProtectionPolicyOperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionPolicyOperationResults Get. */
+public final class ProtectionPolicyOperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json
+ */
+ /**
+ * Sample code: Get Protection Policy Operation Results.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectionPolicyOperationResults(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionPolicyOperationResults()
+ .getWithResponse(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "testPolicy1",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### ProtectionPolicyOperationStatuses_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProtectionPolicyOperationStatuses Get. */
+public final class ProtectionPolicyOperationStatusesGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json
+ */
+ /**
+ * Sample code: Get Protection Policy Operation Status.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectionPolicyOperationStatus(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .protectionPolicyOperationStatuses()
+ .getWithResponse(
+ "NetSDKTestRsVault",
+ "SwaggerTestRg",
+ "testPolicy1",
+ "00000000-0000-0000-0000-000000000000",
+ Context.NONE);
+ }
+}
+```
+
+### RecoveryPoints_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RecoveryPoints Get. */
+public final class RecoveryPointsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/RecoveryPoints_Get.json
+ */
+ /**
+ * Sample code: Get Azure Vm Recovery Point Details.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getAzureVmRecoveryPointDetails(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .recoveryPoints()
+ .getWithResponse(
+ "rshvault",
+ "rshhtestmdvmrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ "26083826328862",
+ Context.NONE);
+ }
+}
+```
+
+### RecoveryPoints_GetAccessToken
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.AadPropertiesResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.AadProperties;
+
+/** Samples for RecoveryPoints GetAccessToken. */
+public final class RecoveryPointsGetAccessTokenSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetAccessToken_Get.json
+ */
+ /**
+ * Sample code: Get Access Token for Crr.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getAccessTokenForCrr(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .recoveryPoints()
+ .getAccessTokenWithResponse(
+ "rshvault",
+ "rshhtestmdvmrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ "26083826328862",
+ new AadPropertiesResourceInner()
+ .withProperties(
+ new AadProperties()
+ .withTenantId("33e01921-4d64-4f8c-a055-5bdaffd5e33d")
+ .withAudience("https://RecoveryServices/IaasCoord/aadmgmt/ase")
+ .withServicePrincipalObjectId("5ecd8123-cf74-4037-83e9-9246b227b351")),
+ Context.NONE);
+ }
+}
+```
+
+### RecoveryPoints_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RecoveryPoints List. */
+public final class RecoveryPointsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/RecoveryPoints_List.json
+ */
+ /**
+ * Sample code: Get Protected Azure Vm Recovery Points.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedAzureVmRecoveryPoints(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .recoveryPoints()
+ .list(
+ "rshvault",
+ "rshhtestmdvmrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### RecoveryPointsCrr_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RecoveryPointsCrr List. */
+public final class RecoveryPointsCrrListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/RecoveryPoints_List.json
+ */
+ /**
+ * Sample code: Get Protected Azure Vm Recovery Points.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedAzureVmRecoveryPoints(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .recoveryPointsCrrs()
+ .list(
+ "rshvault",
+ "rshhtestmdvmrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### RecoveryPointsRecommendedForMove_List
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest;
+import java.util.Arrays;
+
+/** Samples for RecoveryPointsRecommendedForMove List. */
+public final class RecoveryPointsRecommendedForMoveListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json
+ */
+ /**
+ * Sample code: Get Protected Azure Vm Recovery Points Recommended for Move.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getProtectedAzureVmRecoveryPointsRecommendedForMove(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .recoveryPointsRecommendedForMoves()
+ .list(
+ "rshvault",
+ "rshhtestmdvmrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
+ new ListRecoveryPointsRecommendedForMoveRequest()
+ .withObjectType("ListRecoveryPointsRecommendedForMoveRequest")
+ .withExcludedRPList(Arrays.asList("348916168024334", "348916168024335")),
+ Context.NONE);
+ }
+}
+```
+
+### ResourceGuardProxies_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceGuardProxies Get. */
+public final class ResourceGuardProxiesGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
+ */
+ /**
+ * Sample code: Get VaultGuardProxies.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getVaultGuardProxies(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.resourceGuardProxies().get("sampleVault", "SampleResourceGroup", Context.NONE);
+ }
+}
+```
+
+### ResourceGuardProxyOperation_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceGuardProxyOperation Delete. */
+public final class ResourceGuardProxyOperationDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
+ */
+ /**
+ * Sample code: Delete ResourceGuardProxy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void deleteResourceGuardProxy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceGuardProxyOperations()
+ .deleteWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", Context.NONE);
+ }
+}
+```
+
+### ResourceGuardProxyOperation_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceGuardProxyOperation Get. */
+public final class ResourceGuardProxyOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
+ */
+ /**
+ * Sample code: Get ResourceGuardProxy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getResourceGuardProxy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceGuardProxyOperations()
+ .getWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", Context.NONE);
+ }
+}
+```
+
+### ResourceGuardProxyOperation_Put
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceGuardProxyOperation Put. */
+public final class ResourceGuardProxyOperationPutSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
+ */
+ /**
+ * Sample code: Create ResourceGuardProxy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void createResourceGuardProxy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceGuardProxyOperations()
+ .putWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", Context.NONE);
+ }
+}
+```
+
+### ResourceGuardProxyOperation_UnlockDelete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest;
+import java.util.Arrays;
+
+/** Samples for ResourceGuardProxyOperation UnlockDelete. */
+public final class ResourceGuardProxyOperationUnlockDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
+ */
+ /**
+ * Sample code: UnlockDelete ResourceGuardProxy.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void unlockDeleteResourceGuardProxy(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceGuardProxyOperations()
+ .unlockDeleteWithResponse(
+ "sampleVault",
+ "SampleResourceGroup",
+ "swaggerExample",
+ new UnlockDeleteRequest()
+ .withResourceGuardOperationRequests(
+ Arrays
+ .asList(
+ "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/deleteProtectedItemRequests/default"))
+ .withResourceToBeDeleted(
+ "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/gaallarg/providers/Microsoft.RecoveryServices/vaults/MercuryCrrVault/backupFabrics/Azure/protectionContainers/VMAppContainer;compute;crrtestrg;crrtestvm/protectedItems/SQLDataBase;mssqlserver;testdb"),
+ Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_BmsPrepareDataMove
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel;
+import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest;
+
+/** Samples for ResourceProvider BmsPrepareDataMove. */
+public final class ResourceProviderBmsPrepareDataMoveSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/BackupDataMove/PrepareDataMove_Post.json
+ */
+ /**
+ * Sample code: Prepare Data Move.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void prepareDataMove(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceProviders()
+ .bmsPrepareDataMove(
+ "source-rsv",
+ "sourceRG",
+ new PrepareDataMoveRequest()
+ .withTargetResourceId(
+ "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/targetRG/providers/Microsoft.RecoveryServices/vaults/target-rsv")
+ .withTargetRegion("USGov Virginia")
+ .withDataMoveLevel(DataMoveLevel.VAULT),
+ Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_BmsTriggerDataMove
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel;
+import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest;
+
+/** Samples for ResourceProvider BmsTriggerDataMove. */
+public final class ResourceProviderBmsTriggerDataMoveSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/BackupDataMove/TriggerDataMove_Post.json
+ */
+ /**
+ * Sample code: Trigger Data Move.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void triggerDataMove(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceProviders()
+ .bmsTriggerDataMove(
+ "target-rsv",
+ "targetRG",
+ new TriggerDataMoveRequest()
+ .withSourceResourceId(
+ "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/sourceRG/providers/Microsoft.RecoveryServices/vaults/source-rsv")
+ .withSourceRegion("USGov Iowa")
+ .withDataMoveLevel(DataMoveLevel.VAULT)
+ .withCorrelationId("MTg2OTcyMzM4NzYyMjc1NDY3Nzs1YmUzYmVmNi04YjJiLTRhOTItOTllYi01NTM0MDllYjk2NjE="),
+ Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_GetOperationStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceProvider GetOperationStatus. */
+public final class ResourceProviderGetOperationStatusSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json
+ */
+ /**
+ * Sample code: Get OperationStatus.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getOperationStatus(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceProviders()
+ .getOperationStatusWithResponse(
+ "source-rsv", "sourceRG", "00000000-0000-0000-0000-000000000000", Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_MoveRecoveryPoint
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.MoveRPAcrossTiersRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType;
+
+/** Samples for ResourceProvider MoveRecoveryPoint. */
+public final class ResourceProviderMoveRecoveryPointSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/TriggerRecoveryPointMove_Post.json
+ */
+ /**
+ * Sample code: Trigger RP Move Operation.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void triggerRPMoveOperation(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .resourceProviders()
+ .moveRecoveryPoint(
+ "testVault",
+ "netsdktestrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "348916168024334",
+ new MoveRPAcrossTiersRequest()
+ .withObjectType("MoveRPAcrossTiersRequest")
+ .withSourceTierType(RecoveryPointTierType.HARDENED_RP)
+ .withTargetTierType(RecoveryPointTierType.ARCHIVED_RP),
+ Context.NONE);
+ }
+}
+```
+
+### Restores_Trigger
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.models.EncryptionDetails;
+import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRestoreRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.IdentityInfo;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestResource;
+
+/** Samples for Restores Trigger. */
+public final class RestoresTriggerSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json
+ */
+ /**
+ * Sample code: Restore to New Azure IaasVm with IaasVMRestoreWithRehydrationRequest.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void restoreToNewAzureIaasVmWithIaasVMRestoreWithRehydrationRequest(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .restores()
+ .trigger(
+ "testVault",
+ "netsdktestrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "348916168024334",
+ new RestoreRequestResource().withProperties(new RestoreRequest()),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json
+ */
+ /**
+ * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void restoreToNewAzureIaasVmWithIaasVMRestoreRequest(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .restores()
+ .trigger(
+ "testVault",
+ "netsdktestrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "348916168024334",
+ new RestoreRequestResource()
+ .withProperties(
+ new IaasVMRestoreRequest()
+ .withRecoveryPointId("348916168024334")
+ .withRecoveryType(RecoveryType.ALTERNATE_LOCATION)
+ .withSourceResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1")
+ .withTargetVirtualMachineId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg2/providers/Microsoft.Compute/virtualmachines/RSMDALRVM981435")
+ .withTargetResourceGroupId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg2")
+ .withStorageAccountId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Storage/storageAccounts/testingAccount")
+ .withVirtualNetworkId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Network/virtualNetworks/testNet")
+ .withSubnetId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Network/virtualNetworks/testNet/subnets/default")
+ .withRegion("southeastasia")
+ .withCreateNewCloudService(false)
+ .withOriginalStorageAccountOption(false)
+ .withEncryptionDetails(new EncryptionDetails().withEncryptionEnabled(false))
+ .withIdentityInfo(new IdentityInfo().withIsSystemAssignedIdentity(true))),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json
+ */
+ /**
+ * Sample code: Restore Disks with IaasVMRestoreWithRehydrationRequest.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void restoreDisksWithIaasVMRestoreWithRehydrationRequest(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .restores()
+ .trigger(
+ "testVault",
+ "netsdktestrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "348916168024334",
+ new RestoreRequestResource().withProperties(new RestoreRequest()),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json
+ */
+ /**
+ * Sample code: Restore Disks with IaasVMRestoreRequest.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void restoreDisksWithIaasVMRestoreRequest(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager
+ .restores()
+ .trigger(
+ "testVault",
+ "netsdktestrg",
+ "Azure",
+ "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
+ "348916168024334",
+ new RestoreRequestResource()
+ .withProperties(
+ new IaasVMRestoreRequest()
+ .withRecoveryPointId("348916168024334")
+ .withRecoveryType(RecoveryType.RESTORE_DISKS)
+ .withSourceResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1")
+ .withStorageAccountId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testingRg/providers/Microsoft.Storage/storageAccounts/testAccount")
+ .withRegion("southeastasia")
+ .withCreateNewCloudService(true)
+ .withOriginalStorageAccountOption(false)
+ .withEncryptionDetails(new EncryptionDetails().withEncryptionEnabled(false))
+ .withIdentityInfo(
+ new IdentityInfo()
+ .withIsSystemAssignedIdentity(false)
+ .withManagedIdentityResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asmaskarRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asmaskartestmsi"))),
+ Context.NONE);
+ }
+}
+```
+
+### SecurityPINs_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SecurityPINs Get. */
+public final class SecurityPINsGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-08-01/examples/Common/BackupSecurityPin_Get.json
+ */
+ /**
+ * Sample code: Get Vault Security Pin.
+ *
+ * @param manager Entry point to RecoveryServicesBackupManager.
+ */
+ public static void getVaultSecurityPin(
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
+ manager.securityPINs().getWithResponse("SwaggerTest", "SwaggerTestRg", null, Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml
index 6529fd0a10d9..aa03c1ec741f 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml
@@ -1,58 +1,81 @@
- 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-recoveryservicesbackup
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-recoveryservicesbackup
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for RecoveryServicesBackup Management
- This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-01.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for RecoveryServicesBackup Management
+ This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-08.
+ 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
+
+ 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
false
-
-
-
- com.azure
- azure-core
- 1.22.0
-
-
- com.azure
- azure-core-management
- 1.4.3
-
-
+
+
+
+ com.azure
+ azure-core
+ 1.22.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.3
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java
index a0f76d117657..cc16c91e152a 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.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;
@@ -36,6 +37,7 @@
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectionIntentsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceEncryptionConfigsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceStorageConfigsImpl;
+import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceStorageConfigsNonCrrsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceVaultConfigsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupStatusImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupUsageSummariesCrrsImpl;
@@ -53,8 +55,8 @@
import com.azure.resourcemanager.recoveryservicesbackup.implementation.JobDetailsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.JobOperationResultsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.JobsImpl;
+import com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationOperationsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationsImpl;
-import com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationsOperationsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectableContainersImpl;
@@ -72,6 +74,8 @@
import com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsRecommendedForMovesImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryServicesBackupClientBuilder;
+import com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceGuardProxiesImpl;
+import com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceGuardProxyOperationsImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.RestoresImpl;
import com.azure.resourcemanager.recoveryservicesbackup.implementation.SecurityPINsImpl;
@@ -90,6 +94,7 @@
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupProtectionIntents;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigs;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceStorageConfigs;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceStorageConfigsNonCrrs;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfigs;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupStatus;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupUsageSummaries;
@@ -107,8 +112,8 @@
import com.azure.resourcemanager.recoveryservicesbackup.models.JobDetails;
import com.azure.resourcemanager.recoveryservicesbackup.models.JobOperationResults;
import com.azure.resourcemanager.recoveryservicesbackup.models.Jobs;
+import com.azure.resourcemanager.recoveryservicesbackup.models.OperationOperations;
import com.azure.resourcemanager.recoveryservicesbackup.models.Operations;
-import com.azure.resourcemanager.recoveryservicesbackup.models.OperationsOperations;
import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnections;
import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoints;
import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainers;
@@ -125,6 +130,8 @@
import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoints;
import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointsCrrs;
import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointsRecommendedForMoves;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxies;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyOperations;
import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceProviders;
import com.azure.resourcemanager.recoveryservicesbackup.models.Restores;
import com.azure.resourcemanager.recoveryservicesbackup.models.SecurityPINs;
@@ -133,9 +140,24 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to RecoveryServicesBackupManager. Open API 2.0 Specs for Azure RecoveryServices Backup service. */
public final class RecoveryServicesBackupManager {
+ private BackupResourceStorageConfigsNonCrrs backupResourceStorageConfigsNonCrrs;
+
+ private ProtectionIntents protectionIntents;
+
+ private BackupStatus backupStatus;
+
+ private FeatureSupports featureSupports;
+
+ private BackupProtectionIntents backupProtectionIntents;
+
+ private BackupUsageSummaries backupUsageSummaries;
+
+ private Operations operations;
+
private BackupResourceVaultConfigs backupResourceVaultConfigs;
private BackupResourceEncryptionConfigs backupResourceEncryptionConfigs;
@@ -176,7 +198,7 @@ public final class RecoveryServicesBackupManager {
private BackupProtectedItems backupProtectedItems;
- private Operations operations;
+ private OperationOperations operationOperations;
private BackupEngines backupEngines;
@@ -210,6 +232,10 @@ public final class RecoveryServicesBackupManager {
private RecoveryPointsRecommendedForMoves recoveryPointsRecommendedForMoves;
+ private ResourceGuardProxies resourceGuardProxies;
+
+ private ResourceGuardProxyOperations resourceGuardProxyOperations;
+
private BackupUsageSummariesCrrs backupUsageSummariesCrrs;
private AadPropertiesOperations aadPropertiesOperations;
@@ -230,18 +256,6 @@ public final class RecoveryServicesBackupManager {
private BackupProtectedItemsCrrs backupProtectedItemsCrrs;
- private ProtectionIntents protectionIntents;
-
- private BackupStatus backupStatus;
-
- private FeatureSupports featureSupports;
-
- private BackupProtectionIntents backupProtectionIntents;
-
- private BackupUsageSummaries backupUsageSummaries;
-
- private OperationsOperations operationsOperations;
-
private final RecoveryServicesBackupClient clientObject;
private RecoveryServicesBackupManager(
@@ -287,6 +301,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;
@@ -326,6 +341,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.
*
@@ -382,20 +408,33 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az
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 =
@@ -407,6 +446,65 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az
}
}
+ /** @return Resource collection API of BackupResourceStorageConfigsNonCrrs. */
+ public BackupResourceStorageConfigsNonCrrs backupResourceStorageConfigsNonCrrs() {
+ if (this.backupResourceStorageConfigsNonCrrs == null) {
+ this.backupResourceStorageConfigsNonCrrs =
+ new BackupResourceStorageConfigsNonCrrsImpl(
+ clientObject.getBackupResourceStorageConfigsNonCrrs(), this);
+ }
+ return backupResourceStorageConfigsNonCrrs;
+ }
+
+ /** @return Resource collection API of ProtectionIntents. */
+ public ProtectionIntents protectionIntents() {
+ if (this.protectionIntents == null) {
+ this.protectionIntents = new ProtectionIntentsImpl(clientObject.getProtectionIntents(), this);
+ }
+ return protectionIntents;
+ }
+
+ /** @return Resource collection API of BackupStatus. */
+ public BackupStatus backupStatus() {
+ if (this.backupStatus == null) {
+ this.backupStatus = new BackupStatusImpl(clientObject.getBackupStatus(), this);
+ }
+ return backupStatus;
+ }
+
+ /** @return Resource collection API of FeatureSupports. */
+ public FeatureSupports featureSupports() {
+ if (this.featureSupports == null) {
+ this.featureSupports = new FeatureSupportsImpl(clientObject.getFeatureSupports(), this);
+ }
+ return featureSupports;
+ }
+
+ /** @return Resource collection API of BackupProtectionIntents. */
+ public BackupProtectionIntents backupProtectionIntents() {
+ if (this.backupProtectionIntents == null) {
+ this.backupProtectionIntents =
+ new BackupProtectionIntentsImpl(clientObject.getBackupProtectionIntents(), this);
+ }
+ return backupProtectionIntents;
+ }
+
+ /** @return Resource collection API of BackupUsageSummaries. */
+ public BackupUsageSummaries backupUsageSummaries() {
+ if (this.backupUsageSummaries == null) {
+ this.backupUsageSummaries = new BackupUsageSummariesImpl(clientObject.getBackupUsageSummaries(), this);
+ }
+ return backupUsageSummaries;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
/** @return Resource collection API of BackupResourceVaultConfigs. */
public BackupResourceVaultConfigs backupResourceVaultConfigs() {
if (this.backupResourceVaultConfigs == null) {
@@ -574,12 +672,12 @@ public BackupProtectedItems backupProtectedItems() {
return backupProtectedItems;
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ /** @return Resource collection API of OperationOperations. */
+ public OperationOperations operationOperations() {
+ if (this.operationOperations == null) {
+ this.operationOperations = new OperationOperationsImpl(clientObject.getOperationOperations(), this);
}
- return operations;
+ return operationOperations;
}
/** @return Resource collection API of BackupEngines. */
@@ -722,6 +820,23 @@ public RecoveryPointsRecommendedForMoves recoveryPointsRecommendedForMoves() {
return recoveryPointsRecommendedForMoves;
}
+ /** @return Resource collection API of ResourceGuardProxies. */
+ public ResourceGuardProxies resourceGuardProxies() {
+ if (this.resourceGuardProxies == null) {
+ this.resourceGuardProxies = new ResourceGuardProxiesImpl(clientObject.getResourceGuardProxies(), this);
+ }
+ return resourceGuardProxies;
+ }
+
+ /** @return Resource collection API of ResourceGuardProxyOperations. */
+ public ResourceGuardProxyOperations resourceGuardProxyOperations() {
+ if (this.resourceGuardProxyOperations == null) {
+ this.resourceGuardProxyOperations =
+ new ResourceGuardProxyOperationsImpl(clientObject.getResourceGuardProxyOperations(), this);
+ }
+ return resourceGuardProxyOperations;
+ }
+
/** @return Resource collection API of BackupUsageSummariesCrrs. */
public BackupUsageSummariesCrrs backupUsageSummariesCrrs() {
if (this.backupUsageSummariesCrrs == null) {
@@ -806,55 +921,6 @@ public BackupProtectedItemsCrrs backupProtectedItemsCrrs() {
return backupProtectedItemsCrrs;
}
- /** @return Resource collection API of ProtectionIntents. */
- public ProtectionIntents protectionIntents() {
- if (this.protectionIntents == null) {
- this.protectionIntents = new ProtectionIntentsImpl(clientObject.getProtectionIntents(), this);
- }
- return protectionIntents;
- }
-
- /** @return Resource collection API of BackupStatus. */
- public BackupStatus backupStatus() {
- if (this.backupStatus == null) {
- this.backupStatus = new BackupStatusImpl(clientObject.getBackupStatus(), this);
- }
- return backupStatus;
- }
-
- /** @return Resource collection API of FeatureSupports. */
- public FeatureSupports featureSupports() {
- if (this.featureSupports == null) {
- this.featureSupports = new FeatureSupportsImpl(clientObject.getFeatureSupports(), this);
- }
- return featureSupports;
- }
-
- /** @return Resource collection API of BackupProtectionIntents. */
- public BackupProtectionIntents backupProtectionIntents() {
- if (this.backupProtectionIntents == null) {
- this.backupProtectionIntents =
- new BackupProtectionIntentsImpl(clientObject.getBackupProtectionIntents(), this);
- }
- return backupProtectionIntents;
- }
-
- /** @return Resource collection API of BackupUsageSummaries. */
- public BackupUsageSummaries backupUsageSummaries() {
- if (this.backupUsageSummaries == null) {
- this.backupUsageSummaries = new BackupUsageSummariesImpl(clientObject.getBackupUsageSummaries(), this);
- }
- return backupUsageSummaries;
- }
-
- /** @return Resource collection API of OperationsOperations. */
- public OperationsOperations operationsOperations() {
- if (this.operationsOperations == null) {
- this.operationsOperations = new OperationsOperationsImpl(clientObject.getOperationsOperations(), this);
- }
- return operationsOperations;
- }
-
/**
* @return Wrapped service client RecoveryServicesBackupClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java
index f3a81d0a093f..1532b546fcbc 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java
@@ -8,7 +8,8 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource;
/** An instance of this class provides access to all the operations defined in BackupResourceEncryptionConfigsClient. */
public interface BackupResourceEncryptionConfigsClient {
@@ -23,7 +24,7 @@ public interface BackupResourceEncryptionConfigsClient {
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- BackupResourceEncryptionConfigResourceInner get(String vaultName, String resourceGroupName);
+ BackupResourceEncryptionConfigExtendedResourceInner get(String vaultName, String resourceGroupName);
/**
* Fetches Vault Encryption config.
@@ -37,7 +38,7 @@ public interface BackupResourceEncryptionConfigsClient {
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
+ Response getWithResponse(
String vaultName, String resourceGroupName, Context context);
/**
@@ -51,7 +52,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters);
+ void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters);
/**
* Updates Vault encryption config.
@@ -67,8 +68,5 @@ Response getWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
- String vaultName,
- String resourceGroupName,
- BackupResourceEncryptionConfigResourceInner parameters,
- Context context);
+ String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters, Context context);
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java
new file mode 100644
index 000000000000..56025e9b5d3a
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupResourceStorageConfigsNonCrrsClient.
+ */
+public interface BackupResourceStorageConfigsNonCrrsClient {
+ /**
+ * Fetches resource storage config.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupResourceConfigResourceInner get(String vaultName, String resourceGroupName);
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String vaultName, String resourceGroupName, Context context);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupResourceConfigResourceInner update(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @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 patch(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response patchWithResponse(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context);
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/CrossRegionRestoresClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/CrossRegionRestoresClient.java
index 205895fb11ea..41b049e473cb 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/CrossRegionRestoresClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/CrossRegionRestoresClient.java
@@ -23,7 +23,7 @@ public interface CrossRegionRestoresClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginTrigger(String azureRegion, CrossRegionRestoreRequest parameters);
/**
@@ -37,7 +37,7 @@ public interface CrossRegionRestoresClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginTrigger(
String azureRegion, CrossRegionRestoreRequest parameters, Context context);
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java
new file mode 100644
index 000000000000..3464c8afe218
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest;
+
+/** An instance of this class provides access to all the operations defined in OperationOperationsClient. */
+public interface OperationOperationsClient {
+ /**
+ * Validate operation for specified backed up item. This is a synchronous operation.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters resource validate operation request.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ValidateOperationsResponseInner validate(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters);
+
+ /**
+ * Validate operation for specified backed up item. This is a synchronous operation.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters resource validate operation request.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateWithResponse(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context);
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java
index 81d4d9b71a78..d1a8170127b7 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java
@@ -6,41 +6,31 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner;
-import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
/**
- * Validate operation for specified backed up item. This is a synchronous operation.
+ * Returns the list of available operations.
*
- * @param vaultName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param parameters resource validate operation request.
- * @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 operations List response which contains list of available APIs.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ValidateOperationsResponseInner validate(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
- * Validate operation for specified backed up item. This is a synchronous operation.
+ * Returns the list of available operations.
*
- * @param vaultName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param parameters resource validate operation request.
* @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.
+ * @return operations List response which contains list of available APIs.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response validateWithResponse(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java
index 3aeaf4c01a7f..5c49c98aecdd 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java
@@ -57,7 +57,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return private Endpoint Connection Response Properties.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionResourceInner> beginPut(
String vaultName,
String resourceGroupName,
@@ -77,7 +77,7 @@ SyncPoller, PrivateEndpointCo
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return private Endpoint Connection Response Properties.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionResourceInner> beginPut(
String vaultName,
String resourceGroupName,
@@ -136,7 +136,7 @@ PrivateEndpointConnectionResourceInner put(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String vaultName, String resourceGroupName, String privateEndpointConnectionName);
@@ -152,7 +152,7 @@ SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String vaultName, String resourceGroupName, String privateEndpointConnectionName, Context context);
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java
index c3b32d225f8f..6bb91e15b893 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java
@@ -97,7 +97,7 @@ Response createOrUpdateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String vaultName, String resourceGroupName, String policyName);
/**
@@ -113,7 +113,7 @@ Response createOrUpdateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String vaultName, String resourceGroupName, String policyName, Context context);
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java
index a07639990acd..804d91fe1d5f 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java
@@ -37,6 +37,55 @@ public interface RecoveryServicesBackupClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * Gets the BackupResourceStorageConfigsNonCrrsClient object to access its operations.
+ *
+ * @return the BackupResourceStorageConfigsNonCrrsClient object.
+ */
+ BackupResourceStorageConfigsNonCrrsClient getBackupResourceStorageConfigsNonCrrs();
+
+ /**
+ * Gets the ProtectionIntentsClient object to access its operations.
+ *
+ * @return the ProtectionIntentsClient object.
+ */
+ ProtectionIntentsClient getProtectionIntents();
+
+ /**
+ * Gets the BackupStatusClient object to access its operations.
+ *
+ * @return the BackupStatusClient object.
+ */
+ BackupStatusClient getBackupStatus();
+
+ /**
+ * Gets the FeatureSupportsClient object to access its operations.
+ *
+ * @return the FeatureSupportsClient object.
+ */
+ FeatureSupportsClient getFeatureSupports();
+
+ /**
+ * Gets the BackupProtectionIntentsClient object to access its operations.
+ *
+ * @return the BackupProtectionIntentsClient object.
+ */
+ BackupProtectionIntentsClient getBackupProtectionIntents();
+
+ /**
+ * Gets the BackupUsageSummariesClient object to access its operations.
+ *
+ * @return the BackupUsageSummariesClient object.
+ */
+ BackupUsageSummariesClient getBackupUsageSummaries();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
/**
* Gets the BackupResourceVaultConfigsClient object to access its operations.
*
@@ -178,11 +227,11 @@ public interface RecoveryServicesBackupClient {
BackupProtectedItemsClient getBackupProtectedItems();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the OperationOperationsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the OperationOperationsClient object.
*/
- OperationsClient getOperations();
+ OperationOperationsClient getOperationOperations();
/**
* Gets the BackupEnginesClient object to access its operations.
@@ -296,6 +345,20 @@ public interface RecoveryServicesBackupClient {
*/
RecoveryPointsRecommendedForMovesClient getRecoveryPointsRecommendedForMoves();
+ /**
+ * Gets the ResourceGuardProxiesClient object to access its operations.
+ *
+ * @return the ResourceGuardProxiesClient object.
+ */
+ ResourceGuardProxiesClient getResourceGuardProxies();
+
+ /**
+ * Gets the ResourceGuardProxyOperationsClient object to access its operations.
+ *
+ * @return the ResourceGuardProxyOperationsClient object.
+ */
+ ResourceGuardProxyOperationsClient getResourceGuardProxyOperations();
+
/**
* Gets the BackupUsageSummariesCrrsClient object to access its operations.
*
@@ -365,46 +428,4 @@ public interface RecoveryServicesBackupClient {
* @return the BackupProtectedItemsCrrsClient object.
*/
BackupProtectedItemsCrrsClient getBackupProtectedItemsCrrs();
-
- /**
- * Gets the ProtectionIntentsClient object to access its operations.
- *
- * @return the ProtectionIntentsClient object.
- */
- ProtectionIntentsClient getProtectionIntents();
-
- /**
- * Gets the BackupStatusClient object to access its operations.
- *
- * @return the BackupStatusClient object.
- */
- BackupStatusClient getBackupStatus();
-
- /**
- * Gets the FeatureSupportsClient object to access its operations.
- *
- * @return the FeatureSupportsClient object.
- */
- FeatureSupportsClient getFeatureSupports();
-
- /**
- * Gets the BackupProtectionIntentsClient object to access its operations.
- *
- * @return the BackupProtectionIntentsClient object.
- */
- BackupProtectionIntentsClient getBackupProtectionIntents();
-
- /**
- * Gets the BackupUsageSummariesClient object to access its operations.
- *
- * @return the BackupUsageSummariesClient object.
- */
- BackupUsageSummariesClient getBackupUsageSummaries();
-
- /**
- * Gets the OperationsOperationsClient object to access its operations.
- *
- * @return the OperationsOperationsClient object.
- */
- OperationsOperationsClient getOperationsOperations();
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxiesClient.java
similarity index 55%
rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsOperationsClient.java
rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxiesClient.java
index 69497872e4fa..7ca607cf387a 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsOperationsClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxiesClient.java
@@ -8,29 +8,34 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner;
-/** An instance of this class provides access to all the operations defined in OperationsOperationsClient. */
-public interface OperationsOperationsClient {
+/** An instance of this class provides access to all the operations defined in ResourceGuardProxiesClient. */
+public interface ResourceGuardProxiesClient {
/**
- * Returns the list of available operations.
+ * List the ResourceGuardProxies under vault.
*
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @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 operations List response which contains list of available APIs.
+ * @return list of ResourceGuardProxyBase resources.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ PagedIterable get(String vaultName, String resourceGroupName);
/**
- * Returns the list of available operations.
+ * List the ResourceGuardProxies under vault.
*
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @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 operations List response which contains list of available APIs.
+ * @return list of ResourceGuardProxyBase resources.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ PagedIterable get(String vaultName, String resourceGroupName, Context context);
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java
new file mode 100644
index 000000000000..c048b67e4f27
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.UnlockDeleteResponseInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest;
+
+/** An instance of this class provides access to all the operations defined in ResourceGuardProxyOperationsClient. */
+public interface ResourceGuardProxyOperationsClient {
+ /**
+ * Returns ResourceGuardProxy under vault and with the name referenced in request.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ResourceGuardProxyBaseResourceInner get(String vaultName, String resourceGroupName, String resourceGuardProxyName);
+
+ /**
+ * Returns ResourceGuardProxy under vault and with the name referenced in request.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String vaultName, String resourceGroupName, String resourceGuardProxyName, Context context);
+
+ /**
+ * Add or Update ResourceGuardProxy under vault Secures vault critical operations.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ResourceGuardProxyBaseResourceInner put(String vaultName, String resourceGroupName, String resourceGuardProxyName);
+
+ /**
+ * Add or Update ResourceGuardProxy under vault Secures vault critical operations.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response putWithResponse(
+ String vaultName, String resourceGroupName, String resourceGuardProxyName, Context context);
+
+ /**
+ * Delete ResourceGuardProxy under vault.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @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 vaultName, String resourceGroupName, String resourceGuardProxyName);
+
+ /**
+ * Delete ResourceGuardProxy under vault.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String vaultName, String resourceGroupName, String resourceGuardProxyName, Context context);
+
+ /**
+ * Secures delete ResourceGuardProxy operations.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @param parameters Request body for 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 response of Unlock Delete API.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UnlockDeleteResponseInner unlockDelete(
+ String vaultName, String resourceGroupName, String resourceGuardProxyName, UnlockDeleteRequest parameters);
+
+ /**
+ * Secures delete ResourceGuardProxy operations.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param resourceGuardProxyName The resourceGuardProxyName parameter.
+ * @param parameters Request body for operation.
+ * @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 response of Unlock Delete API.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response unlockDeleteWithResponse(
+ String vaultName,
+ String resourceGroupName,
+ String resourceGuardProxyName,
+ UnlockDeleteRequest parameters,
+ Context context);
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java
index 3b758f9f69e2..f70075ad3bf7 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java
@@ -58,7 +58,7 @@ Response getOperationStatusWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginBmsPrepareDataMove(
String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters);
@@ -74,7 +74,7 @@ SyncPoller, Void> beginBmsPrepareDataMove(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginBmsPrepareDataMove(
String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, Context context);
@@ -117,7 +117,7 @@ void bmsPrepareDataMove(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginBmsTriggerDataMove(
String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters);
@@ -133,7 +133,7 @@ SyncPoller, Void> beginBmsTriggerDataMove(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginBmsTriggerDataMove(
String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, Context context);
@@ -180,7 +180,7 @@ void bmsTriggerDataMove(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginMoveRecoveryPoint(
String vaultName,
String resourceGroupName,
@@ -206,7 +206,7 @@ SyncPoller, Void> beginMoveRecoveryPoint(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginMoveRecoveryPoint(
String vaultName,
String resourceGroupName,
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java
index de7f8b589451..61a29245fd76 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java
@@ -29,7 +29,7 @@ public interface RestoresClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginTrigger(
String vaultName,
String resourceGroupName,
@@ -56,7 +56,7 @@ SyncPoller, Void> beginTrigger(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginTrigger(
String vaultName,
String resourceGroupName,
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java
index 6365bdedc379..368843af92ab 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java
@@ -9,6 +9,7 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.TokenInformationInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.SecurityPinBase;
/** An instance of this class provides access to all the operations defined in SecurityPINsClient. */
public interface SecurityPINsClient {
@@ -30,6 +31,7 @@ public interface SecurityPINsClient {
*
* @param vaultName The name of the recovery services vault.
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters security pin request.
* @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.
@@ -37,5 +39,6 @@ public interface SecurityPINsClient {
* @return the security PIN.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String vaultName, String resourceGroupName, Context context);
+ Response getWithResponse(
+ String vaultName, String resourceGroupName, SecurityPinBase parameters, Context context);
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java
similarity index 61%
rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigResourceInner.java
rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java
index 13013f6d8068..248ad0d4a921 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigResourceInner.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java
@@ -7,21 +7,22 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfig;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** The BackupResourceEncryptionConfigResource model. */
+/** The BackupResourceEncryptionConfigExtendedResource model. */
@Fluent
-public final class BackupResourceEncryptionConfigResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupResourceEncryptionConfigResourceInner.class);
+public final class BackupResourceEncryptionConfigExtendedResourceInner extends Resource {
+ @JsonIgnore
+ private final ClientLogger logger = new ClientLogger(BackupResourceEncryptionConfigExtendedResourceInner.class);
/*
- * BackupResourceEncryptionConfigResource properties
+ * BackupResourceEncryptionConfigExtendedResource properties
*/
@JsonProperty(value = "properties")
- private BackupResourceEncryptionConfig properties;
+ private BackupResourceEncryptionConfigExtended properties;
/*
* Optional ETag.
@@ -30,21 +31,22 @@ public final class BackupResourceEncryptionConfigResourceInner extends Resource
private String etag;
/**
- * Get the properties property: BackupResourceEncryptionConfigResource properties.
+ * Get the properties property: BackupResourceEncryptionConfigExtendedResource properties.
*
* @return the properties value.
*/
- public BackupResourceEncryptionConfig properties() {
+ public BackupResourceEncryptionConfigExtended properties() {
return this.properties;
}
/**
- * Set the properties property: BackupResourceEncryptionConfigResource properties.
+ * Set the properties property: BackupResourceEncryptionConfigExtendedResource properties.
*
* @param properties the properties value to set.
- * @return the BackupResourceEncryptionConfigResourceInner object itself.
+ * @return the BackupResourceEncryptionConfigExtendedResourceInner object itself.
*/
- public BackupResourceEncryptionConfigResourceInner withProperties(BackupResourceEncryptionConfig properties) {
+ public BackupResourceEncryptionConfigExtendedResourceInner withProperties(
+ BackupResourceEncryptionConfigExtended properties) {
this.properties = properties;
return this;
}
@@ -62,23 +64,23 @@ public String etag() {
* Set the etag property: Optional ETag.
*
* @param etag the etag value to set.
- * @return the BackupResourceEncryptionConfigResourceInner object itself.
+ * @return the BackupResourceEncryptionConfigExtendedResourceInner object itself.
*/
- public BackupResourceEncryptionConfigResourceInner withEtag(String etag) {
+ public BackupResourceEncryptionConfigExtendedResourceInner withEtag(String etag) {
this.etag = etag;
return this;
}
/** {@inheritDoc} */
@Override
- public BackupResourceEncryptionConfigResourceInner withLocation(String location) {
+ public BackupResourceEncryptionConfigExtendedResourceInner withLocation(String location) {
super.withLocation(location);
return this;
}
/** {@inheritDoc} */
@Override
- public BackupResourceEncryptionConfigResourceInner withTags(Map tags) {
+ public BackupResourceEncryptionConfigExtendedResourceInner withTags(Map tags) {
super.withTags(tags);
return this;
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java
new file mode 100644
index 000000000000..9c0885478cc8
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The ResourceGuardProxyBaseResource model. */
+@Fluent
+public final class ResourceGuardProxyBaseResourceInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGuardProxyBaseResourceInner.class);
+
+ /*
+ * ResourceGuardProxyBaseResource properties
+ */
+ @JsonProperty(value = "properties")
+ private ResourceGuardProxyBase properties;
+
+ /*
+ * Optional ETag.
+ */
+ @JsonProperty(value = "eTag")
+ private String etag;
+
+ /**
+ * Get the properties property: ResourceGuardProxyBaseResource properties.
+ *
+ * @return the properties value.
+ */
+ public ResourceGuardProxyBase properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: ResourceGuardProxyBaseResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the ResourceGuardProxyBaseResourceInner object itself.
+ */
+ public ResourceGuardProxyBaseResourceInner withProperties(ResourceGuardProxyBase properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the etag property: Optional ETag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: Optional ETag.
+ *
+ * @param etag the etag value to set.
+ * @return the ResourceGuardProxyBaseResourceInner object itself.
+ */
+ public ResourceGuardProxyBaseResourceInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ResourceGuardProxyBaseResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ResourceGuardProxyBaseResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/UnlockDeleteResponseInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/UnlockDeleteResponseInner.java
new file mode 100644
index 000000000000..7c782e59a586
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/UnlockDeleteResponseInner.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Response of Unlock Delete API. */
+@Fluent
+public final class UnlockDeleteResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UnlockDeleteResponseInner.class);
+
+ /*
+ * This is the time when unlock delete privileges will get expired.
+ */
+ @JsonProperty(value = "unlockDeleteExpiryTime")
+ private String unlockDeleteExpiryTime;
+
+ /**
+ * Get the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired.
+ *
+ * @return the unlockDeleteExpiryTime value.
+ */
+ public String unlockDeleteExpiryTime() {
+ return this.unlockDeleteExpiryTime;
+ }
+
+ /**
+ * Set the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired.
+ *
+ * @param unlockDeleteExpiryTime the unlockDeleteExpiryTime value to set.
+ * @return the UnlockDeleteResponseInner object itself.
+ */
+ public UnlockDeleteResponseInner withUnlockDeleteExpiryTime(String unlockDeleteExpiryTime) {
+ this.unlockDeleteExpiryTime = unlockDeleteExpiryTime;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java
index 10eca34be43f..dd7a61547f95 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java
@@ -139,7 +139,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -202,7 +202,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -362,7 +362,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter backupEngineName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -427,7 +427,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter backupEngineName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java
index ebee30211e67..7d4b5ad53a8c 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java
@@ -121,7 +121,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -184,7 +184,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java
index a5a06443ab6a..db3ae030cd9b 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java
@@ -109,7 +109,7 @@ private Mono> getWithResponseAsync(String vaultName, String resou
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -167,7 +167,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java
index 5b5c0f307307..5fd244d92a78 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java
@@ -110,7 +110,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -167,7 +167,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java
index c119cd2f9f2b..428ee8f0866f 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java
@@ -120,7 +120,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -182,7 +182,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java
index 88562b612fcf..73c84753a40e 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java
@@ -123,7 +123,7 @@ private Mono> listSinglePage
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -187,7 +187,7 @@ private Mono> listSinglePage
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java
index 96df48994127..eae049b63385 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java
@@ -122,7 +122,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -185,7 +185,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java
index 823d4ecbbbd6..58f6fc1acd95 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java
@@ -121,7 +121,7 @@ private Mono> listSinglePageAsyn
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -182,7 +182,7 @@ private Mono> listSinglePageAsyn
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java
index fbbf246f8773..33333f4b134e 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java
@@ -122,7 +122,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -185,7 +185,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java
similarity index 72%
rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigResourceImpl.java
rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java
index a9348ea5cdc1..c84fdfdd56c5 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigResourceImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java
@@ -4,19 +4,20 @@
package com.azure.resourcemanager.recoveryservicesbackup.implementation;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner;
-import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfig;
-import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource;
import java.util.Collections;
import java.util.Map;
-public final class BackupResourceEncryptionConfigResourceImpl implements BackupResourceEncryptionConfigResource {
- private BackupResourceEncryptionConfigResourceInner innerObject;
+public final class BackupResourceEncryptionConfigExtendedResourceImpl
+ implements BackupResourceEncryptionConfigExtendedResource {
+ private BackupResourceEncryptionConfigExtendedResourceInner innerObject;
private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager;
- BackupResourceEncryptionConfigResourceImpl(
- BackupResourceEncryptionConfigResourceInner innerObject,
+ BackupResourceEncryptionConfigExtendedResourceImpl(
+ BackupResourceEncryptionConfigExtendedResourceInner innerObject,
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
@@ -47,7 +48,7 @@ public Map tags() {
}
}
- public BackupResourceEncryptionConfig properties() {
+ public BackupResourceEncryptionConfigExtended properties() {
return this.innerModel().properties();
}
@@ -55,7 +56,7 @@ public String etag() {
return this.innerModel().etag();
}
- public BackupResourceEncryptionConfigResourceInner innerModel() {
+ public BackupResourceEncryptionConfigExtendedResourceInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java
index 0bc8650e23f2..04bdffd11c0a 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java
@@ -25,7 +25,8 @@
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in BackupResourceEncryptionConfigsClient. */
@@ -66,7 +67,7 @@ private interface BackupResourceEncryptionConfigsService {
+ "/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(
+ Mono> get(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("vaultName") String vaultName,
@@ -87,7 +88,7 @@ Mono> update(
@PathParam("vaultName") String vaultName,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") BackupResourceEncryptionConfigResourceInner parameters,
+ @BodyParam("application/json") BackupResourceEncryptionConfigResource parameters,
@HeaderParam("Accept") String accept,
Context context);
}
@@ -103,7 +104,7 @@ Mono> update(
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(
+ private Mono> getWithResponseAsync(
String vaultName, String resourceGroupName) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -124,7 +125,7 @@ private Mono> getWithRespo
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -153,7 +154,7 @@ private Mono> getWithRespo
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(
+ private Mono> getWithResponseAsync(
String vaultName, String resourceGroupName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -174,7 +175,7 @@ private Mono> getWithRespo
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -199,10 +200,11 @@ private Mono> getWithRespo
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String vaultName, String resourceGroupName) {
+ private Mono getAsync(
+ String vaultName, String resourceGroupName) {
return getWithResponseAsync(vaultName, resourceGroupName)
.flatMap(
- (Response res) -> {
+ (Response res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
@@ -222,7 +224,7 @@ private Mono getAsync(String vaultN
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public BackupResourceEncryptionConfigResourceInner get(String vaultName, String resourceGroupName) {
+ public BackupResourceEncryptionConfigExtendedResourceInner get(String vaultName, String resourceGroupName) {
return getAsync(vaultName, resourceGroupName).block();
}
@@ -238,7 +240,7 @@ public BackupResourceEncryptionConfigResourceInner get(String vaultName, String
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
+ public Response getWithResponse(
String vaultName, String resourceGroupName, Context context) {
return getWithResponseAsync(vaultName, resourceGroupName, context).block();
}
@@ -256,7 +258,7 @@ public Response getWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
- String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) {
+ String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -281,7 +283,7 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -315,7 +317,7 @@ private Mono> updateWithResponseAsync(
private Mono> updateWithResponseAsync(
String vaultName,
String resourceGroupName,
- BackupResourceEncryptionConfigResourceInner parameters,
+ BackupResourceEncryptionConfigResource parameters,
Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -341,7 +343,7 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -369,7 +371,7 @@ private Mono> updateWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
- String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) {
+ String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) {
return updateWithResponseAsync(vaultName, resourceGroupName, parameters)
.flatMap((Response res) -> Mono.empty());
}
@@ -385,8 +387,7 @@ private Mono updateAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void update(
- String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) {
+ public void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) {
updateAsync(vaultName, resourceGroupName, parameters).block();
}
@@ -406,7 +407,7 @@ public void update(
public Response updateWithResponse(
String vaultName,
String resourceGroupName,
- BackupResourceEncryptionConfigResourceInner parameters,
+ BackupResourceEncryptionConfigResource parameters,
Context context) {
return updateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block();
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java
index 004b68190cef..9bee7c6c8da6 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java
@@ -9,7 +9,8 @@
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigs;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -28,39 +29,39 @@ public BackupResourceEncryptionConfigsImpl(
this.serviceManager = serviceManager;
}
- public BackupResourceEncryptionConfigResource get(String vaultName, String resourceGroupName) {
- BackupResourceEncryptionConfigResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName);
+ public BackupResourceEncryptionConfigExtendedResource get(String vaultName, String resourceGroupName) {
+ BackupResourceEncryptionConfigExtendedResourceInner inner =
+ this.serviceClient().get(vaultName, resourceGroupName);
if (inner != null) {
- return new BackupResourceEncryptionConfigResourceImpl(inner, this.manager());
+ return new BackupResourceEncryptionConfigExtendedResourceImpl(inner, this.manager());
} else {
return null;
}
}
- public Response getWithResponse(
+ public Response getWithResponse(
String vaultName, String resourceGroupName, Context context) {
- Response inner =
+ Response inner =
this.serviceClient().getWithResponse(vaultName, resourceGroupName, context);
if (inner != null) {
return new SimpleResponse<>(
inner.getRequest(),
inner.getStatusCode(),
inner.getHeaders(),
- new BackupResourceEncryptionConfigResourceImpl(inner.getValue(), this.manager()));
+ new BackupResourceEncryptionConfigExtendedResourceImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
- public void update(
- String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) {
+ public void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) {
this.serviceClient().update(vaultName, resourceGroupName, parameters);
}
public Response updateWithResponse(
String vaultName,
String resourceGroupName,
- BackupResourceEncryptionConfigResourceInner parameters,
+ BackupResourceEncryptionConfigResource parameters,
Context context) {
return this.serviceClient().updateWithResponse(vaultName, resourceGroupName, parameters, context);
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java
new file mode 100644
index 000000000000..fe5e5965d0bd
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java
@@ -0,0 +1,595 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupResourceStorageConfigsNonCrrsClient.
+ */
+public final class BackupResourceStorageConfigsNonCrrsClientImpl implements BackupResourceStorageConfigsNonCrrsClient {
+ private final ClientLogger logger = new ClientLogger(BackupResourceStorageConfigsNonCrrsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BackupResourceStorageConfigsNonCrrsService service;
+
+ /** The service client containing this operation class. */
+ private final RecoveryServicesBackupClientImpl client;
+
+ /**
+ * Initializes an instance of BackupResourceStorageConfigsNonCrrsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupResourceStorageConfigsNonCrrsClientImpl(RecoveryServicesBackupClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ BackupResourceStorageConfigsNonCrrsService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupClientBackupResourceStorageConfigsNonCrrs to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RecoveryServicesBack")
+ private interface BackupResourceStorageConfigsNonCrrsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices"
+ + "/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices"
+ + "/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") BackupResourceConfigResourceInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices"
+ + "/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @ExpectedResponses({204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> patch(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") BackupResourceConfigResourceInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String vaultName, String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String vaultName, String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String vaultName, String resourceGroupName) {
+ return getWithResponseAsync(vaultName, resourceGroupName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupResourceConfigResourceInner get(String vaultName, String resourceGroupName) {
+ return getAsync(vaultName, resourceGroupName).block();
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String vaultName, String resourceGroupName, Context context) {
+ return getWithResponseAsync(vaultName, resourceGroupName, context).block();
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ return updateWithResponseAsync(vaultName, resourceGroupName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupResourceConfigResourceInner update(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ return updateAsync(vaultName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) {
+ return updateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block();
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> patchWithResponseAsync(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .patch(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> patchWithResponseAsync(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .patch(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono patchAsync(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ return patchWithResponseAsync(vaultName, resourceGroupName, parameters)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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)
+ public void patch(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ patchAsync(vaultName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters Vault storage config request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response patchWithResponse(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) {
+ return patchWithResponseAsync(vaultName, resourceGroupName, parameters, context).block();
+ }
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java
new file mode 100644
index 000000000000..dfd195905eb1
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfigResource;
+import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceStorageConfigsNonCrrs;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class BackupResourceStorageConfigsNonCrrsImpl implements BackupResourceStorageConfigsNonCrrs {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupResourceStorageConfigsNonCrrsImpl.class);
+
+ private final BackupResourceStorageConfigsNonCrrsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager;
+
+ public BackupResourceStorageConfigsNonCrrsImpl(
+ BackupResourceStorageConfigsNonCrrsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public BackupResourceConfigResource get(String vaultName, String resourceGroupName) {
+ BackupResourceConfigResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName);
+ if (inner != null) {
+ return new BackupResourceConfigResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String vaultName, String resourceGroupName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(vaultName, resourceGroupName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BackupResourceConfigResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public BackupResourceConfigResource update(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ BackupResourceConfigResourceInner inner = this.serviceClient().update(vaultName, resourceGroupName, parameters);
+ if (inner != null) {
+ return new BackupResourceConfigResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response updateWithResponse(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) {
+ Response inner =
+ this.serviceClient().updateWithResponse(vaultName, resourceGroupName, parameters, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BackupResourceConfigResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void patch(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
+ this.serviceClient().patch(vaultName, resourceGroupName, parameters);
+ }
+
+ public Response patchWithResponse(
+ String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) {
+ return this.serviceClient().patchWithResponse(vaultName, resourceGroupName, parameters, context);
+ }
+
+ private BackupResourceStorageConfigsNonCrrsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java
index 31c00591ce30..04ce258d9dbc 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java
@@ -139,7 +139,7 @@ private Mono> getWithResponseAs
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -189,7 +189,7 @@ private Mono> getWithResponseAs
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -296,7 +296,7 @@ private Mono> updateWithRespons
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -356,7 +356,7 @@ private Mono> updateWithRespons
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -472,7 +472,7 @@ private Mono> putWithResponseAs
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -532,7 +532,7 @@ private Mono> putWithResponseAs
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java
index 84436e2cc1f4..2fc1a1082130 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java
@@ -104,7 +104,7 @@ private Mono> getWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -155,7 +155,7 @@ private Mono> getWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java
index 47c6ec55d22e..39a9e4cc98f4 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java
@@ -112,7 +112,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -170,7 +170,7 @@ private Mono> listSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java
index f1db06b8ccff..3ec182a7473f 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java
@@ -137,7 +137,7 @@ private Mono> listSinglePageAsync(
if (containerName == null) {
return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -217,7 +217,7 @@ private Mono> listSinglePageAsync(
if (containerName == null) {
return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java
index 73abd39bea99..f3d6d1ed385d 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java
@@ -132,7 +132,7 @@ private Mono> triggerWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -212,7 +212,7 @@ private Mono> triggerWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java
index 8a30b07b0b1c..d155b8f12cf3 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java
@@ -113,7 +113,7 @@ private Mono> getWithRe
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -168,7 +168,7 @@ private Mono> getWithRe
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/CrossRegionRestoresClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/CrossRegionRestoresClientImpl.java
index 30aeaa5e3e25..0a5cd93bcf24 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/CrossRegionRestoresClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/CrossRegionRestoresClientImpl.java
@@ -184,7 +184,7 @@ private Mono>> triggerWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginTriggerAsync(
String azureRegion, CrossRegionRestoreRequest parameters) {
Mono>> mono = triggerWithResponseAsync(azureRegion, parameters);
@@ -204,7 +204,7 @@ private PollerFlux, Void> beginTriggerAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginTriggerAsync(
String azureRegion, CrossRegionRestoreRequest parameters, Context context) {
context = this.client.mergeContext(context);
@@ -224,7 +224,7 @@ private PollerFlux, Void> beginTriggerAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginTrigger(String azureRegion, CrossRegionRestoreRequest parameters) {
return beginTriggerAsync(azureRegion, parameters).getSyncPoller();
}
@@ -240,7 +240,7 @@ public SyncPoller, Void> beginTrigger(String azureRegion, Cross
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginTrigger(
String azureRegion, CrossRegionRestoreRequest parameters, Context context) {
return beginTriggerAsync(azureRegion, parameters, context).getSyncPoller();
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java
index d25ec78c0d09..8f20c86ee191 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java
@@ -111,7 +111,7 @@ private Mono> getWithResponseAsyn
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -168,7 +168,7 @@ private Mono> getWithResponseAsyn
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java
index fd362449ff2c..8c4e5ccde9fc 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java
@@ -105,7 +105,7 @@ private Mono> validateWithR
} else {
parameters.validate();
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -156,7 +156,7 @@ private Mono> validateWithR
} else {
parameters.validate();
}
- final String apiVersion = "2017-07-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java
index 839c6a266c0a..800f6be471a9 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java
@@ -164,7 +164,7 @@ private Mono> provisionWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -253,7 +253,7 @@ private Mono> provisionWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -433,7 +433,7 @@ private Mono> revokeWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -513,7 +513,7 @@ private Mono> revokeWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java
index 9b75b70f9ed1..f2dbc86d97f5 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java
@@ -106,7 +106,7 @@ private Mono> triggerWithResponseAsync(String vaultName, String r
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -162,7 +162,7 @@ private Mono> triggerWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java
index 9c2e77b88554..b4141c0694eb 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java
@@ -107,7 +107,7 @@ private Mono> getWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -162,7 +162,7 @@ private Mono> getWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java
index 713cca38d69c..242c622120f8 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java
@@ -111,7 +111,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -171,7 +171,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java
index 9ed5cf355b5d..a383e28f5aa0 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java
@@ -101,7 +101,7 @@ private Mono> exportWithResponseAsync(String vaultName, String re
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -153,7 +153,7 @@ private Mono> exportWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java
new file mode 100644
index 000000000000..6c6e423e1e9b
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java
@@ -0,0 +1,245 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationOperationsClient. */
+public final class OperationOperationsClientImpl implements OperationOperationsClient {
+ private final ClientLogger logger = new ClientLogger(OperationOperationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationOperationsService service;
+
+ /** The service client containing this operation class. */
+ private final RecoveryServicesBackupClientImpl client;
+
+ /**
+ * Initializes an instance of OperationOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationOperationsClientImpl(RecoveryServicesBackupClientImpl client) {
+ this.service =
+ RestProxy.create(OperationOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupClientOperationOperations to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RecoveryServicesBack")
+ private interface OperationOperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices"
+ + "/vaults/{vaultName}/backupValidateOperation")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> validate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ValidateOperationRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Validate operation for specified backed up item. This is a synchronous operation.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters resource validate operation request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> validateWithResponseAsync(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .validate(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Validate operation for specified backed up item. This is a synchronous operation.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters resource validate operation request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> validateWithResponseAsync(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2021-08-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .validate(
+ this.client.getEndpoint(),
+ apiVersion,
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Validate operation for specified backed up item. This is a synchronous operation.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters resource validate operation request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono validateAsync(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
+ return validateWithResponseAsync(vaultName, resourceGroupName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Validate operation for specified backed up item. This is a synchronous operation.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters resource validate operation request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ValidateOperationsResponseInner validate(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
+ return validateAsync(vaultName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Validate operation for specified backed up item. This is a synchronous operation.
+ *
+ * @param vaultName The name of the recovery services vault.
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param parameters resource validate operation request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response validateWithResponse(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) {
+ return validateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block();
+ }
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java
new file mode 100644
index 000000000000..9236ff19cfee
--- /dev/null
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackup.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.OperationOperations;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationsResponse;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationOperationsImpl implements OperationOperations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationOperationsImpl.class);
+
+ private final OperationOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager;
+
+ public OperationOperationsImpl(
+ OperationOperationsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public ValidateOperationsResponse validate(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
+ ValidateOperationsResponseInner inner = this.serviceClient().validate(vaultName, resourceGroupName, parameters);
+ if (inner != null) {
+ return new ValidateOperationsResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response validateWithResponse(
+ String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) {
+ Response inner =
+ this.serviceClient().validateWithResponse(vaultName, resourceGroupName, parameters, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ValidateOperationsResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private OperationOperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java
index 5d5726755217..b5d532b9cb47 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java
@@ -4,19 +4,22 @@
package com.azure.resourcemanager.recoveryservicesbackup.implementation;
-import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
@@ -24,8 +27,8 @@
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner;
-import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryResponse;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
@@ -57,189 +60,212 @@ public final class OperationsClientImpl implements OperationsClient {
@ServiceInterface(name = "RecoveryServicesBack")
private interface OperationsService {
@Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices"
- + "/vaults/{vaultName}/backupValidateOperation")
+ @Get("/providers/Microsoft.RecoveryServices/operations")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> validate(
+ Mono> list(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
- @PathParam("vaultName") String vaultName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") ValidateOperationRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept,
Context context);
}
/**
- * Validate operation for specified backed up item. This is a synchronous operation.
+ * Returns the list of available operations.
*
- * @param vaultName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param parameters resource validate operation request.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 operations List response which contains list of available APIs.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> validateWithResponseAsync(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
+ private Mono> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- if (vaultName == null) {
- return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .validate(
- this.client.getEndpoint(),
- apiVersion,
- vaultName,
- resourceGroupName,
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context))
+ .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Validate operation for specified backed up item. This is a synchronous operation.
+ * Returns the list of available operations.
*
- * @param vaultName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param parameters resource validate operation request.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 operations List response which contains list of available APIs.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> validateWithResponseAsync(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) {
+ private Mono> listSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
- if (vaultName == null) {
- return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .validate(
- this.client.getEndpoint(),
- apiVersion,
- vaultName,
- resourceGroupName,
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context);
+ .list(this.client.getEndpoint(), apiVersion, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
}
/**
- * Validate operation for specified backed up item. This is a synchronous operation.
+ * Returns the list of available operations.
*
- * @param vaultName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param parameters resource validate operation request.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operations List response which contains list of available APIs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Returns the list of available operations.
+ *
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 operations List response which contains list of available APIs.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono validateAsync(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
- return validateWithResponseAsync(vaultName, resourceGroupName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
- * Validate operation for specified backed up item. This is a synchronous operation.
+ * Returns the list of available operations.
*
- * @param vaultName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param parameters resource validate operation request.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operations List response which contains list of available APIs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Returns the list of available operations.
+ *
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 operations List response which contains list of available APIs.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operations List response which contains list of available APIs.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ValidateOperationsResponseInner validate(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
- return validateAsync(vaultName, resourceGroupName, parameters).block();
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Validate operation for specified backed up item. This is a synchronous operation.
+ * Get the next page of items.
*
- * @param vaultName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param parameters resource validate operation request.
+ * @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 operations List response which contains list of available APIs.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response validateWithResponse(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) {
- return validateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block();
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
}
}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java
index 26b4097213b5..52ce425f547e 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java
@@ -4,15 +4,13 @@
package com.azure.resourcemanager.recoveryservicesbackup.implementation;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner;
+import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner;
+import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi;
import com.azure.resourcemanager.recoveryservicesbackup.models.Operations;
-import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest;
-import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationsResponse;
import com.fasterxml.jackson.annotation.JsonIgnore;
public final class OperationsImpl implements Operations {
@@ -29,29 +27,14 @@ public OperationsImpl(
this.serviceManager = serviceManager;
}
- public ValidateOperationsResponse validate(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters) {
- ValidateOperationsResponseInner inner = this.serviceClient().validate(vaultName, resourceGroupName, parameters);
- if (inner != null) {
- return new ValidateOperationsResponseImpl(inner, this.manager());
- } else {
- return null;
- }
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
}
- public Response validateWithResponse(
- String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) {
- Response inner =
- this.serviceClient().validateWithResponse(vaultName, resourceGroupName, parameters, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new ValidateOperationsResponseImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsImpl.java
deleted file mode 100644
index f47b287a17cb..000000000000
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.recoveryservicesbackup.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsOperationsClient;
-import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner;
-import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi;
-import com.azure.resourcemanager.recoveryservicesbackup.models.OperationsOperations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public final class OperationsOperationsImpl implements OperationsOperations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsOperationsImpl.class);
-
- private final OperationsOperationsClient innerClient;
-
- private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager;
-
- public OperationsOperationsImpl(
- OperationsOperationsClient innerClient,
- com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
- }
-
- private OperationsOperationsClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java
index 47b54106822b..acb82b3114bc 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -153,7 +153,7 @@ private Mono> getWithResponseAs
new IllegalArgumentException(
"Parameter privateEndpointConnectionName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -211,7 +211,7 @@ private Mono> getWithResponseAs
new IllegalArgumentException(
"Parameter privateEndpointConnectionName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -334,7 +334,7 @@ private Mono>> putWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -403,7 +403,7 @@ private Mono>> putWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -431,7 +431,7 @@ private Mono>> putWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return private Endpoint Connection Response Properties.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, PrivateEndpointConnectionResourceInner>
beginPutAsync(
String vaultName,
@@ -463,7 +463,7 @@ private Mono>> putWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return private Endpoint Connection Response Properties.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, PrivateEndpointConnectionResourceInner>
beginPutAsync(
String vaultName,
@@ -496,7 +496,7 @@ private Mono>> putWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return private Endpoint Connection Response Properties.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, PrivateEndpointConnectionResourceInner>
beginPut(
String vaultName,
@@ -519,7 +519,7 @@ private Mono>> putWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return private Endpoint Connection Response Properties.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, PrivateEndpointConnectionResourceInner>
beginPut(
String vaultName,
@@ -662,7 +662,7 @@ private Mono>> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter privateEndpointConnectionName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -720,7 +720,7 @@ private Mono>> deleteWithResponseAsync(
new IllegalArgumentException(
"Parameter privateEndpointConnectionName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -746,7 +746,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String vaultName, String resourceGroupName, String privateEndpointConnectionName) {
Mono>> mono =
@@ -768,7 +768,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String vaultName, String resourceGroupName, String privateEndpointConnectionName, Context context) {
context = this.client.mergeContext(context);
@@ -790,7 +790,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String vaultName, String resourceGroupName, String privateEndpointConnectionName) {
return beginDeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName).getSyncPoller();
@@ -808,7 +808,7 @@ public SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String vaultName, String resourceGroupName, String privateEndpointConnectionName, Context context) {
return beginDeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName, context).getSyncPoller();
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java
index d7264242d9c0..3bdee817a2cf 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java
@@ -116,7 +116,7 @@ private Mono> getOperationStatusWithResponseAsync
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -183,7 +183,7 @@ private Mono> getOperationStatusWithResponseAsync
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java
index 589c59d02327..25aecd3ea436 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java
@@ -125,7 +125,7 @@ private Mono> listSinglePageAsy
if (fabricName == null) {
return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -191,7 +191,7 @@ private Mono> listSinglePageAsy
if (fabricName == null) {
return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java
index 2686b088d7e5..111a3757c4e6 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java
@@ -133,7 +133,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -210,7 +210,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java
index b4d8a6b31d64..9cb3193af177 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java
@@ -135,7 +135,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -214,7 +214,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java
index a12a3bed50bf..07d6444fc5bd 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java
@@ -169,7 +169,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -244,7 +244,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -433,7 +433,7 @@ private Mono> createOrUpdateWithResponseAsy
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -513,7 +513,7 @@ private Mono> createOrUpdateWithResponseAsy
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -670,7 +670,7 @@ private Mono> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -742,7 +742,7 @@ private Mono> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java
index 4adf30622a85..338d0ba50477 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java
@@ -217,8 +217,7 @@ public void deleteById(String id) {
}
this
.deleteWithResponse(
- vaultName, resourceGroupName, fabricName, containerName, protectedItemName, Context.NONE)
- .getValue();
+ vaultName, resourceGroupName, fabricName, containerName, protectedItemName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java
index e304ccaecbbc..16f588839efb 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java
@@ -124,7 +124,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -194,7 +194,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java
index 8aa1a8d8b9b5..43c02fd97c92 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java
@@ -120,7 +120,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -180,7 +180,7 @@ private Mono> getWithResponseAsync(
if (operationId == null) {
return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java
index 6ccb751eecfc..65443b716536 100644
--- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java
+++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java
@@ -187,7 +187,7 @@ private Mono> getWithResponseAsync(
if (containerName == null) {
return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -247,7 +247,7 @@ private Mono> getWithResponseAsync(
if (containerName == null) {
return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2021-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -377,7 +377,7 @@ private Mono