Skip to content

Commit 99b8f68

Browse files
authored
[Storage] Added HNS Soft Delete (Azure#19753)
1 parent d59569d commit 99b8f68

File tree

71 files changed

+7981
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7981
-13
lines changed

sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ internal static class DataLake
339339
public const string IsDirectoryKey = "hdi_isFolder";
340340

341341
public const string FileSystemName = "FileSystem";
342+
343+
public const string DeletionId = "deletionid";
342344
}
343345

344346
/// <summary>

sdk/storage/Azure.Storage.Common/tests/Shared/TestConfigurationsTemplate.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
<FileServiceSecondaryEndpoint>http://[PREMIUM-ACCOUNT]-secondary.file.core.windows.net</FileServiceSecondaryEndpoint>
8787
<TableServiceSecondaryEndpoint>http://[PREMIUM-ACCOUNT]-secondary.table.core.windows.net</TableServiceSecondaryEndpoint>
8888
</TenantConfiguration>
89-
90-
<!-- A storge account with hierarchical namespace enabled and OAuth access -->
89+
90+
<!-- A storge account with hierarchical namespace enabled, OAuth access, and blob soft delete enabled -->
9191
<!-- Replace [NAMESPACE-ACCOUNT] and [NAMESPACE-ACCOUNT-KEY] -->
9292
<TenantConfiguration>
9393
<TenantName>NamespaceTenant</TenantName>

sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

33
## 12.7.0-beta.3 (Unreleased)
4+
- Added support for service version 2020-08-04.
5+
- Added support for Soft Delete for Hierarchical-Namespace enabled accounts.
46
- Aligned storage URL parsing with other platforms.
57

68
## 12.7.0-beta.2 (2021-03-09)

sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ public DataLakeFileSystemClient(System.Uri fileSystemUri, Azure.Storage.StorageS
194194
public virtual System.Uri GenerateSasUri(Azure.Storage.Sas.DataLakeSasBuilder builder) { throw null; }
195195
public virtual Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemAccessPolicy> GetAccessPolicy(Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
196196
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemAccessPolicy>> GetAccessPolicyAsync(Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
197+
public virtual Azure.Pageable<Azure.Storage.Files.DataLake.Models.PathDeletedItem> GetDeletedPaths(string path = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
198+
public virtual Azure.AsyncPageable<Azure.Storage.Files.DataLake.Models.PathDeletedItem> GetDeletedPathsAsync(string path = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
197199
public virtual Azure.Storage.Files.DataLake.DataLakeDirectoryClient GetDirectoryClient(string directoryName) { throw null; }
198200
public virtual Azure.Storage.Files.DataLake.DataLakeFileClient GetFileClient(string fileName) { throw null; }
199201
public virtual Azure.Pageable<Azure.Storage.Files.DataLake.Models.PathItem> GetPaths(string path = null, bool recursive = false, bool userPrincipalName = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -204,6 +206,8 @@ public DataLakeFileSystemClient(System.Uri fileSystemUri, Azure.Storage.StorageS
204206
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo>> SetAccessPolicyAsync(Azure.Storage.Files.DataLake.Models.PublicAccessType accessType = Azure.Storage.Files.DataLake.Models.PublicAccessType.None, System.Collections.Generic.IEnumerable<Azure.Storage.Files.DataLake.Models.DataLakeSignedIdentifier> permissions = null, Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
205207
public virtual Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo> SetMetadata(System.Collections.Generic.IDictionary<string, string> metadata, Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
206208
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileSystemInfo>> SetMetadataAsync(System.Collections.Generic.IDictionary<string, string> metadata, Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
209+
public virtual Azure.Response<Azure.Storage.Files.DataLake.DataLakePathClient> UndeletePath(string deletedPath, string deletionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
210+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.DataLakePathClient>> UndeletePathAsync(string deletedPath, string deletionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
207211
}
208212
public partial class DataLakeLeaseClient
209213
{
@@ -311,8 +315,12 @@ public DataLakeServiceClient(System.Uri serviceUri, Azure.Storage.StorageSharedK
311315
public virtual Azure.AsyncPageable<Azure.Storage.Files.DataLake.Models.FileSystemItem> GetFileSystemsAsync(Azure.Storage.Files.DataLake.Models.FileSystemTraits traits = Azure.Storage.Files.DataLake.Models.FileSystemTraits.None, Azure.Storage.Files.DataLake.Models.FileSystemStates states = Azure.Storage.Files.DataLake.Models.FileSystemStates.None, string prefix = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
312316
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
313317
public virtual Azure.AsyncPageable<Azure.Storage.Files.DataLake.Models.FileSystemItem> GetFileSystemsAsync(Azure.Storage.Files.DataLake.Models.FileSystemTraits traits, string prefix, System.Threading.CancellationToken cancellationToken) { throw null; }
318+
public virtual Azure.Response<Azure.Storage.Files.DataLake.Models.DataLakeServiceProperties> GetProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
319+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.DataLakeServiceProperties>> GetPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
314320
public virtual Azure.Response<Azure.Storage.Files.DataLake.Models.UserDelegationKey> GetUserDelegationKey(System.DateTimeOffset? startsOn, System.DateTimeOffset expiresOn, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
315321
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.UserDelegationKey>> GetUserDelegationKeyAsync(System.DateTimeOffset? startsOn, System.DateTimeOffset expiresOn, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
322+
public virtual Azure.Response SetProperties(Azure.Storage.Files.DataLake.Models.DataLakeServiceProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
323+
public virtual System.Threading.Tasks.Task<Azure.Response> SetPropertiesAsync(Azure.Storage.Files.DataLake.Models.DataLakeServiceProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
316324
public virtual Azure.Response<Azure.Storage.Files.DataLake.DataLakeFileSystemClient> UndeleteFileSystem(string deletedFileSystemName, string deleteFileSystemVersion, string destinationFileSystemName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
317325
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.DataLakeFileSystemClient>> UndeleteFileSystemAsync(string deletedFileSystemName, string deleteFileSystemVersion, string destinationFileSystemName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
318326
}
@@ -411,6 +419,24 @@ public DataLakeAclChangeFailedException(string message, System.Exception excepti
411419
public string ContinuationToken { get { throw null; } }
412420
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
413421
}
422+
public partial class DataLakeAnalyticsLogging
423+
{
424+
public DataLakeAnalyticsLogging() { }
425+
public bool Delete { get { throw null; } set { } }
426+
public bool Read { get { throw null; } set { } }
427+
public Azure.Storage.Files.DataLake.Models.DataLakeRetentionPolicy RetentionPolicy { get { throw null; } set { } }
428+
public string Version { get { throw null; } set { } }
429+
public bool Write { get { throw null; } set { } }
430+
}
431+
public partial class DataLakeCorsRule
432+
{
433+
public DataLakeCorsRule() { }
434+
public string AllowedHeaders { get { throw null; } set { } }
435+
public string AllowedMethods { get { throw null; } set { } }
436+
public string AllowedOrigins { get { throw null; } set { } }
437+
public string ExposedHeaders { get { throw null; } set { } }
438+
public int MaxAgeInSeconds { get { throw null; } set { } }
439+
}
414440
public enum DataLakeFileExpirationOrigin
415441
{
416442
CreationTime = 0,
@@ -471,6 +497,14 @@ public enum DataLakeLeaseStatus
471497
Locked = 0,
472498
Unlocked = 1,
473499
}
500+
public partial class DataLakeMetrics
501+
{
502+
public DataLakeMetrics() { }
503+
public bool Enabled { get { throw null; } set { } }
504+
public bool? IncludeApis { get { throw null; } set { } }
505+
public Azure.Storage.Files.DataLake.Models.DataLakeRetentionPolicy RetentionPolicy { get { throw null; } set { } }
506+
public string Version { get { throw null; } set { } }
507+
}
474508
public static partial class DataLakeModelFactory
475509
{
476510
public static Azure.Storage.Files.DataLake.Models.DataLakeQueryError DataLakeQueryError(string name = null, string description = null, bool isFatal = false, long position = (long)0) { throw null; }
@@ -564,6 +598,22 @@ public DataLakeRequestConditions() { }
564598
public string LeaseId { get { throw null; } set { } }
565599
public override string ToString() { throw null; }
566600
}
601+
public partial class DataLakeRetentionPolicy
602+
{
603+
public DataLakeRetentionPolicy() { }
604+
public int? Days { get { throw null; } set { } }
605+
public bool Enabled { get { throw null; } set { } }
606+
}
607+
public partial class DataLakeServiceProperties
608+
{
609+
public DataLakeServiceProperties() { }
610+
public System.Collections.Generic.IList<Azure.Storage.Files.DataLake.Models.DataLakeCorsRule> Cors { get { throw null; } set { } }
611+
public string DefaultServiceVersion { get { throw null; } set { } }
612+
public Azure.Storage.Files.DataLake.Models.DataLakeRetentionPolicy DeleteRetentionPolicy { get { throw null; } set { } }
613+
public Azure.Storage.Files.DataLake.Models.DataLakeMetrics HourMetrics { get { throw null; } set { } }
614+
public Azure.Storage.Files.DataLake.Models.DataLakeAnalyticsLogging Logging { get { throw null; } set { } }
615+
public Azure.Storage.Files.DataLake.Models.DataLakeMetrics MinuteMetrics { get { throw null; } set { } }
616+
}
567617
public partial class DataLakeSignedIdentifier
568618
{
569619
public DataLakeSignedIdentifier() { }
@@ -702,6 +752,14 @@ internal PathCreateInfo() { }
702752
public string Continuation { get { throw null; } }
703753
public Azure.Storage.Files.DataLake.Models.PathInfo PathInfo { get { throw null; } }
704754
}
755+
public partial class PathDeletedItem
756+
{
757+
internal PathDeletedItem() { }
758+
public System.DateTimeOffset? DeletedOn { get { throw null; } }
759+
public string DeletionId { get { throw null; } }
760+
public string Name { get { throw null; } }
761+
public int? RemainingRetentionDays { get { throw null; } }
762+
}
705763
public enum PathGetPropertiesAction
706764
{
707765
GetAccessControl = 0,

0 commit comments

Comments
 (0)