From e198206202446924984f31f5e5aa28e85aa137c8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 20 Jun 2022 04:23:21 +0000 Subject: [PATCH] CodeGen from PR 19083 in Azure/azure-rest-api-specs Merge 55c52016013e14c347a5978379f8efe41986049e into f108180f8a62ed664733f716182c51b8d1f5cb03 --- .../armdataprotection/CHANGELOG.md | 6 + .../armdataprotection/autorest.md | 6 +- ...es_client.go => backupinstances_client.go} | 84 +-- ...ies_client.go => backuppolicies_client.go} | 16 +- ... => backupvaultoperationresults_client.go} | 4 +- ...aults_client.go => backupvaults_client.go} | 32 +- .../{zz_generated_client.go => client.go} | 4 +- ...zz_generated_constants.go => constants.go} | 4 +- ...ortjobs_client.go => exportjobs_client.go} | 6 +- ...go => exportjobsoperationresult_client.go} | 4 +- .../dataprotection/armdataprotection/go.mod | 12 +- .../dataprotection/armdataprotection/go.sum | 25 +- ...enerated_jobs_client.go => jobs_client.go} | 8 +- .../{zz_generated_models.go => models.go} | 26 +- ...erated_models_serde.go => models_serde.go} | 23 + ...lt_client.go => operationresult_client.go} | 4 +- ...rations_client.go => operations_client.go} | 4 +- ...us_client.go => operationstatus_client.go} | 4 +- ...erationstatusbackupvaultcontext_client.go} | 4 +- ...ationstatusresourcegroupcontext_client.go} | 4 +- ...phic_helpers.go => polymorphic_helpers.go} | 0 ...nts_client.go => recoverypoints_client.go} | 8 +- ...rds_client.go => resourceguards_client.go} | 72 +-- ...ed_response_types.go => response_types.go} | 0 ...ient.go => restorabletimeranges_client.go} | 4 +- ...erated_time_rfc3339.go => time_rfc3339.go} | 0 ...ted_example_backupinstances_client_test.go | 567 ------------------ ...ated_example_backuppolicies_client_test.go | 195 ------ ...backupvaultoperationresults_client_test.go | 40 -- ...erated_example_backupvaults_client_test.go | 220 ------- ...ated_example_dataprotection_client_test.go | 43 -- ...le_dataprotectionoperations_client_test.go | 41 -- ...enerated_example_exportjobs_client_test.go | 41 -- ...e_exportjobsoperationresult_client_test.go | 40 -- .../ze_generated_example_jobs_client_test.go | 66 -- ...ted_example_operationresult_client_test.go | 39 -- ...ted_example_operationstatus_client_test.go | 39 -- ...ionstatusbackupvaultcontext_client_test.go | 40 -- ...nstatusresourcegroupcontext_client_test.go | 39 -- ...ated_example_recoverypoints_client_test.go | 70 --- ...ated_example_resourceguards_client_test.go | 458 -------------- ...xample_restorabletimeranges_client_test.go | 46 -- 42 files changed, 192 insertions(+), 2156 deletions(-) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_backupinstances_client.go => backupinstances_client.go} (96%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_backuppolicies_client.go => backuppolicies_client.go} (97%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_backupvaultoperationresults_client.go => backupvaultoperationresults_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_backupvaults_client.go => backupvaults_client.go} (97%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_client.go => client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_constants.go => constants.go} (99%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_exportjobs_client.go => exportjobs_client.go} (97%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_exportjobsoperationresult_client.go => exportjobsoperationresult_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_jobs_client.go => jobs_client.go} (97%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_models.go => models.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_models_serde.go => models_serde.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_operationresult_client.go => operationresult_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_operations_client.go => operations_client.go} (97%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_operationstatus_client.go => operationstatus_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_operationstatusbackupvaultcontext_client.go => operationstatusbackupvaultcontext_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_operationstatusresourcegroupcontext_client.go => operationstatusresourcegroupcontext_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_polymorphic_helpers.go => polymorphic_helpers.go} (100%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_recoverypoints_client.go => recoverypoints_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_resourceguards_client.go => resourceguards_client.go} (97%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_response_types.go => response_types.go} (100%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_restorabletimeranges_client.go => restorabletimeranges_client.go} (98%) rename sdk/resourcemanager/dataprotection/armdataprotection/{zz_generated_time_rfc3339.go => time_rfc3339.go} (100%) delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupinstances_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backuppolicies_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaultoperationresults_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaults_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotection_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotectionoperations_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobs_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobsoperationresult_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_jobs_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationresult_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatus_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusbackupvaultcontext_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusresourcegroupcontext_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_recoverypoints_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_resourceguards_client_test.go delete mode 100644 sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_restorabletimeranges_client_test.go diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/CHANGELOG.md b/sdk/resourcemanager/dataprotection/armdataprotection/CHANGELOG.md index dac76a270316..a4cb5db1a144 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/CHANGELOG.md +++ b/sdk/resourcemanager/dataprotection/armdataprotection/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.1.0 (2022-06-20) +### Features Added + +- New field `Tags` in struct `BackupInstanceResource` + + ## 1.0.0 (2022-05-18) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/autorest.md b/sdk/resourcemanager/dataprotection/armdataprotection/autorest.md index a9605a879795..e9826d7c01b4 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/autorest.md +++ b/sdk/resourcemanager/dataprotection/armdataprotection/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/dataprotection/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/dataprotection/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/dataprotection/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/dataprotection/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 +module-version: 1.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupinstances_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/backupinstances_client.go similarity index 96% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupinstances_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/backupinstances_client.go index 85f2dfcf4ab9..a932e34676ee 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupinstances_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/backupinstances_client.go @@ -56,7 +56,7 @@ func NewBackupInstancesClient(subscriptionID string, credential azcore.TokenCred // BeginAdhocBackup - Trigger adhoc backup // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -77,7 +77,7 @@ func (client *BackupInstancesClient) BeginAdhocBackup(ctx context.Context, resou // AdhocBackup - Trigger adhoc backup // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) adhocBackup(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*http.Response, error) { req, err := client.adhocBackupCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) if err != nil { @@ -117,7 +117,7 @@ func (client *BackupInstancesClient) adhocBackupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -125,7 +125,7 @@ func (client *BackupInstancesClient) adhocBackupCreateRequest(ctx context.Contex // BeginCreateOrUpdate - Create or update a backup instance in a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -146,7 +146,7 @@ func (client *BackupInstancesClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create or update a backup instance in a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) if err != nil { @@ -186,7 +186,7 @@ func (client *BackupInstancesClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -194,7 +194,7 @@ func (client *BackupInstancesClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Delete a backup instance in a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -214,7 +214,7 @@ func (client *BackupInstancesClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete a backup instance in a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) if err != nil { @@ -254,7 +254,7 @@ func (client *BackupInstancesClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +262,7 @@ func (client *BackupInstancesClient) deleteCreateRequest(ctx context.Context, re // Get - Gets a backup instance with name in a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -306,7 +306,7 @@ func (client *BackupInstancesClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -323,7 +323,7 @@ func (client *BackupInstancesClient) getHandleResponse(resp *http.Response) (Bac // GetBackupInstanceOperationResult - Get result of backup instance creation operation // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupInstancesClientGetBackupInstanceOperationResultOptions contains the optional parameters for the BackupInstancesClient.GetBackupInstanceOperationResult @@ -371,7 +371,7 @@ func (client *BackupInstancesClient) getBackupInstanceOperationResultCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -388,7 +388,7 @@ func (client *BackupInstancesClient) getBackupInstanceOperationResultHandleRespo // NewListPager - Gets a backup instances belonging to a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupInstancesClientListOptions contains the optional parameters for the BackupInstancesClient.List method. @@ -440,7 +440,7 @@ func (client *BackupInstancesClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -457,7 +457,7 @@ func (client *BackupInstancesClient) listHandleResponse(resp *http.Response) (Ba // BeginResumeBackups - This operation will resume backups for backup instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupInstancesClientBeginResumeBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginResumeBackups @@ -476,7 +476,7 @@ func (client *BackupInstancesClient) BeginResumeBackups(ctx context.Context, res // ResumeBackups - This operation will resume backups for backup instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) resumeBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*http.Response, error) { req, err := client.resumeBackupsCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) if err != nil { @@ -516,7 +516,7 @@ func (client *BackupInstancesClient) resumeBackupsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -524,7 +524,7 @@ func (client *BackupInstancesClient) resumeBackupsCreateRequest(ctx context.Cont // BeginResumeProtection - This operation will resume protection for a stopped backup instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupInstancesClientBeginResumeProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginResumeProtection @@ -543,7 +543,7 @@ func (client *BackupInstancesClient) BeginResumeProtection(ctx context.Context, // ResumeProtection - This operation will resume protection for a stopped backup instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) resumeProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*http.Response, error) { req, err := client.resumeProtectionCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) if err != nil { @@ -583,7 +583,7 @@ func (client *BackupInstancesClient) resumeProtectionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -591,7 +591,7 @@ func (client *BackupInstancesClient) resumeProtectionCreateRequest(ctx context.C // BeginStopProtection - This operation will stop protection of a backup instance and data will be held forever // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupInstancesClientBeginStopProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginStopProtection @@ -610,7 +610,7 @@ func (client *BackupInstancesClient) BeginStopProtection(ctx context.Context, re // StopProtection - This operation will stop protection of a backup instance and data will be held forever // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) stopProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*http.Response, error) { req, err := client.stopProtectionCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) if err != nil { @@ -650,7 +650,7 @@ func (client *BackupInstancesClient) stopProtectionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -658,7 +658,7 @@ func (client *BackupInstancesClient) stopProtectionCreateRequest(ctx context.Con // BeginSuspendBackups - This operation will stop backups for backup instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupInstancesClientBeginSuspendBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginSuspendBackups @@ -677,7 +677,7 @@ func (client *BackupInstancesClient) BeginSuspendBackups(ctx context.Context, re // SuspendBackups - This operation will stop backups for backup instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) suspendBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*http.Response, error) { req, err := client.suspendBackupsCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) if err != nil { @@ -717,7 +717,7 @@ func (client *BackupInstancesClient) suspendBackupsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -726,7 +726,7 @@ func (client *BackupInstancesClient) suspendBackupsCreateRequest(ctx context.Con // BeginSyncBackupInstance - Sync backup instance again in case of failure This action will retry last failed operation and // will bring backup instance to valid state // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // parameters - Request body for operation @@ -747,7 +747,7 @@ func (client *BackupInstancesClient) BeginSyncBackupInstance(ctx context.Context // SyncBackupInstance - Sync backup instance again in case of failure This action will retry last failed operation and will // bring backup instance to valid state // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) syncBackupInstance(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*http.Response, error) { req, err := client.syncBackupInstanceCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) if err != nil { @@ -787,7 +787,7 @@ func (client *BackupInstancesClient) syncBackupInstanceCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -795,7 +795,7 @@ func (client *BackupInstancesClient) syncBackupInstanceCreateRequest(ctx context // BeginTriggerRehydrate - rehydrate recovery point for restore for a BackupInstance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // parameters - Request body for operation @@ -815,7 +815,7 @@ func (client *BackupInstancesClient) BeginTriggerRehydrate(ctx context.Context, // TriggerRehydrate - rehydrate recovery point for restore for a BackupInstance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) triggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*http.Response, error) { req, err := client.triggerRehydrateCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) if err != nil { @@ -855,7 +855,7 @@ func (client *BackupInstancesClient) triggerRehydrateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -863,7 +863,7 @@ func (client *BackupInstancesClient) triggerRehydrateCreateRequest(ctx context.C // BeginTriggerRestore - Triggers restore for a BackupInstance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -884,7 +884,7 @@ func (client *BackupInstancesClient) BeginTriggerRestore(ctx context.Context, re // TriggerRestore - Triggers restore for a BackupInstance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) triggerRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRestoreRequestClassification, options *BackupInstancesClientBeginTriggerRestoreOptions) (*http.Response, error) { req, err := client.triggerRestoreCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) if err != nil { @@ -924,7 +924,7 @@ func (client *BackupInstancesClient) triggerRestoreCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -932,7 +932,7 @@ func (client *BackupInstancesClient) triggerRestoreCreateRequest(ctx context.Con // BeginValidateForBackup - Validate whether adhoc backup will be successful or not // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // parameters - Request body for operation @@ -952,7 +952,7 @@ func (client *BackupInstancesClient) BeginValidateForBackup(ctx context.Context, // ValidateForBackup - Validate whether adhoc backup will be successful or not // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) validateForBackup(ctx context.Context, resourceGroupName string, vaultName string, parameters ValidateForBackupRequest, options *BackupInstancesClientBeginValidateForBackupOptions) (*http.Response, error) { req, err := client.validateForBackupCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { @@ -988,7 +988,7 @@ func (client *BackupInstancesClient) validateForBackupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -996,7 +996,7 @@ func (client *BackupInstancesClient) validateForBackupCreateRequest(ctx context. // BeginValidateForRestore - Validates if Restore can be triggered for a DataSource // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -1017,7 +1017,7 @@ func (client *BackupInstancesClient) BeginValidateForRestore(ctx context.Context // ValidateForRestore - Validates if Restore can be triggered for a DataSource // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupInstancesClient) validateForRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*http.Response, error) { req, err := client.validateForRestoreCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) if err != nil { @@ -1057,7 +1057,7 @@ func (client *BackupInstancesClient) validateForRestoreCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backuppolicies_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/backuppolicies_client.go similarity index 97% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backuppolicies_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/backuppolicies_client.go index 025bd98fd83c..e09d56d4db4d 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backuppolicies_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/backuppolicies_client.go @@ -56,7 +56,7 @@ func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Creates or Updates a backup policy belonging to a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupPolicyName - Name of the policy @@ -102,7 +102,7 @@ func (client *BackupPoliciesClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -119,7 +119,7 @@ func (client *BackupPoliciesClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Deletes a backup policy belonging to a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupPoliciesClientDeleteOptions contains the optional parameters for the BackupPoliciesClient.Delete method. @@ -162,7 +162,7 @@ func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -170,7 +170,7 @@ func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a backup policy belonging to a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. @@ -213,7 +213,7 @@ func (client *BackupPoliciesClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -230,7 +230,7 @@ func (client *BackupPoliciesClient) getHandleResponse(resp *http.Response) (Back // NewListPager - Returns list of backup policies belonging to a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method. @@ -282,7 +282,7 @@ func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaultoperationresults_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/backupvaultoperationresults_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaultoperationresults_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/backupvaultoperationresults_client.go index 72065f20d470..5eee1bcd26af 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaultoperationresults_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/backupvaultoperationresults_client.go @@ -57,7 +57,7 @@ func NewBackupVaultOperationResultsClient(subscriptionID string, credential azco // Get - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupVaultOperationResultsClientGetOptions contains the optional parameters for the BackupVaultOperationResultsClient.Get @@ -101,7 +101,7 @@ func (client *BackupVaultOperationResultsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaults_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/backupvaults_client.go similarity index 97% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaults_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/backupvaults_client.go index ff021022f85a..cc668aa49d27 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaults_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/backupvaults_client.go @@ -56,7 +56,7 @@ func NewBackupVaultsClient(subscriptionID string, credential azcore.TokenCredent // CheckNameAvailability - API to check for resource name availability // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // location - The location in which uniqueness will be verified. // parameters - Check name availability request @@ -97,7 +97,7 @@ func (client *BackupVaultsClient) checkNameAvailabilityCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -114,7 +114,7 @@ func (client *BackupVaultsClient) checkNameAvailabilityHandleResponse(resp *http // BeginCreateOrUpdate - Creates or updates a BackupVault resource belonging to a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // parameters - Request body for operation @@ -134,7 +134,7 @@ func (client *BackupVaultsClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Creates or updates a BackupVault resource belonging to a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupVaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters BackupVaultResource, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { @@ -170,7 +170,7 @@ func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -178,7 +178,7 @@ func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Contex // Delete - Deletes a BackupVault resource from the resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupVaultsClientDeleteOptions contains the optional parameters for the BackupVaultsClient.Delete method. @@ -217,7 +217,7 @@ func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +225,7 @@ func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resou // Get - Returns a resource belonging to a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method. @@ -264,7 +264,7 @@ func (client *BackupVaultsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *BackupVaultsClient) getHandleResponse(resp *http.Response) (Backup // NewGetInResourceGroupPager - Returns resource collection belonging to a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - BackupVaultsClientGetInResourceGroupOptions contains the optional parameters for the BackupVaultsClient.GetInResourceGroup // method. @@ -329,7 +329,7 @@ func (client *BackupVaultsClient) getInResourceGroupCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +346,7 @@ func (client *BackupVaultsClient) getInResourceGroupHandleResponse(resp *http.Re // NewGetInSubscriptionPager - Returns resource collection belonging to a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // options - BackupVaultsClientGetInSubscriptionOptions contains the optional parameters for the BackupVaultsClient.GetInSubscription // method. func (client *BackupVaultsClient) NewGetInSubscriptionPager(options *BackupVaultsClientGetInSubscriptionOptions) *runtime.Pager[BackupVaultsClientGetInSubscriptionResponse] { @@ -389,7 +389,7 @@ func (client *BackupVaultsClient) getInSubscriptionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -406,7 +406,7 @@ func (client *BackupVaultsClient) getInSubscriptionHandleResponse(resp *http.Res // BeginUpdate - Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // parameters - Request body for operation @@ -426,7 +426,7 @@ func (client *BackupVaultsClient) BeginUpdate(ctx context.Context, resourceGroup // Update - Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *BackupVaultsClient) update(ctx context.Context, resourceGroupName string, vaultName string, parameters PatchResourceRequestInput, options *BackupVaultsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { @@ -462,7 +462,7 @@ func (client *BackupVaultsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/client.go index ba789f400e98..6464cac93ce3 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/client.go @@ -56,7 +56,7 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // CheckFeatureSupport - Validates if a feature is supported // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // parameters - Feature support request object // options - ClientCheckFeatureSupportOptions contains the optional parameters for the Client.CheckFeatureSupport method. func (client *Client) CheckFeatureSupport(ctx context.Context, location string, parameters FeatureValidationRequestBaseClassification, options *ClientCheckFeatureSupportOptions) (ClientCheckFeatureSupportResponse, error) { @@ -90,7 +90,7 @@ func (client *Client) checkFeatureSupportCreateRequest(ctx context.Context, loca return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_constants.go b/sdk/resourcemanager/dataprotection/armdataprotection/constants.go similarity index 99% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_constants.go rename to sdk/resourcemanager/dataprotection/armdataprotection/constants.go index 3c3ac7bf0667..30dc38d6b4d8 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_constants.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/constants.go @@ -10,7 +10,7 @@ package armdataprotection const ( moduleName = "armdataprotection" - moduleVersion = "v1.0.0" + moduleVersion = "v1.1.0" ) type AbsoluteMarker string @@ -448,6 +448,7 @@ type StorageSettingTypes string const ( StorageSettingTypesGeoRedundant StorageSettingTypes = "GeoRedundant" StorageSettingTypesLocallyRedundant StorageSettingTypes = "LocallyRedundant" + StorageSettingTypesZoneRedundant StorageSettingTypes = "ZoneRedundant" ) // PossibleStorageSettingTypesValues returns the possible values for the StorageSettingTypes const type. @@ -455,6 +456,7 @@ func PossibleStorageSettingTypesValues() []StorageSettingTypes { return []StorageSettingTypes{ StorageSettingTypesGeoRedundant, StorageSettingTypesLocallyRedundant, + StorageSettingTypesZoneRedundant, } } diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobs_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/exportjobs_client.go similarity index 97% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobs_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/exportjobs_client.go index bc8fbaf601f6..e2fca8fa9505 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobs_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/exportjobs_client.go @@ -56,7 +56,7 @@ func NewExportJobsClient(subscriptionID string, credential azcore.TokenCredentia // BeginTrigger - Triggers export of jobs and returns an OperationID to track. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - ExportJobsClientBeginTriggerOptions contains the optional parameters for the ExportJobsClient.BeginTrigger method. @@ -76,7 +76,7 @@ func (client *ExportJobsClient) BeginTrigger(ctx context.Context, resourceGroupN // Trigger - Triggers export of jobs and returns an OperationID to track. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 func (client *ExportJobsClient) trigger(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*http.Response, error) { req, err := client.triggerCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { @@ -112,7 +112,7 @@ func (client *ExportJobsClient) triggerCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobsoperationresult_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/exportjobsoperationresult_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobsoperationresult_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/exportjobsoperationresult_client.go index 4ee9411b970a..9c694ff7efb3 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobsoperationresult_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/exportjobsoperationresult_client.go @@ -58,7 +58,7 @@ func NewExportJobsOperationResultClient(subscriptionID string, credential azcore // contains URL of a Blob and a SAS key to access the same. The blob contains exported // jobs in JSON serialized format. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // operationID - OperationID which represents the export job. @@ -103,7 +103,7 @@ func (client *ExportJobsOperationResultClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/go.mod b/sdk/resourcemanager/dataprotection/armdataprotection/go.mod index 483704c7eac6..d6fa8ef15ac7 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/go.mod +++ b/sdk/resourcemanager/dataprotection/armdataprotection/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armd go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/go.sum b/sdk/resourcemanager/dataprotection/armdataprotection/go.sum index ed5b814680ee..3f874a3bc5a6 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/go.sum +++ b/sdk/resourcemanager/dataprotection/armdataprotection/go.sum @@ -1,33 +1,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_jobs_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/jobs_client.go similarity index 97% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_jobs_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/jobs_client.go index c76171abb151..5ac81b0f4cbe 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_jobs_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/jobs_client.go @@ -56,7 +56,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // Get - Gets a job with id in a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // jobID - The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -100,7 +100,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -117,7 +117,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR // NewListPager - Returns list of jobs belonging to a backup vault // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - JobsClientListOptions contains the optional parameters for the JobsClient.List method. @@ -169,7 +169,7 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models.go b/sdk/resourcemanager/dataprotection/armdataprotection/models.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models.go rename to sdk/resourcemanager/dataprotection/armdataprotection/models.go index 9584d172e8e5..917b65c316ca 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/models.go @@ -626,16 +626,19 @@ type BackupInstanceResource struct { // BackupInstanceResource properties Properties *BackupInstance `json:"properties,omitempty"` - // READ-ONLY; Resource Id represents the complete path to the resource. + // Proxy Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Proxy Resource Id represents the complete path to the resource. ID *string `json:"id,omitempty" azure:"ro"` - // READ-ONLY; Resource name associated with the resource. + // READ-ONLY; Proxy Resource name associated with the resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + // READ-ONLY; Proxy Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… Type *string `json:"type,omitempty" azure:"ro"` } @@ -1277,6 +1280,23 @@ type DppIdentityDetails struct { TenantID *string `json:"tenantId,omitempty" azure:"ro"` } +type DppProxyResource struct { + // Proxy Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Proxy Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; Proxy Resource name associated with the resource. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; Proxy Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string `json:"type,omitempty" azure:"ro"` +} + // DppResource - Resource class type DppResource struct { // READ-ONLY; Resource Id represents the complete path to the resource. diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models_serde.go b/sdk/resourcemanager/dataprotection/armdataprotection/models_serde.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models_serde.go rename to sdk/resourcemanager/dataprotection/armdataprotection/models_serde.go index e2fa71122ccc..80cc74f33b5e 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models_serde.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/models_serde.go @@ -726,6 +726,18 @@ func (b *BackupInstance) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BackupInstanceResource. +func (b BackupInstanceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + // MarshalJSON implements the json.Marshaller interface for type BackupPolicy. func (b BackupPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -904,6 +916,17 @@ func (c *CustomCopyOption) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DppProxyResource. +func (d DppProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + // MarshalJSON implements the json.Marshaller interface for type DppTrackedResource. func (d DppTrackedResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationresult_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/operationresult_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationresult_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/operationresult_client.go index ae4b2f78577b..3613c0edc243 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationresult_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/operationresult_client.go @@ -57,7 +57,7 @@ func NewOperationResultClient(subscriptionID string, credential azcore.TokenCred // Get - Gets the operation result for a resource // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // options - OperationResultClientGetOptions contains the optional parameters for the OperationResultClient.Get method. func (client *OperationResultClient) Get(ctx context.Context, operationID string, location string, options *OperationResultClientGetOptions) (OperationResultClientGetResponse, error) { req, err := client.getCreateRequest(ctx, operationID, location, options) @@ -94,7 +94,7 @@ func (client *OperationResultClient) getCreateRequest(ctx context.Context, opera return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operations_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/operations_client.go similarity index 97% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operations_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/operations_client.go index 081476f84e0f..c1de7bec0763 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operations_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/operations_client.go @@ -50,7 +50,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Returns the list of available operations. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -88,7 +88,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatus_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/operationstatus_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatus_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/operationstatus_client.go index 322b0ea0af26..74de0def55c4 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatus_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/operationstatus_client.go @@ -56,7 +56,7 @@ func NewOperationStatusClient(subscriptionID string, credential azcore.TokenCred // Get - Gets the operation status for a resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // options - OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method. func (client *OperationStatusClient) Get(ctx context.Context, location string, operationID string, options *OperationStatusClientGetOptions) (OperationStatusClientGetResponse, error) { req, err := client.getCreateRequest(ctx, location, operationID, options) @@ -93,7 +93,7 @@ func (client *OperationStatusClient) getCreateRequest(ctx context.Context, locat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusbackupvaultcontext_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/operationstatusbackupvaultcontext_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusbackupvaultcontext_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/operationstatusbackupvaultcontext_client.go index ce13d838ec65..ffa8347b3eaa 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusbackupvaultcontext_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/operationstatusbackupvaultcontext_client.go @@ -56,7 +56,7 @@ func NewOperationStatusBackupVaultContextClient(subscriptionID string, credentia // Get - Gets the operation status for an operation over a BackupVault's context. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // options - OperationStatusBackupVaultContextClientGetOptions contains the optional parameters for the OperationStatusBackupVaultContextClient.Get @@ -100,7 +100,7 @@ func (client *OperationStatusBackupVaultContextClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusresourcegroupcontext_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/operationstatusresourcegroupcontext_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusresourcegroupcontext_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/operationstatusresourcegroupcontext_client.go index c8392587c7f1..23654f65f6f7 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusresourcegroupcontext_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/operationstatusresourcegroupcontext_client.go @@ -56,7 +56,7 @@ func NewOperationStatusResourceGroupContextClient(subscriptionID string, credent // Get - Gets the operation status for an operation over a ResourceGroup's context. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - OperationStatusResourceGroupContextClientGetOptions contains the optional parameters for the OperationStatusResourceGroupContextClient.Get // method. @@ -95,7 +95,7 @@ func (client *OperationStatusResourceGroupContextClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_polymorphic_helpers.go b/sdk/resourcemanager/dataprotection/armdataprotection/polymorphic_helpers.go similarity index 100% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_polymorphic_helpers.go rename to sdk/resourcemanager/dataprotection/armdataprotection/polymorphic_helpers.go diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_recoverypoints_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/recoverypoints_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_recoverypoints_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/recoverypoints_client.go index 1752537c5f65..ff6cbc97a1e9 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_recoverypoints_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/recoverypoints_client.go @@ -56,7 +56,7 @@ func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCrede // Get - Gets a Recovery Point using recoveryPointId for a Datasource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -104,7 +104,7 @@ func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -121,7 +121,7 @@ func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (Reco // NewListPager - Returns a list of Recovery Points for a DataSource in a vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -178,7 +178,7 @@ func (client *RecoveryPointsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_resourceguards_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/resourceguards_client.go similarity index 97% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_resourceguards_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/resourceguards_client.go index 27276fa5b7fb..815de7a48a91 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_resourceguards_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/resourceguards_client.go @@ -56,7 +56,7 @@ func NewResourceGuardsClient(subscriptionID string, credential azcore.TokenCrede // Delete - Deletes a ResourceGuard resource from the resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // resourceGuardsName - The name of ResourceGuard // options - ResourceGuardsClientDeleteOptions contains the optional parameters for the ResourceGuardsClient.Delete method. @@ -95,7 +95,7 @@ func (client *ResourceGuardsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -103,7 +103,7 @@ func (client *ResourceGuardsClient) deleteCreateRequest(ctx context.Context, res // Get - Returns a ResourceGuard belonging to a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // resourceGuardsName - The name of ResourceGuard // options - ResourceGuardsClientGetOptions contains the optional parameters for the ResourceGuardsClient.Get method. @@ -142,7 +142,7 @@ func (client *ResourceGuardsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -160,7 +160,7 @@ func (client *ResourceGuardsClient) getHandleResponse(resp *http.Response) (Reso // NewGetBackupSecurityPINRequestsObjectsPager - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetBackupSecurityPINRequestsObjects // method. @@ -212,7 +212,7 @@ func (client *ResourceGuardsClient) getBackupSecurityPINRequestsObjectsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -230,7 +230,7 @@ func (client *ResourceGuardsClient) getBackupSecurityPINRequestsObjectsHandleRes // GetDefaultBackupSecurityPINRequestsObject - Returns collection of operation request objects for a critical operation protected // by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions contains the optional parameters for the // ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject method. @@ -273,7 +273,7 @@ func (client *ResourceGuardsClient) getDefaultBackupSecurityPINRequestsObjectCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,7 +291,7 @@ func (client *ResourceGuardsClient) getDefaultBackupSecurityPINRequestsObjectHan // GetDefaultDeleteProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions contains the optional parameters for the // ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject method. @@ -334,7 +334,7 @@ func (client *ResourceGuardsClient) getDefaultDeleteProtectedItemRequestsObjectC return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -352,7 +352,7 @@ func (client *ResourceGuardsClient) getDefaultDeleteProtectedItemRequestsObjectH // GetDefaultDeleteResourceGuardProxyRequestsObject - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions contains the optional parameters // for the ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject method. @@ -395,7 +395,7 @@ func (client *ResourceGuardsClient) getDefaultDeleteResourceGuardProxyRequestsOb return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -413,7 +413,7 @@ func (client *ResourceGuardsClient) getDefaultDeleteResourceGuardProxyRequestsOb // GetDefaultDisableSoftDeleteRequestsObject - Returns collection of operation request objects for a critical operation protected // by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions contains the optional parameters for the // ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject method. @@ -456,7 +456,7 @@ func (client *ResourceGuardsClient) getDefaultDisableSoftDeleteRequestsObjectCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -474,7 +474,7 @@ func (client *ResourceGuardsClient) getDefaultDisableSoftDeleteRequestsObjectHan // GetDefaultUpdateProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions contains the optional parameters for the // ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject method. @@ -517,7 +517,7 @@ func (client *ResourceGuardsClient) getDefaultUpdateProtectedItemRequestsObjectC return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -535,7 +535,7 @@ func (client *ResourceGuardsClient) getDefaultUpdateProtectedItemRequestsObjectH // GetDefaultUpdateProtectionPolicyRequestsObject - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions contains the optional parameters for // the ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject method. @@ -578,7 +578,7 @@ func (client *ResourceGuardsClient) getDefaultUpdateProtectionPolicyRequestsObje return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -596,7 +596,7 @@ func (client *ResourceGuardsClient) getDefaultUpdateProtectionPolicyRequestsObje // NewGetDeleteProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects // method. @@ -648,7 +648,7 @@ func (client *ResourceGuardsClient) getDeleteProtectedItemRequestsObjectsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -666,7 +666,7 @@ func (client *ResourceGuardsClient) getDeleteProtectedItemRequestsObjectsHandleR // NewGetDeleteResourceGuardProxyRequestsObjectsPager - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions contains the optional parameters for the // ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects method. @@ -718,7 +718,7 @@ func (client *ResourceGuardsClient) getDeleteResourceGuardProxyRequestsObjectsCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -736,7 +736,7 @@ func (client *ResourceGuardsClient) getDeleteResourceGuardProxyRequestsObjectsHa // NewGetDisableSoftDeleteRequestsObjectsPager - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects // method. @@ -788,7 +788,7 @@ func (client *ResourceGuardsClient) getDisableSoftDeleteRequestsObjectsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -805,7 +805,7 @@ func (client *ResourceGuardsClient) getDisableSoftDeleteRequestsObjectsHandleRes // NewGetResourcesInResourceGroupPager - Returns ResourceGuards collection belonging to a ResourceGroup. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetResourcesInResourceGroupOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInResourceGroup // method. @@ -853,7 +853,7 @@ func (client *ResourceGuardsClient) getResourcesInResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -870,7 +870,7 @@ func (client *ResourceGuardsClient) getResourcesInResourceGroupHandleResponse(re // NewGetResourcesInSubscriptionPager - Returns ResourceGuards collection belonging to a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // options - ResourceGuardsClientGetResourcesInSubscriptionOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInSubscription // method. func (client *ResourceGuardsClient) NewGetResourcesInSubscriptionPager(options *ResourceGuardsClientGetResourcesInSubscriptionOptions) *runtime.Pager[ResourceGuardsClientGetResourcesInSubscriptionResponse] { @@ -913,7 +913,7 @@ func (client *ResourceGuardsClient) getResourcesInSubscriptionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -931,7 +931,7 @@ func (client *ResourceGuardsClient) getResourcesInSubscriptionHandleResponse(res // NewGetUpdateProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects // method. @@ -983,7 +983,7 @@ func (client *ResourceGuardsClient) getUpdateProtectedItemRequestsObjectsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1001,7 +1001,7 @@ func (client *ResourceGuardsClient) getUpdateProtectedItemRequestsObjectsHandleR // NewGetUpdateProtectionPolicyRequestsObjectsPager - Returns collection of operation request objects for a critical operation // protected by the given ResourceGuard resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // options - ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions contains the optional parameters for the // ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects method. @@ -1053,7 +1053,7 @@ func (client *ResourceGuardsClient) getUpdateProtectionPolicyRequestsObjectsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1070,7 +1070,7 @@ func (client *ResourceGuardsClient) getUpdateProtectionPolicyRequestsObjectsHand // Patch - Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // resourceGuardsName - The name of ResourceGuard // parameters - Request body for operation @@ -1110,7 +1110,7 @@ func (client *ResourceGuardsClient) patchCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -1127,7 +1127,7 @@ func (client *ResourceGuardsClient) patchHandleResponse(resp *http.Response) (Re // Put - Creates or updates a ResourceGuard resource belonging to a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // resourceGuardsName - The name of ResourceGuard // parameters - Request body for operation @@ -1167,7 +1167,7 @@ func (client *ResourceGuardsClient) putCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_response_types.go b/sdk/resourcemanager/dataprotection/armdataprotection/response_types.go similarity index 100% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_response_types.go rename to sdk/resourcemanager/dataprotection/armdataprotection/response_types.go diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_restorabletimeranges_client.go b/sdk/resourcemanager/dataprotection/armdataprotection/restorabletimeranges_client.go similarity index 98% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_restorabletimeranges_client.go rename to sdk/resourcemanager/dataprotection/armdataprotection/restorabletimeranges_client.go index 571aff923406..d4f35cab174d 100644 --- a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_restorabletimeranges_client.go +++ b/sdk/resourcemanager/dataprotection/armdataprotection/restorabletimeranges_client.go @@ -56,7 +56,7 @@ func NewRestorableTimeRangesClient(subscriptionID string, credential azcore.Toke // Find - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 +// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group where the backup vault is present. // vaultName - The name of the backup vault. // backupInstanceName - The name of the backup instance @@ -102,7 +102,7 @@ func (client *RestorableTimeRangesClient) findCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") + reqQP.Set("api-version", "2022-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_time_rfc3339.go b/sdk/resourcemanager/dataprotection/armdataprotection/time_rfc3339.go similarity index 100% rename from sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_time_rfc3339.go rename to sdk/resourcemanager/dataprotection/armdataprotection/time_rfc3339.go diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupinstances_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupinstances_client_test.go deleted file mode 100644 index a828da77c85c..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupinstances_client_test.go +++ /dev/null @@ -1,567 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ListBackupInstances.json -func ExampleBackupInstancesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("000pikumar", - "PratikPrivatePreviewVault1", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/GetBackupInstance.json -func ExampleBackupInstancesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/PutBackupInstance.json -func ExampleBackupInstancesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - armdataprotection.BackupInstanceResource{ - Properties: &armdataprotection.BackupInstance{ - DataSourceInfo: &armdataprotection.Datasource{ - DatasourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ObjectType: to.Ptr("Datasource"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("testdb"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ResourceURI: to.Ptr(""), - }, - DataSourceSetInfo: &armdataprotection.DatasourceSet{ - DatasourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ObjectType: to.Ptr("DatasourceSet"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("viveksipgtest"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers"), - ResourceURI: to.Ptr(""), - }, - DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{ - ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"), - SecretStoreResource: &armdataprotection.SecretStoreResource{ - SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault), - URI: to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"), - }, - }, - FriendlyName: to.Ptr("harshitbi2"), - ObjectType: to.Ptr("BackupInstance"), - PolicyInfo: &armdataprotection.PolicyInfo{ - PolicyID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1"), - PolicyParameters: &armdataprotection.PolicyParameters{ - DataStoreParametersList: []armdataprotection.DataStoreParametersClassification{ - &armdataprotection.AzureOperationalStoreParameters{ - DataStoreType: to.Ptr(armdataprotection.DataStoreTypesOperationalStore), - ObjectType: to.Ptr("AzureOperationalStoreParameters"), - ResourceGroupID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest"), - }}, - }, - }, - ValidationType: to.Ptr(armdataprotection.ValidationTypeShallowValidation), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/DeleteBackupInstance.json -func ExampleBackupInstancesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/TriggerBackup.json -func ExampleBackupInstancesClient_BeginAdhocBackup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginAdhocBackup(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - armdataprotection.TriggerBackupRequest{ - BackupRuleOptions: &armdataprotection.AdHocBackupRuleOptions{ - RuleName: to.Ptr("BackupWeekly"), - TriggerOption: &armdataprotection.AdhocBackupTriggerOption{ - RetentionTagOverride: to.Ptr("yearly"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ValidateForBackup.json -func ExampleBackupInstancesClient_BeginValidateForBackup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidateForBackup(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - armdataprotection.ValidateForBackupRequest{ - BackupInstance: &armdataprotection.BackupInstance{ - DataSourceInfo: &armdataprotection.Datasource{ - DatasourceType: to.Ptr("OssDB"), - ObjectType: to.Ptr("Datasource"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("testdb"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ResourceURI: to.Ptr(""), - }, - DataSourceSetInfo: &armdataprotection.DatasourceSet{ - DatasourceType: to.Ptr("OssDB"), - ObjectType: to.Ptr("DatasourceSet"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("viveksipgtest"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers"), - ResourceURI: to.Ptr(""), - }, - DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{ - ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"), - SecretStoreResource: &armdataprotection.SecretStoreResource{ - SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault), - URI: to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"), - }, - }, - FriendlyName: to.Ptr("harshitbi2"), - ObjectType: to.Ptr("BackupInstance"), - PolicyInfo: &armdataprotection.PolicyInfo{ - PolicyID: to.Ptr("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json -func ExampleBackupInstancesClient_GetBackupInstanceOperationResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetBackupInstanceOperationResult(ctx, - "SampleResourceGroup", - "swaggerExample", - "testInstance1", - "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/TriggerRehydrate.json -func ExampleBackupInstancesClient_BeginTriggerRehydrate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginTriggerRehydrate(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - armdataprotection.AzureBackupRehydrationRequest{ - RecoveryPointID: to.Ptr("hardcodedRP"), - RehydrationPriority: to.Ptr(armdataprotection.RehydrationPriorityHigh), - RehydrationRetentionDuration: to.Ptr("7D"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/TriggerRestore.json -func ExampleBackupInstancesClient_BeginTriggerRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginTriggerRestore(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - &armdataprotection.AzureBackupRecoveryPointBasedRestoreRequest{ - ObjectType: to.Ptr("AzureBackupRecoveryPointBasedRestoreRequest"), - RestoreTargetInfo: &armdataprotection.RestoreTargetInfo{ - ObjectType: to.Ptr("RestoreTargetInfo"), - RecoveryOption: to.Ptr(armdataprotection.RecoveryOptionFailIfExists), - RestoreLocation: to.Ptr("southeastasia"), - DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{ - ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"), - SecretStoreResource: &armdataprotection.SecretStoreResource{ - SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault), - URI: to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"), - }, - }, - DatasourceInfo: &armdataprotection.Datasource{ - DatasourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ObjectType: to.Ptr("Datasource"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("targetdb"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ResourceURI: to.Ptr(""), - }, - DatasourceSetInfo: &armdataprotection.DatasourceSet{ - DatasourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ObjectType: to.Ptr("DatasourceSet"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("viveksipgtest"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers"), - ResourceURI: to.Ptr(""), - }, - }, - SourceDataStoreType: to.Ptr(armdataprotection.SourceDataStoreTypeVaultStore), - SourceResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"), - RecoveryPointID: to.Ptr("hardcodedRP"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ResumeBackups.json -func ExampleBackupInstancesClient_BeginResumeBackups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResumeBackups(ctx, - "testrg", - "testvault", - "testbi", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ResumeProtection.json -func ExampleBackupInstancesClient_BeginResumeProtection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResumeProtection(ctx, - "testrg", - "testvault", - "testbi", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/StopProtection.json -func ExampleBackupInstancesClient_BeginStopProtection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStopProtection(ctx, - "testrg", - "testvault", - "testbi", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/SuspendBackups.json -func ExampleBackupInstancesClient_BeginSuspendBackups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSuspendBackups(ctx, - "testrg", - "testvault", - "testbi", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/SyncBackupInstance.json -func ExampleBackupInstancesClient_BeginSyncBackupInstance() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSyncBackupInstance(ctx, - "testrg", - "testvault", - "testbi", - armdataprotection.SyncBackupInstanceRequest{ - SyncType: to.Ptr(armdataprotection.SyncTypeDefault), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ValidateRestore.json -func ExampleBackupInstancesClient_BeginValidateForRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupInstancesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginValidateForRestore(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - armdataprotection.ValidateRestoreRequestObject{ - RestoreRequestObject: &armdataprotection.AzureBackupRecoveryPointBasedRestoreRequest{ - ObjectType: to.Ptr("AzureBackupRecoveryPointBasedRestoreRequest"), - RestoreTargetInfo: &armdataprotection.RestoreTargetInfo{ - ObjectType: to.Ptr("RestoreTargetInfo"), - RecoveryOption: to.Ptr(armdataprotection.RecoveryOptionFailIfExists), - RestoreLocation: to.Ptr("southeastasia"), - DatasourceAuthCredentials: &armdataprotection.SecretStoreBasedAuthCredentials{ - ObjectType: to.Ptr("SecretStoreBasedAuthCredentials"), - SecretStoreResource: &armdataprotection.SecretStoreResource{ - SecretStoreType: to.Ptr(armdataprotection.SecretStoreTypeAzureKeyVault), - URI: to.Ptr("https://samplevault.vault.azure.net/secrets/credentials"), - }, - }, - DatasourceInfo: &armdataprotection.Datasource{ - DatasourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ObjectType: to.Ptr("Datasource"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("targetdb"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ResourceURI: to.Ptr(""), - }, - DatasourceSetInfo: &armdataprotection.DatasourceSet{ - DatasourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers/databases"), - ObjectType: to.Ptr("DatasourceSet"), - ResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest"), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr("viveksipgtest"), - ResourceType: to.Ptr("Microsoft.DBforPostgreSQL/servers"), - ResourceURI: to.Ptr(""), - }, - }, - SourceDataStoreType: to.Ptr(armdataprotection.SourceDataStoreTypeVaultStore), - SourceResourceID: to.Ptr("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb"), - RecoveryPointID: to.Ptr("hardcodedRP"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backuppolicies_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backuppolicies_client_test.go deleted file mode 100644 index 3cdcf01d9068..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backuppolicies_client_test.go +++ /dev/null @@ -1,195 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/ListBackupPolicy.json -func ExampleBackupPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("000pikumar", - "PrivatePreviewVault", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/GetBackupPolicy.json -func ExampleBackupPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "000pikumar", - "PrivatePreviewVault", - "OSSDBPolicy", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json -func ExampleBackupPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "000pikumar", - "PrivatePreviewVault", - "OSSDBPolicy", - armdataprotection.BaseBackupPolicyResource{ - Properties: &armdataprotection.BackupPolicy{ - DatasourceTypes: []*string{ - to.Ptr("OssDB")}, - ObjectType: to.Ptr("BackupPolicy"), - PolicyRules: []armdataprotection.BasePolicyRuleClassification{ - &armdataprotection.AzureBackupRule{ - Name: to.Ptr("BackupWeekly"), - ObjectType: to.Ptr("AzureBackupRule"), - BackupParameters: &armdataprotection.AzureBackupParams{ - ObjectType: to.Ptr("AzureBackupParams"), - BackupType: to.Ptr("Full"), - }, - DataStore: &armdataprotection.DataStoreInfoBase{ - DataStoreType: to.Ptr(armdataprotection.DataStoreTypesVaultStore), - ObjectType: to.Ptr("DataStoreInfoBase"), - }, - Trigger: &armdataprotection.ScheduleBasedTriggerContext{ - ObjectType: to.Ptr("ScheduleBasedTriggerContext"), - Schedule: &armdataprotection.BackupSchedule{ - RepeatingTimeIntervals: []*string{ - to.Ptr("R/2019-11-20T08:00:00-08:00/P1W")}, - }, - TaggingCriteria: []*armdataprotection.TaggingCriteria{ - { - IsDefault: to.Ptr(true), - TagInfo: &armdataprotection.RetentionTag{ - TagName: to.Ptr("Default"), - }, - TaggingPriority: to.Ptr[int64](99), - }, - { - Criteria: []armdataprotection.BackupCriteriaClassification{ - &armdataprotection.ScheduleBasedBackupCriteria{ - ObjectType: to.Ptr("ScheduleBasedBackupCriteria"), - DaysOfTheWeek: []*armdataprotection.DayOfWeek{ - to.Ptr(armdataprotection.DayOfWeekSunday)}, - ScheduleTimes: []*time.Time{ - to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-03-01T13:00:00Z"); return t }())}, - }}, - IsDefault: to.Ptr(false), - TagInfo: &armdataprotection.RetentionTag{ - TagName: to.Ptr("Weekly"), - }, - TaggingPriority: to.Ptr[int64](20), - }}, - }, - }, - &armdataprotection.AzureRetentionRule{ - Name: to.Ptr("Default"), - ObjectType: to.Ptr("AzureRetentionRule"), - IsDefault: to.Ptr(true), - Lifecycles: []*armdataprotection.SourceLifeCycle{ - { - DeleteAfter: &armdataprotection.AbsoluteDeleteOption{ - Duration: to.Ptr("P1W"), - ObjectType: to.Ptr("AbsoluteDeleteOption"), - }, - SourceDataStore: &armdataprotection.DataStoreInfoBase{ - DataStoreType: to.Ptr(armdataprotection.DataStoreTypesVaultStore), - ObjectType: to.Ptr("DataStoreInfoBase"), - }, - }}, - }, - &armdataprotection.AzureRetentionRule{ - Name: to.Ptr("Weekly"), - ObjectType: to.Ptr("AzureRetentionRule"), - IsDefault: to.Ptr(false), - Lifecycles: []*armdataprotection.SourceLifeCycle{ - { - DeleteAfter: &armdataprotection.AbsoluteDeleteOption{ - Duration: to.Ptr("P12W"), - ObjectType: to.Ptr("AbsoluteDeleteOption"), - }, - SourceDataStore: &armdataprotection.DataStoreInfoBase{ - DataStoreType: to.Ptr(armdataprotection.DataStoreTypesVaultStore), - ObjectType: to.Ptr("DataStoreInfoBase"), - }, - }}, - }}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/PolicyCRUD/DeleteBackupPolicy.json -func ExampleBackupPoliciesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupPoliciesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "000pikumar", - "PrivatePreviewVault", - "OSSDBPolicy", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaultoperationresults_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaultoperationresults_client_test.go deleted file mode 100644 index 983dc270ed18..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaultoperationresults_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetOperationResultPatch.json -func ExampleBackupVaultOperationResultsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultOperationResultsClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "SampleResourceGroup", - "swaggerExample", - "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaults_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaults_client_test.go deleted file mode 100644 index 987b5a05f62f..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_backupvaults_client_test.go +++ /dev/null @@ -1,220 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json -func ExampleBackupVaultsClient_NewGetInSubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetInSubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json -func ExampleBackupVaultsClient_NewGetInResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetInResourceGroupPager("SampleResourceGroup", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/GetBackupVault.json -func ExampleBackupVaultsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "SampleResourceGroup", - "swaggerExample", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/PutBackupVault.json -func ExampleBackupVaultsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "SampleResourceGroup", - "swaggerExample", - armdataprotection.BackupVaultResource{ - Identity: &armdataprotection.DppIdentityDetails{ - Type: to.Ptr("None"), - }, - Location: to.Ptr("WestUS"), - Tags: map[string]*string{ - "key1": to.Ptr("val1"), - }, - Properties: &armdataprotection.BackupVault{ - MonitoringSettings: &armdataprotection.MonitoringSettings{ - AzureMonitorAlertSettings: &armdataprotection.AzureMonitorAlertSettings{ - AlertsForAllJobFailures: to.Ptr(armdataprotection.AlertsStateEnabled), - }, - }, - StorageSettings: []*armdataprotection.StorageSetting{ - { - Type: to.Ptr(armdataprotection.StorageSettingTypesLocallyRedundant), - DatastoreType: to.Ptr(armdataprotection.StorageSettingStoreTypesVaultStore), - }}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/DeleteBackupVault.json -func ExampleBackupVaultsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "SampleResourceGroup", - "swaggerExample", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/PatchBackupVault.json -func ExampleBackupVaultsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "SampleResourceGroup", - "swaggerExample", - armdataprotection.PatchResourceRequestInput{ - Properties: &armdataprotection.PatchBackupVaultInput{ - MonitoringSettings: &armdataprotection.MonitoringSettings{ - AzureMonitorAlertSettings: &armdataprotection.AzureMonitorAlertSettings{ - AlertsForAllJobFailures: to.Ptr(armdataprotection.AlertsStateEnabled), - }, - }, - }, - Tags: map[string]*string{ - "newKey": to.Ptr("newVal"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json -func ExampleBackupVaultsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewBackupVaultsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - "SampleResourceGroup", - "westus", - armdataprotection.CheckNameAvailabilityRequest{ - Name: to.Ptr("swaggerExample"), - Type: to.Ptr("Microsoft.DataProtection/BackupVaults"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotection_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotection_client_test.go deleted file mode 100644 index 3e171928b211..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotection_client_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/CheckfeatureSupport.json -func ExampleClient_CheckFeatureSupport() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckFeatureSupport(ctx, - "WestUS", - &armdataprotection.FeatureValidationRequest{ - ObjectType: to.Ptr("FeatureValidationRequest"), - FeatureType: to.Ptr(armdataprotection.FeatureTypeDataSourceType), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotectionoperations_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotectionoperations_client_test.go deleted file mode 100644 index ac7f6ad313a5..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_dataprotectionoperations_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/Operations/List.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobs_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobs_client_test.go deleted file mode 100644 index 2410b3dd4242..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobs_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/TriggerExportJobs.json -func ExampleExportJobsClient_BeginTrigger() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewExportJobsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginTrigger(ctx, - "SwaggerTestRg", - "NetSDKTestRsVault", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobsoperationresult_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobsoperationresult_client_test.go deleted file mode 100644 index 93d5b27f899d..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_exportjobsoperationresult_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/GetExportJobsOperationResult.json -func ExampleExportJobsOperationResultClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewExportJobsOperationResultClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "SwaggerTestRg", - "NetSDKTestRsVault", - "00000000-0000-0000-0000-000000000000", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_jobs_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_jobs_client_test.go deleted file mode 100644 index 49ab2a2f354d..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_jobs_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/ListJobs.json -func ExampleJobsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewJobsClient("62b829ee-7936-40c9-a1c9-47a93f9f3965", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("BugBash1", - "BugBashVaultForCCYv11", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/JobCRUD/GetJob.json -func ExampleJobsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewJobsClient("62b829ee-7936-40c9-a1c9-47a93f9f3965", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "BugBash1", - "BugBashVaultForCCYv11", - "3c60cb49-63e8-4b21-b9bd-26277b3fdfae", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationresult_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationresult_client_test.go deleted file mode 100644 index 0097c028d54d..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationresult_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationResult.json -func ExampleOperationResultClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewOperationResultClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - "WestUS", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatus_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatus_client_test.go deleted file mode 100644 index 5f8ad66a4dda..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatus_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationStatus.json -func ExampleOperationStatusClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewOperationStatusClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "WestUS", - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusbackupvaultcontext_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusbackupvaultcontext_client_test.go deleted file mode 100644 index a3a26fe1f16d..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusbackupvaultcontext_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationStatusVaultContext.json -func ExampleOperationStatusBackupVaultContextClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewOperationStatusBackupVaultContextClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "SampleResourceGroup", - "swaggerExample", - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusresourcegroupcontext_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusresourcegroupcontext_client_test.go deleted file mode 100644 index 1ff5d9125e85..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_operationstatusresourcegroupcontext_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/GetOperationStatusRGContext.json -func ExampleOperationStatusResourceGroupContextClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewOperationStatusResourceGroupContextClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "SampleResourceGroup", - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_recoverypoints_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_recoverypoints_client_test.go deleted file mode 100644 index fd377585ed40..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_recoverypoints_client_test.go +++ /dev/null @@ -1,70 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/ListRecoveryPoints.json -func ExampleRecoveryPointsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewRecoveryPointsClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - &armdataprotection.RecoveryPointsClientListOptions{Filter: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/GetRecoveryPoint.json -func ExampleRecoveryPointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewRecoveryPointsClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_resourceguards_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_resourceguards_client_test.go deleted file mode 100644 index 87088c4fe1cb..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_resourceguards_client_test.go +++ /dev/null @@ -1,458 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json -func ExampleResourceGuardsClient_NewGetResourcesInSubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetResourcesInSubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json -func ExampleResourceGuardsClient_NewGetResourcesInResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetResourcesInResourceGroupPager("SampleResourceGroup", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/PutResourceGuard.json -func ExampleResourceGuardsClient_Put() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Put(ctx, - "SampleResourceGroup", - "swaggerExample", - armdataprotection.ResourceGuardResource{ - Location: to.Ptr("WestUS"), - Tags: map[string]*string{ - "key1": to.Ptr("val1"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetResourceGuard.json -func ExampleResourceGuardsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "SampleResourceGroup", - "swaggerExample", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json -func ExampleResourceGuardsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "SampleResourceGroup", - "swaggerExample", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/PatchResourceGuard.json -func ExampleResourceGuardsClient_Patch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Patch(ctx, - "SampleResourceGroup", - "swaggerExample", - armdataprotection.PatchResourceRequestInput{ - Tags: map[string]*string{ - "newKey": to.Ptr("newVal"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json -func ExampleResourceGuardsClient_NewGetDisableSoftDeleteRequestsObjectsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetDisableSoftDeleteRequestsObjectsPager("SampleResourceGroup", - "swaggerExample", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json -func ExampleResourceGuardsClient_NewGetDeleteResourceGuardProxyRequestsObjectsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetDeleteResourceGuardProxyRequestsObjectsPager("SampleResourceGroup", - "swaggerExample", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json -func ExampleResourceGuardsClient_NewGetBackupSecurityPINRequestsObjectsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetBackupSecurityPINRequestsObjectsPager("SampleResourceGroup", - "swaggerExample", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json -func ExampleResourceGuardsClient_NewGetDeleteProtectedItemRequestsObjectsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetDeleteProtectedItemRequestsObjectsPager("SampleResourceGroup", - "swaggerExample", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json -func ExampleResourceGuardsClient_NewGetUpdateProtectionPolicyRequestsObjectsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetUpdateProtectionPolicyRequestsObjectsPager("SampleResourceGroup", - "swaggerExample", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json -func ExampleResourceGuardsClient_NewGetUpdateProtectedItemRequestsObjectsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetUpdateProtectedItemRequestsObjectsPager("SampleResourceGroup", - "swaggerExample", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json -func ExampleResourceGuardsClient_GetDefaultDisableSoftDeleteRequestsObject() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDefaultDisableSoftDeleteRequestsObject(ctx, - "SampleResourceGroup", - "swaggerExample", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json -func ExampleResourceGuardsClient_GetDefaultDeleteResourceGuardProxyRequestsObject() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDefaultDeleteResourceGuardProxyRequestsObject(ctx, - "SampleResourceGroup", - "swaggerExample", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json -func ExampleResourceGuardsClient_GetDefaultBackupSecurityPINRequestsObject() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDefaultBackupSecurityPINRequestsObject(ctx, - "SampleResourceGroup", - "swaggerExample", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json -func ExampleResourceGuardsClient_GetDefaultDeleteProtectedItemRequestsObject() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDefaultDeleteProtectedItemRequestsObject(ctx, - "SampleResourceGroup", - "swaggerExample", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json -func ExampleResourceGuardsClient_GetDefaultUpdateProtectionPolicyRequestsObject() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDefaultUpdateProtectionPolicyRequestsObject(ctx, - "SampleResourceGroup", - "swaggerExample", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json -func ExampleResourceGuardsClient_GetDefaultUpdateProtectedItemRequestsObject() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewResourceGuardsClient("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetDefaultUpdateProtectedItemRequestsObject(ctx, - "SampleResourceGroup", - "swaggerExample", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_restorabletimeranges_client_test.go b/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_restorabletimeranges_client_test.go deleted file mode 100644 index e63a9cad72d1..000000000000 --- a/sdk/resourcemanager/dataprotection/armdataprotection/ze_generated_example_restorabletimeranges_client_test.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-04-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json -func ExampleRestorableTimeRangesClient_Find() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armdataprotection.NewRestorableTimeRangesClient("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Find(ctx, - "Blob-Backup", - "ZBlobBackupVaultBVTD3", - "zblobbackuptestsa58", - armdataprotection.AzureBackupFindRestorableTimeRangesRequest{ - EndTime: to.Ptr("2021-02-24T00:35:17.6829685Z"), - SourceDataStoreType: to.Ptr(armdataprotection.RestoreSourceDataStoreTypeOperationalStore), - StartTime: to.Ptr("2020-10-17T23:28:17.6829685Z"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -}