Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-AzStorageSyncServer: Fix string comparison and add scenario test #27041

Draft
wants to merge 10 commits into
base: shared/StorageSync
Choose a base branch
from
Draft
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1862,8 +1862,8 @@ configuration:
then:
- mentionUsers:
mentionees:
- raedJarrar
- jifems
- dlacy7
- NateB2
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
Expand Down Expand Up @@ -2873,7 +2873,6 @@ configuration:
then:
- mentionUsers:
mentionees:
- SameergMS
- yairgil
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
Expand Down
1 change: 1 addition & 0 deletions src/Blueprint/Blueprint/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Deprecation of Blueprint cmdlets.

## Version 0.4.5
* Upgraded nuget package to signed package.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Blueprint.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using System;
using System.Management.Automation;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintArtifact", DefaultParameterSetName = ParameterSetNames.ArtifactsByBlueprint), OutputType(typeof(PSBlueprintAssignment))]
public class GetAzureRmBlueprintArtifact : BlueprintArtifactsCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.PowerShell.Cmdlets.Blueprint.Properties;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintArtifact", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.CreateTemplateArtifact), OutputType(typeof(Artifact))]
public class NewAzureRMBlueprintArtifact : BlueprintArtifactsCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.PowerShell.Cmdlets.Blueprint.Properties;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintArtifact", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.UpdateTemplateArtifact), OutputType(typeof(Artifact))]
public class SetAzureRmBlueprintArtifact : BlueprintArtifactsCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@

using Microsoft.Azure.Commands.Blueprint.Common;
using Microsoft.Azure.Commands.Blueprint.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System;
using System.Management.Automation;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintAssignment", DefaultParameterSetName = ParameterSetNames.SubscriptionScope), OutputType(typeof(PSBlueprintAssignment))]
public class GetAzureRmBlueprintAssignment : BlueprintAssignmentCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using ParameterSetNames = Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants.ParameterSetNames;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintAssignment", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.CreateBlueprintAssignment), OutputType(typeof(PSBlueprintAssignment))]
public class NewAzureRmBlueprintAssignment : BlueprintAssignmentCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
using Microsoft.Azure.Commands.Blueprint.Common;
using Microsoft.Azure.Commands.Blueprint.Models;
using Microsoft.Azure.PowerShell.Cmdlets.Blueprint.Properties;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System;
using System.Management.Automation;
using ParameterHelpMessages = Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants.ParameterHelpMessages;
using ParameterSetNames = Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants.ParameterSetNames;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintAssignment", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.BySubscriptionAndName), OutputType(typeof(PSBlueprintAssignment))]
public class RemoveAzureRmBlueprintAssignment : BlueprintAssignmentCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
using Newtonsoft.Json;
using ParameterHelpMessages = Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants.ParameterHelpMessages;
using ParameterSetNames = Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants.ParameterSetNames;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintAssignment", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.UpdateBlueprintAssignment), OutputType(typeof(PSBlueprintAssignment))]
public class SetAzureRMBlueprintAssignment : BlueprintAssignmentCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
using Microsoft.Azure.Commands.Common.Authentication;
using Microsoft.Azure.PowerShell.Cmdlets.Blueprint.Properties;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet("Export", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintWithArtifact", SupportsShouldProcess = true, DefaultParameterSetName =
ParameterSetNames.ExportBlueprintParameterSet), OutputType(typeof(bool))]
public class ExportAzureRmBlueprint : BlueprintDefinitionCmdletBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
using Microsoft.Azure.Commands.Blueprint.Models;
using ParameterSetNames = Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants.ParameterSetNames;
using ParameterHelpMessages = Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants.ParameterHelpMessages;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Blueprint", DefaultParameterSetName = ParameterSetNames.SubscriptionScope), OutputType(typeof(PSBlueprint),typeof(PSPublishedBlueprint))]
public class GetAzureRmBlueprint : BlueprintDefinitionCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Blueprint.Common;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using System.Management.Automation;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet("Import", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "BlueprintWithArtifact", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.ImportBlueprintParameterSet), OutputType(typeof(bool))]
public class ImportAzureRmBlueprint : BlueprintDefinitionCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
// ----------------------------------------------------------------------------------
using Microsoft.Azure.Commands.Blueprint.Common;
using Microsoft.Azure.Commands.Blueprint.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System;
using System.Management.Automation;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Blueprint", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.CreateBlueprintBySubscription), OutputType(typeof(PSBlueprint))]
public class NewAzureRmBlueprint : BlueprintDefinitionCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
using Microsoft.Azure.Management.Blueprint.Models;
using Microsoft.Azure.PowerShell.Cmdlets.Blueprint.Properties;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet("Publish", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Blueprint", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.PublishBlueprint), OutputType(typeof(PSPublishedBlueprint))]
public class PublishAzureRmBlueprint : BlueprintDefinitionCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@

using Microsoft.Azure.Commands.Blueprint.Common;
using Microsoft.Azure.Commands.Blueprint.Models;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
using System;
using System.Management.Automation;
using System.Text.RegularExpressions;
using static Microsoft.Azure.Commands.Blueprint.Common.BlueprintConstants;

namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
{
[GenericBreakingChangeWithVersion("Blueprints and associated cmdlets will be deprecated as early as July 2026. Customers are encouraged to transition to Template Specs and Deployments Stacks to support their scenarios beyond that date. Migration documentation is available at https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint.", "16.0.0", "-")]
[Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Blueprint", SupportsShouldProcess = true, DefaultParameterSetName = ParameterSetNames.UpdateBlueprintBySubscription), OutputType(typeof(PSBlueprint))]
public class SetAzureRMBlueprint : BlueprintDefinitionCmdletBase
{
Expand Down
2 changes: 1 addition & 1 deletion src/DataProtection/DataProtection.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ directive:
parameter-name: XmsAuthorizationAuxiliary
set:
parameter-name: Token
parameter-description: Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Token to fetch authorization token for different tenant.
parameter-description: Parameter deprecate. Please use SecureToken instead.
- where:
parameter-name: AzureMonitorAlertSettingAlertsForAllJobFailure
set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Unlock-AzDataProtectionResourceGuardOperation
[System.String]
${ResourceToBeDeleted},

[Parameter(ParameterSetName="UnlockDelete", Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch secure authorization token for different tenant and then convert to string using ConvertFrom-SecureString cmdlet.')]
[Parameter(ParameterSetName="UnlockDelete", Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Stop-AzDataProtectionBackupInstanceProtection
[System.String[]]
${ResourceGuardOperationRequest},

[Parameter(Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch secure authorization token for different tenant and then convert to string using ConvertFrom-SecureString cmdlet.')]
[Parameter(Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Suspend-AzDataProtectionBackupInstanceBackup
[System.String[]]
${ResourceGuardOperationRequest},

[Parameter(Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch secure authorization token for different tenant and then convert to string using ConvertFrom-SecureString cmdlet.')]
[Parameter(Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function Update-AzDataProtectionBackupInstance
[System.String[]]
${ResourceGuardOperationRequest},

[Parameter(Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch secure authorization token for different tenant and then convert to string using ConvertFrom-SecureString cmdlet.')]
[Parameter(Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Update-AzDataProtectionBackupInstanceAssociatedPolicy
[System.String[]]
${ResourceGuardOperationRequest},

[Parameter(Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch secure authorization token for different tenant and then convert to string using ConvertFrom-SecureString cmdlet.')]
[Parameter(Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function Start-AzDataProtectionBackupInstanceRestore
[System.String[]]
${ResourceGuardOperationRequest},

[Parameter(Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch secure authorization token for different tenant and then convert to string using ConvertFrom-SecureString cmdlet.')]
[Parameter(Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
[System.String[]]
${ResourceGuardOperationRequest},

[Parameter(Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch secure authorization token for different tenant and then convert to string using ConvertFrom-SecureString cmdlet.')]
[Parameter(Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

Expand Down
Loading