Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public Backup()
/// <param name="location">Location of the resource.</param>
/// <param name="tags">List of key value pairs.</param>
/// <param name="backupDataVersion">Version of the backup data.</param>
/// <param name="backupId">Unique GUID for the backup.</param>
/// <param name="roleStatus">Backup status for each role.</param>
/// <param name="status">Current status of the backup. Possible values
/// include: 'Creating', 'Queued', 'Running', 'Deleted', 'Failed',
Expand All @@ -54,11 +53,10 @@ public Backup()
/// <param name="oemVersion">OEM version.</param>
/// <param name="encryptionCertThumbprint">The thumbprint of the
/// certificate used to encrypt the backup encryption key.</param>
public Backup(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string backupDataVersion = default(string), string backupId = default(string), IList<RoleOperationStatus> roleStatus = default(IList<RoleOperationStatus>), 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<string, string> tags = default(IDictionary<string, string>), string backupDataVersion = default(string), IList<RoleOperationStatus> roleStatus = default(IList<RoleOperationStatus>), 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;
Expand All @@ -81,12 +79,6 @@ public Backup()
[JsonProperty(PropertyName = "properties.backupInfo.backupDataVersion")]
public string BackupDataVersion { get; private set; }

/// <summary>
/// Gets unique GUID for the backup.
/// </summary>
[JsonProperty(PropertyName = "properties.backupInfo.backupId")]
public string BackupId { get; private set; }

/// <summary>
/// Gets backup status for each role.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ public RestoreOptions()
/// <summary>
/// Initializes a new instance of the RestoreOptions class.
/// </summary>
/// <param name="roleName">The Azure Stack role name for restore, set
/// it to empty for all infrastructure role</param>
/// <param name="decryptionCertBase64">The certificate file raw data in
/// Base64 string. This should be the .pfx file with the private
/// key.</param>
/// <param name="decryptionCertPassword">The password for the
/// decryption certificate.</param>
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();
Expand All @@ -46,6 +49,13 @@ public RestoreOptions()
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the Azure Stack role name for restore, set it to empty
/// for all infrastructure role
/// </summary>
[JsonProperty(PropertyName = "roleName")]
public string RoleName { get; set; }

/// <summary>
/// Gets or sets the certificate file raw data in Base64 string. This
/// should be the .pfx file with the private key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,5 @@ public static IEnumerable<Tuple<string, string, string>> 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
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PropertyGroup>
<PackageId>Microsoft.AzureStack.Management.Backup.Admin</PackageId>
<Description>Provides developers with libraries for the Backup admin under AzureStack to manage backups.</Description>
<VersionPrefix>0.3.0-preview</VersionPrefix>
<VersionPrefix>0.3.1-preview</VersionPrefix>
<AssemblyName>Microsoft.AzureStack.Management.Backup.Admin</AssemblyName>
<PackageTags>Microsoft Azure Stack;Backup;REST HTTP client;azureostackfficial;netcore451511</PackageTags>
<PackageReleaseNotes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void TestRestoreBackup()
var backup = client.BackupLocations.CreateBackup(ResourceGroupName, backupLocation);
var restoreOperations = new RestoreOptions
{
RoleName = "-",
DecryptionCertBase64 = "decryptionCert",
DecryptionCertPassword = "decryptionCertPassword"
};
Expand Down