Skip to content

Commit f8dfc85

Browse files
authored
[KeyVault]Provide Warning Messages for SecretVaultText (#12676)
1 parent 49d95fd commit f8dfc85

File tree

7 files changed

+19
-1
lines changed

7 files changed

+19
-1
lines changed

src/KeyVault/KeyVault/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
Added warning messages for planning to remove attribute SecretVauleText
2122

2223
## Version 2.0.0
2324
* Removed two aliases: `New-AzKeyVaultCertificateAdministratorDetails` and `New-AzKeyVaultCertificateOrganizationDetails`

src/KeyVault/KeyVault/Commands/GetAzureKeyVaultSecret.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
using Microsoft.Azure.Commands.KeyVault.Models;
1616
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1717
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
19+
using System;
1820
using System.Collections.Generic;
1921
using System.Linq;
2022
using System.Management.Automation;
2123

2224
namespace Microsoft.Azure.Commands.KeyVault
2325
{
24-
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecret", DefaultParameterSetName = ByVaultNameParameterSet)]
26+
[CmdletOutputBreakingChange(typeof(PSKeyVaultSecret), "3.0.0", DeprecatedOutputProperties = new String[] { "SecretValueText" })]
27+
[CmdletOutputBreakingChange(typeof(PSDeletedKeyVaultSecret), "3.0.0", DeprecatedOutputProperties = new String[] { "SecretValueText" })]
28+
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecret", DefaultParameterSetName = ByVaultNameParameterSet)]
2529
[OutputType(typeof(PSKeyVaultSecretIdentityItem), typeof(PSKeyVaultSecret), typeof(PSDeletedKeyVaultSecretIdentityItem), typeof(PSDeletedKeyVaultSecret))]
2630
public class GetAzureKeyVaultSecret : KeyVaultCmdletBase
2731
{

src/KeyVault/KeyVault/Commands/RemoveAzureKeyVaultSecret.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
using Microsoft.Azure.Commands.KeyVault.Models;
1616
using Microsoft.Azure.Commands.KeyVault.Properties;
1717
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
19+
using System;
1820
using System.Globalization;
1921
using System.Management.Automation;
2022

2123
namespace Microsoft.Azure.Commands.KeyVault
2224
{
25+
[CmdletOutputBreakingChange(typeof(PSDeletedKeyVaultSecret), "3.0.0", DeprecatedOutputProperties = new String[] { "SecretValueText" })]
2326
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecret",SupportsShouldProcess = true,DefaultParameterSetName = ByVaultNameParameterSet)]
2427
[OutputType(typeof(PSDeletedKeyVaultSecret))]
2528
public class RemoveAzureKeyVaultSecret : KeyVaultCmdletBase

src/KeyVault/KeyVault/Commands/RestoreAzureKeyVaultSecret.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,22 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System;
1516
using System.IO;
1617
using System.Management.Automation;
1718
using Microsoft.Azure.Commands.Common.Authentication;
1819
using Microsoft.Azure.Commands.KeyVault.Models;
1920
using Microsoft.Azure.Commands.KeyVault.Properties;
2021
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2122
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
23+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2224

2325
namespace Microsoft.Azure.Commands.KeyVault
2426
{
2527
/// <summary>
2628
/// Restores the backup secret into a vault
2729
/// </summary>
30+
[CmdletOutputBreakingChange(typeof(PSKeyVaultSecret), "3.0.0", DeprecatedOutputProperties = new String[] { "SecretValueText" })]
2831
[Cmdlet("Restore", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecret",SupportsShouldProcess = true,DefaultParameterSetName = ByVaultNameParameterSet)]
2932
[OutputType( typeof(PSKeyVaultSecret) )]
3033
public class RestoreAzureKeyVaultSecret : KeyVaultCmdletBase

src/KeyVault/KeyVault/Commands/SetAzureKeyVaultSecret.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.KeyVault.Models;
1616
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1717
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1819
using System;
1920
using System.Collections;
2021
using System.Collections.Generic;
@@ -23,6 +24,7 @@
2324

2425
namespace Microsoft.Azure.Commands.KeyVault
2526
{
27+
[CmdletOutputBreakingChange(typeof(PSKeyVaultSecret), "3.0.0", DeprecatedOutputProperties = new String[] { "SecretValueText" })]
2628
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecret",SupportsShouldProcess = true,DefaultParameterSetName = DefaultParameterSet)]
2729
[OutputType(typeof(PSKeyVaultSecret))]
2830
public class SetAzureKeyVaultSecret : KeyVaultCmdletBase

src/KeyVault/KeyVault/Commands/UndoAzureKeyVaultSecretRemoval.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414

1515
using Microsoft.Azure.Commands.KeyVault.Models;
1616
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
18+
using System;
1719
using System.Management.Automation;
1820

1921
namespace Microsoft.Azure.Commands.KeyVault
2022
{
23+
[CmdletOutputBreakingChange(typeof(PSKeyVaultSecret), "3.0.0", DeprecatedOutputProperties = new String[] { "SecretValueText" })]
2124
[Cmdlet("Undo", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecretRemoval",SupportsShouldProcess = true,DefaultParameterSetName = DefaultParameterSet)]
2225
[OutputType(typeof(PSKeyVaultSecret))]
2326
public class UndoAzureKeyVaultSecretRemoval : KeyVaultCmdletBase

src/KeyVault/KeyVault/Commands/UpdateAzureKeyVaultSecret.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414

1515
using Microsoft.Azure.Commands.KeyVault.Models;
1616
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1718
using System;
1819
using System.Collections;
1920
using System.Management.Automation;
2021

2122
namespace Microsoft.Azure.Commands.KeyVault
2223
{
24+
[CmdletOutputBreakingChange(typeof(PSKeyVaultSecret), "3.0.0", DeprecatedOutputProperties = new String[] { "SecretValueText" })]
2325
[Cmdlet("Update", ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecret",DefaultParameterSetName = DefaultParameterSet,SupportsShouldProcess = true)]
2426
[OutputType(typeof(PSKeyVaultSecret))]
2527
[Alias("Set-" + ResourceManager.Common.AzureRMConstants.AzurePrefix + "KeyVaultSecretAttribute")]

0 commit comments

Comments
 (0)