diff --git a/eng/mgmt/mgmtmetadata/storage_resource-manager.txt b/eng/mgmt/mgmtmetadata/storage_resource-manager.txt index 18f773a79c32..808b53f98f62 100644 --- a/eng/mgmt/mgmtmetadata/storage_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/storage_resource-manager.txt @@ -4,11 +4,12 @@ Commencing code generation Generating CSharp code Executing AutoRest command cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\code\srpsdk\sdk\storage\Microsoft.Azure.Management.Storage\src\Generated -2021-03-25 08:19:48 UTC +Autorest CSharp Version: 2.3.90 +2021-04-08 09:43:18 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: fe28323894e41f58ee668f4f6542956197f0baca +Commit: 5d89c9807d3e84a5890b381a68a308198f9ef141 AutoRest information Requested version: v2 Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/CHANGELOG.md b/sdk/storage/Microsoft.Azure.Management.Storage/CHANGELOG.md index dd13243de0a7..b0b6985d403c 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.Management.Storage/CHANGELOG.md @@ -1,5 +1,11 @@ ## Microsoft.Azure.Management.Storage release notes +### Changes in 21.0.0 + +**Breaking changes** + +- StorageAccount.KeyCreationTime type change from Dictionary to 'Microsoft.Azure.Management.Storage.Models.KeyCreationTime'. + ### Changes in 20.0.0 - Upgrade to rest api version 2021-02-01. - Support KeyPolicy,SasPolicy in create/update Storage account. diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/KeyCreationTime.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/KeyCreationTime.cs new file mode 100644 index 000000000000..ec3850ce0c48 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/KeyCreationTime.cs @@ -0,0 +1,55 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.Storage.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Storage account keys creation time. + /// + public partial class KeyCreationTime + { + /// + /// Initializes a new instance of the KeyCreationTime class. + /// + public KeyCreationTime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyCreationTime class. + /// + public KeyCreationTime(System.DateTime? key1 = default(System.DateTime?), System.DateTime? key2 = default(System.DateTime?)) + { + Key1 = key1; + Key2 = key2; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "key1")] + public System.DateTime? Key1 { get; set; } + + /// + /// + [JsonProperty(PropertyName = "key2")] + public System.DateTime? Key2 { get; set; } + + } +} diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs index 0a2f84cf3027..b0a1a63cf8e4 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/Models/StorageAccount.cs @@ -84,8 +84,8 @@ public StorageAccount() /// account. /// KeyPolicy assigned to the storage /// account. - /// Gets the list of storage account keys - /// creation time. + /// Storage account keys creation + /// time. /// Gets the URLs that are used to /// perform a retrieval of a public blob, queue, or table object from /// the secondary location of the storage account. Only available if @@ -128,7 +128,7 @@ public StorageAccount() /// true. /// NFS 3.0 protocol support enabled if set /// to true. - public StorageAccount(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string kind = default(string), Identity identity = default(Identity), ExtendedLocation extendedLocation = default(ExtendedLocation), ProvisioningState? provisioningState = default(ProvisioningState?), Endpoints primaryEndpoints = default(Endpoints), string primaryLocation = default(string), AccountStatus? statusOfPrimary = default(AccountStatus?), System.DateTime? lastGeoFailoverTime = default(System.DateTime?), string secondaryLocation = default(string), AccountStatus? statusOfSecondary = default(AccountStatus?), System.DateTime? creationTime = default(System.DateTime?), CustomDomain customDomain = default(CustomDomain), SasPolicy sasPolicy = default(SasPolicy), KeyPolicy keyPolicy = default(KeyPolicy), IDictionary keyCreationTime = default(IDictionary), Endpoints secondaryEndpoints = default(Endpoints), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication = default(AzureFilesIdentityBasedAuthentication), bool? enableHttpsTrafficOnly = default(bool?), NetworkRuleSet networkRuleSet = default(NetworkRuleSet), bool? isHnsEnabled = default(bool?), GeoReplicationStats geoReplicationStats = default(GeoReplicationStats), bool? failoverInProgress = default(bool?), string largeFileSharesState = default(string), IList privateEndpointConnections = default(IList), RoutingPreference routingPreference = default(RoutingPreference), BlobRestoreStatus blobRestoreStatus = default(BlobRestoreStatus), bool? allowBlobPublicAccess = default(bool?), string minimumTlsVersion = default(string), bool? allowSharedKeyAccess = default(bool?), bool? enableNfsV3 = default(bool?)) + public StorageAccount(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string kind = default(string), Identity identity = default(Identity), ExtendedLocation extendedLocation = default(ExtendedLocation), ProvisioningState? provisioningState = default(ProvisioningState?), Endpoints primaryEndpoints = default(Endpoints), string primaryLocation = default(string), AccountStatus? statusOfPrimary = default(AccountStatus?), System.DateTime? lastGeoFailoverTime = default(System.DateTime?), string secondaryLocation = default(string), AccountStatus? statusOfSecondary = default(AccountStatus?), System.DateTime? creationTime = default(System.DateTime?), CustomDomain customDomain = default(CustomDomain), SasPolicy sasPolicy = default(SasPolicy), KeyPolicy keyPolicy = default(KeyPolicy), KeyCreationTime keyCreationTime = default(KeyCreationTime), Endpoints secondaryEndpoints = default(Endpoints), Encryption encryption = default(Encryption), AccessTier? accessTier = default(AccessTier?), AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication = default(AzureFilesIdentityBasedAuthentication), bool? enableHttpsTrafficOnly = default(bool?), NetworkRuleSet networkRuleSet = default(NetworkRuleSet), bool? isHnsEnabled = default(bool?), GeoReplicationStats geoReplicationStats = default(GeoReplicationStats), bool? failoverInProgress = default(bool?), string largeFileSharesState = default(string), IList privateEndpointConnections = default(IList), RoutingPreference routingPreference = default(RoutingPreference), BlobRestoreStatus blobRestoreStatus = default(BlobRestoreStatus), bool? allowBlobPublicAccess = default(bool?), string minimumTlsVersion = default(string), bool? allowSharedKeyAccess = default(bool?), bool? enableNfsV3 = default(bool?)) : base(location, id, name, type, tags) { Sku = sku; @@ -280,10 +280,10 @@ public StorageAccount() public KeyPolicy KeyPolicy { get; private set; } /// - /// Gets the list of storage account keys creation time. + /// Gets storage account keys creation time. /// [JsonProperty(PropertyName = "properties.keyCreationTime")] - public IDictionary KeyCreationTime { get; private set; } + public KeyCreationTime KeyCreationTime { get; private set; } /// /// Gets the URLs that are used to perform a retrieval of a public diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs index 4faedd3e113a..3034bd2d1646 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Generated/SdkInfo_StorageManagementClient.cs @@ -47,7 +47,7 @@ public static IEnumerable> ApiInfo_StorageManageme public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\\code\\srpsdk\\sdk\\storage\\Microsoft.Azure.Management.Storage\\src\\Generated"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "fe28323894e41f58ee668f4f6542956197f0baca"; + public static readonly String GithubCommidId = "5d89c9807d3e84a5890b381a68a308198f9ef141"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj b/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj index 76eb0be2da25..8d2bf710f8a7 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Microsoft.Azure.Management.Storage.csproj @@ -10,7 +10,7 @@ Development of this library has shifted focus to the Azure Unified SDK. The future development will be focused on "Azure.ResourceManager.Storage" (https://www.nuget.org/packages/Azure.ResourceManager.Storage/). Please see the package changelog for more information. Microsoft.Azure.Management.Storage - 20.0.0 + 21.0.0 Microsoft Azure Storage management;Storage;Storage management; See https://aka.ms/asdotnetsdkchangelog for release notes. diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs b/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs index c89e6a6d3073..eaa0253b66f2 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/src/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ [assembly: AssemblyTitle("Microsoft Azure Storage Management Library")] [assembly: AssemblyDescription("Provides Microsoft Azure Storage management functions for managing the Microsoft Azure Storage service.")] -[assembly: AssemblyVersion("20.0.0.0")] -[assembly: AssemblyFileVersion("19.0.0.0")] +[assembly: AssemblyVersion("21.0.0.0")] +[assembly: AssemblyFileVersion("21.0.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] diff --git a/sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/StorageAccountTests.cs b/sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/StorageAccountTests.cs index 13d1638d41a7..39e51d19ac07 100644 --- a/sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/StorageAccountTests.cs +++ b/sdk/storage/Microsoft.Azure.Management.Storage/tests/Tests/StorageAccountTests.cs @@ -2609,7 +2609,6 @@ public void StorageAccountSASKeyPolicy() var account = storageMgmtClient.StorageAccounts.Create(rgname, accountName, parameters); StorageManagementTestUtilities.VerifyAccountProperties(account, false); Assert.Equal(2, account.KeyPolicy.KeyExpirationPeriodInDays); - //Assert.Equal(ExpirationAction.Log, account.SasPolicy.ExpirationAction); Assert.Equal("2.02:03:59", account.SasPolicy.SasExpirationPeriod); // Update storage account type @@ -2622,14 +2621,16 @@ public void StorageAccountSASKeyPolicy() }; account = storageMgmtClient.StorageAccounts.Update(rgname, accountName, updateParameters); Assert.Equal(9, account.KeyPolicy.KeyExpirationPeriodInDays); - //Assert.Equal(ExpirationAction.Log, account.SasPolicy.ExpirationAction); Assert.Equal("0.02:03:59", account.SasPolicy.SasExpirationPeriod); + Assert.NotNull(account.KeyCreationTime.Key1); + Assert.NotNull(account.KeyCreationTime.Key2); // Validate account = storageMgmtClient.StorageAccounts.GetProperties(rgname, accountName); Assert.Equal(9, account.KeyPolicy.KeyExpirationPeriodInDays); - //Assert.Equal(ExpirationAction.Log, account.SasPolicy.ExpirationAction); Assert.Equal("0.02:03:59", account.SasPolicy.SasExpirationPeriod); + Assert.NotNull(account.KeyCreationTime.Key1); + Assert.NotNull(account.KeyCreationTime.Key2); } } }