diff --git a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/Backup.cs b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/Backup.cs index bbf8eace0bcc..abf804181b63 100644 --- a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/Backup.cs +++ b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/Backup.cs @@ -40,7 +40,6 @@ public Backup() /// Location of the resource. /// List of key value pairs. /// Version of the backup data. - /// Unique GUID for the backup. /// Backup status for each role. /// Current status of the backup. Possible values /// include: 'Creating', 'Queued', 'Running', 'Deleted', 'Failed', @@ -54,11 +53,10 @@ public Backup() /// OEM version. /// The thumbprint of the /// certificate used to encrypt the backup encryption key. - public Backup(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string backupDataVersion = default(string), string backupId = default(string), IList roleStatus = default(IList), OperationStatus? status = default(OperationStatus?), System.DateTime? createdDateTime = default(System.DateTime?), string timeTakenToCreate = default(string), string deploymentID = default(string), string stampVersion = default(string), string oemVersion = default(string), string encryptionCertThumbprint = default(string)) + public Backup(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string backupDataVersion = default(string), IList roleStatus = default(IList), OperationStatus? status = default(OperationStatus?), System.DateTime? createdDateTime = default(System.DateTime?), string timeTakenToCreate = default(string), string deploymentID = default(string), string stampVersion = default(string), string oemVersion = default(string), string encryptionCertThumbprint = default(string)) : base(id, name, type, location, tags) { BackupDataVersion = backupDataVersion; - BackupId = backupId; RoleStatus = roleStatus; Status = status; CreatedDateTime = createdDateTime; @@ -81,12 +79,6 @@ public Backup() [JsonProperty(PropertyName = "properties.backupInfo.backupDataVersion")] public string BackupDataVersion { get; private set; } - /// - /// Gets unique GUID for the backup. - /// - [JsonProperty(PropertyName = "properties.backupInfo.backupId")] - public string BackupId { get; private set; } - /// /// Gets backup status for each role. /// diff --git a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/RestoreOptions.cs b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/RestoreOptions.cs index 30a13bc4cad7..1cb72b5754c1 100644 --- a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/RestoreOptions.cs +++ b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/Models/RestoreOptions.cs @@ -29,13 +29,16 @@ public RestoreOptions() /// /// Initializes a new instance of the RestoreOptions class. /// + /// The Azure Stack role name for restore, set + /// it to empty for all infrastructure role /// The certificate file raw data in /// Base64 string. This should be the .pfx file with the private /// key. /// The password for the /// decryption certificate. - public RestoreOptions(string decryptionCertBase64 = default(string), string decryptionCertPassword = default(string)) + public RestoreOptions(string roleName = default(string), string decryptionCertBase64 = default(string), string decryptionCertPassword = default(string)) { + RoleName = roleName; DecryptionCertBase64 = decryptionCertBase64; DecryptionCertPassword = decryptionCertPassword; CustomInit(); @@ -46,6 +49,13 @@ public RestoreOptions() /// partial void CustomInit(); + /// + /// Gets or sets the Azure Stack role name for restore, set it to empty + /// for all infrastructure role + /// + [JsonProperty(PropertyName = "roleName")] + public string RoleName { get; set; } + /// /// Gets or sets the certificate file raw data in Base64 string. This /// should be the .pfx file with the private key. diff --git a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/SdkInfo_BackupAdminClient.cs b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/SdkInfo_BackupAdminClient.cs index 87190a35f263..1f73d8fff10d 100644 --- a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/SdkInfo_BackupAdminClient.cs +++ b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Generated/SdkInfo_BackupAdminClient.cs @@ -25,16 +25,5 @@ public static IEnumerable> ApiInfo_BackupAdminClie }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azsadmin/resource-manager/backup/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-09-01 --csharp-sdks-folder=D:\\Github\\daozha\\azure-sdk-for-net\\src\\AzureStack\\Admin\\BackupAdmin\\Backup.Admin"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "e9b8241965b77cbb89ea3a0661d25753e1027eec"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Microsoft.AzureStack.Management.Backup.Admin.csproj b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Microsoft.AzureStack.Management.Backup.Admin.csproj index c8123329b09a..194dbcc27a24 100644 --- a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Microsoft.AzureStack.Management.Backup.Admin.csproj +++ b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Microsoft.AzureStack.Management.Backup.Admin.csproj @@ -7,7 +7,7 @@ Microsoft.AzureStack.Management.Backup.Admin Provides developers with libraries for the Backup admin under AzureStack to manage backups. - 0.3.0-preview + 0.3.1-preview Microsoft.AzureStack.Management.Backup.Admin Microsoft Azure Stack;Backup;REST HTTP client;azureostackfficial;netcore451511 diff --git a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Properties/AssemblyInfo.cs b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Properties/AssemblyInfo.cs index cfb3a9245ab9..2a083342745b 100644 --- a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Properties/AssemblyInfo.cs +++ b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/src/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguage("en")] -[assembly: AssemblyVersion("0.3.0.0")] -[assembly: AssemblyFileVersion("0.3.0.0")] +[assembly: AssemblyVersion("0.3.1.0")] +[assembly: AssemblyFileVersion("0.3.1.0")] diff --git a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/SessionRecords/BackupAdminClient/TestRestoreBackup.json b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/SessionRecords/BackupAdminClient/TestRestoreBackup.json index 49a5328e62ff..aaa6fddaa5d4 100644 --- a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/SessionRecords/BackupAdminClient/TestRestoreBackup.json +++ b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/SessionRecords/BackupAdminClient/TestRestoreBackup.json @@ -1407,7 +1407,7 @@ "RequestUri": "/subscriptions/0004fee6-aec7-40be-8b4e-197a7eca2e0f/resourcegroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/ca6faa24-c5b4-47f4-84d1-dcb250b82368/restore?api-version=2018-09-01", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDAwNGZlZTYtYWVjNy00MGJlLThiNGUtMTk3YTdlY2EyZTBmL3Jlc291cmNlZ3JvdXBzL1N5c3RlbS5sb2NhbC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhY2t1cC5BZG1pbi9iYWNrdXBMb2NhdGlvbnMvbG9jYWwvYmFja3Vwcy9jYTZmYWEyNC1jNWI0LTQ3ZjQtODRkMS1kY2IyNTBiODIzNjgvcmVzdG9yZT9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", "RequestMethod": "POST", - "RequestBody": "{\r\n \"decryptionCertBase64\": \"decryptionCert\",\r\n \"decryptionCertPassword\": \"decryptionCertPassword\"\r\n}", + "RequestBody": "{\r\n \"roleName\": \"-\",\r\n \"decryptionCertBase64\": \"decryptionCert\",\r\n \"decryptionCertPassword\": \"decryptionCertPassword\"\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ "52966e7b-616e-4838-83a6-fafc94febd64" diff --git a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/src/BackupTests.cs b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/src/BackupTests.cs index ae60ab7fa52a..50348ce67d67 100644 --- a/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/src/BackupTests.cs +++ b/sdk/azurestack/Microsoft.AzureStack.Management.Backup.Admin/tests/src/BackupTests.cs @@ -71,6 +71,7 @@ public void TestRestoreBackup() var backup = client.BackupLocations.CreateBackup(ResourceGroupName, backupLocation); var restoreOperations = new RestoreOptions { + RoleName = "-", DecryptionCertBase64 = "decryptionCert", DecryptionCertPassword = "decryptionCertPassword" };