From 23ae0236ebee5fcc6b1e7be69101d0de5f474cb1 Mon Sep 17 00:00:00 2001 From: Saif Kayani Date: Thu, 14 May 2020 15:14:11 -0700 Subject: [PATCH 1/4] New-AzManagedServicesDefinition changes --- .../ScenarioTests/ManagedServicesTests.ps1 | 14 ++--- .../NewAzureRmManagedServicesDefinition.cs | 23 ++++++-- .../help/New-AzManagedServicesDefinition.md | 57 ++++++++++++------- 3 files changed, 61 insertions(+), 33 deletions(-) diff --git a/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 b/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 index 14e3b1b0654c..cf44a117bfb0 100644 --- a/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 +++ b/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 @@ -53,12 +53,12 @@ function New-AzManagedServicesDefinitionWithId { [CmdletBinding()] param( - [string] [Parameter()] $Name, + [string] [Parameter()] $DisplayName, [string] [Parameter()] $ManagedByTenantId, [string] [Parameter()] $PrincipalId, [string] [Parameter()] $RoleDefinitionId, [string] [Parameter()] $Description, - [Guid] [Parameter()] $RegistrationDefinitionId + [string] [Parameter()] $Name ) $profile = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile @@ -71,9 +71,9 @@ function New-AzManagedServicesDefinitionWithId $cmdlet.Description = $Description } - if (-not ([string]::IsNullOrEmpty($Name))) + if (-not ([string]::IsNullOrEmpty($DisplayName))) { - $cmdlet.Name = $Name + $cmdlet.DisplayName = $DisplayName } if (-not ([string]::IsNullOrEmpty($ManagedByTenantId))) @@ -91,9 +91,9 @@ function New-AzManagedServicesDefinitionWithId $cmdlet.RoleDefinitionId = $RoleDefinitionId } - if ($RegistrationDefinitionId -ne $null -and $RegistrationDefinitionId -ne [System.Guid]::Empty) + if ($Name -ne $null -and $Name -ne [System.Guid]::Empty) { - $cmdlet.RegistrationDefinitionId = $RegistrationDefinitionId + $cmdlet.Name = $Name } $cmdlet.ExecuteCmdlet() @@ -110,7 +110,7 @@ function Test-ManagedServices_CRUD $definitionId = "1ccdb215-959a-48b9-bd7c-0584d461ea6c" #put def - $definition = New-AzManagedServicesDefinitionWithId -ManagedByTenantId $managedByTenantId -RoleDefinitionId $roleDefinitionId -PrincipalId $principalId -Name $name -RegistrationDefinitionId $definitionId + $definition = New-AzManagedServicesDefinitionWithId -ManagedByTenantId $managedByTenantId -RoleDefinitionId $roleDefinitionId -PrincipalId $principalId -DisplayName $name -Name $definitionId Assert-AreEqual $name $definition.Properties.Name Assert-AreEqual $managedByTenantId $definition.Properties.ManagedByTenantId diff --git a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs index d921738d0475..f97e0ac00d34 100644 --- a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs +++ b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs @@ -32,10 +32,14 @@ public class NewAzureRmManagedServicesDefinition : ManagedServicesCmdletBase protected const string DefaultParameterSet = "Default"; protected const string ByPlanParameterSet = "ByPlan"; - [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The name of the Registration Definition.")] - [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = true, HelpMessage = "The name of the Registration Definition.")] + [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = false, HelpMessage = "The unique name of the Registration Definition.")] + [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = false, HelpMessage = "The unique name of the Registration Definition.")] public string Name { get; set; } + [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The display name of the Registration Definition.")] + [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = true, HelpMessage = "The display name of the Registration Definition.")] + public string DisplayName { get; set; } + [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The ManagedBy Tenant Identifier.")] [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = true, HelpMessage = "The ManagedBy Tenant Identifier.")] public string ManagedByTenantId { get; set; } @@ -71,7 +75,7 @@ public class NewAzureRmManagedServicesDefinition : ManagedServicesCmdletBase [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")] public SwitchParameter AsJob { get; set; } - public Guid RegistrationDefinitionId { get; set; } = default(Guid); + public Guid RegistrationDefinitionId { get; set; } public override void ExecuteCmdlet() { @@ -92,7 +96,16 @@ public override void ExecuteCmdlet() throw new ApplicationException("RoleDefinitionId must be a valid GUID."); } - if (this.RegistrationDefinitionId == default(Guid)) + if (this.Name != null) + { + if (!this.Name.IsGuid()) + { + throw new ApplicationException("Name must be a valid GUID."); + } + + this.RegistrationDefinitionId = new Guid(this.Name); + } + else { this.RegistrationDefinitionId = Guid.NewGuid(); } @@ -122,7 +135,7 @@ public override void ExecuteCmdlet() Properties = new RegistrationDefinitionProperties { Description = this.Description, - RegistrationDefinitionName = this.Name, + RegistrationDefinitionName = this.DisplayName, ManagedByTenantId = this.ManagedByTenantId, Authorizations = new List { diff --git a/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md b/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md index de36e34616e9..77e147e5604e 100644 --- a/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md +++ b/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md @@ -14,15 +14,15 @@ Creates or updates a registration definition. ### Default (Default) ``` -New-AzManagedServicesDefinition -Name -ManagedByTenantId - -PrincipalId -RoleDefinitionId [-Description ] [-AsJob] +New-AzManagedServicesDefinition -DisplayName -ManagedByTenantId + -PrincipalId -RoleDefinitionId [-Name ] [-Description ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByPlan ``` -New-AzManagedServicesDefinition -Name -ManagedByTenantId - -PrincipalId -RoleDefinitionId [-Description ] -PlanName +New-AzManagedServicesDefinition -DisplayName -ManagedByTenantId + -PrincipalId -RoleDefinitionId [-Name ] [-Description ] -PlanName -PlanPublisher -PlanProduct -PlanVersion [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -34,7 +34,7 @@ Creates or updates a registration definition. ### Example 1 ```powershell -PS C:\> PS C:\> New-AzManagedServicesDefinition -Name name -ManagedByTenantId bab3375b-6197-4a15-a44b-16c41faa91d7 -PrincipalId d6f6c88a-5b7a-455e-ba40-ce146d4d3671 -RoleDefinitionId acdd72a7-3385-48ef-bd42-f606fba81ae7 -Description mydef +PS C:\> PS C:\> New-AzManagedServicesDefinition -DisplayName MyRegistrationDefinition -ManagedByTenantId bab3375b-6197-4a15-a44b-16c41faa91d7 -PrincipalId d6f6c88a-5b7a-455e-ba40-ce146d4d3671 -RoleDefinitionId acdd72a7-3385-48ef-bd42-f606fba81ae7 -Description mydef Name ManagedByTenantId PrincipalId RoleDefinitionId ---- ----------------- ----------- ---------------- @@ -45,7 +45,7 @@ Creates or updates a registration definition given the required parameters. ### Example 2 ```powershell -PS C> New-AzManagedServicesDefinition -Name asd -ManagedByTenantId "bab3375b-6197-4a15-a44b-16c41faa91d7" -PrincipalId "d6f6c88a-5b7a-455e-ba40-ce146d4d3671" -RoleDefinitionId "acdd72a7-3385-48ef-bd42-f606fba81ae7" -PlanName plan -PlanPublisher publisher -PlanProduct product -PlanVersion 0.1 +PS C> New-AzManagedServicesDefinition -DisplayName asd -ManagedByTenantId "bab3375b-6197-4a15-a44b-16c41faa91d7" -PrincipalId "d6f6c88a-5b7a-455e-ba40-ce146d4d3671" -RoleDefinitionId "acdd72a7-3385-48ef-bd42-f606fba81ae7" -PlanName plan -PlanPublisher publisher -PlanProduct product -PlanVersion 0.1 Name ManagedByTenantId PrincipalId RoleDefinitionId ---- ----------------- ----------- ---------------- @@ -101,6 +101,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DisplayName +The display name of the Registration Definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ManagedByTenantId The ManagedBy Tenant Identifier. @@ -116,23 +131,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PlanName -The name of the plan. +### -Name +The unique name of the Registration Definition (for example b0c052e5-c437-4771-a476-8b1201158a57). ```yaml Type: System.String -Parameter Sets: ByPlan +Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -PlanProduct -The name of the Product. +### -PlanName +The name of the plan. ```yaml Type: System.String @@ -146,8 +161,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PlanPublisher -The name of the Publisher. +### -PlanProduct +The name of the Product. ```yaml Type: System.String @@ -161,8 +176,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PlanVersion -The version number of the plan. +### -PlanPublisher +The name of the Publisher. ```yaml Type: System.String @@ -176,12 +191,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PrincipalId -The ManagedBy Principal Identifier. +### -PlanVersion +The version number of the plan. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: ByPlan Aliases: Required: True @@ -191,8 +206,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -RegistrationDefinitionName -The name of the Registration Definition. +### -PrincipalId +The ManagedBy Principal Identifier. ```yaml Type: System.String From a4c921b934051a92e59219b9b2b9ca14b39c91b8 Mon Sep 17 00:00:00 2001 From: Saif Kayani Date: Thu, 14 May 2020 15:14:49 -0700 Subject: [PATCH 2/4] Revert "New-AzManagedServicesDefinition changes" This reverts commit 23ae0236ebee5fcc6b1e7be69101d0de5f474cb1. --- .../ScenarioTests/ManagedServicesTests.ps1 | 14 ++--- .../NewAzureRmManagedServicesDefinition.cs | 23 ++------ .../help/New-AzManagedServicesDefinition.md | 57 +++++++------------ 3 files changed, 33 insertions(+), 61 deletions(-) diff --git a/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 b/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 index cf44a117bfb0..14e3b1b0654c 100644 --- a/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 +++ b/src/ManagedServices/ManagedServices.Test/ScenarioTests/ManagedServicesTests.ps1 @@ -53,12 +53,12 @@ function New-AzManagedServicesDefinitionWithId { [CmdletBinding()] param( - [string] [Parameter()] $DisplayName, + [string] [Parameter()] $Name, [string] [Parameter()] $ManagedByTenantId, [string] [Parameter()] $PrincipalId, [string] [Parameter()] $RoleDefinitionId, [string] [Parameter()] $Description, - [string] [Parameter()] $Name + [Guid] [Parameter()] $RegistrationDefinitionId ) $profile = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile @@ -71,9 +71,9 @@ function New-AzManagedServicesDefinitionWithId $cmdlet.Description = $Description } - if (-not ([string]::IsNullOrEmpty($DisplayName))) + if (-not ([string]::IsNullOrEmpty($Name))) { - $cmdlet.DisplayName = $DisplayName + $cmdlet.Name = $Name } if (-not ([string]::IsNullOrEmpty($ManagedByTenantId))) @@ -91,9 +91,9 @@ function New-AzManagedServicesDefinitionWithId $cmdlet.RoleDefinitionId = $RoleDefinitionId } - if ($Name -ne $null -and $Name -ne [System.Guid]::Empty) + if ($RegistrationDefinitionId -ne $null -and $RegistrationDefinitionId -ne [System.Guid]::Empty) { - $cmdlet.Name = $Name + $cmdlet.RegistrationDefinitionId = $RegistrationDefinitionId } $cmdlet.ExecuteCmdlet() @@ -110,7 +110,7 @@ function Test-ManagedServices_CRUD $definitionId = "1ccdb215-959a-48b9-bd7c-0584d461ea6c" #put def - $definition = New-AzManagedServicesDefinitionWithId -ManagedByTenantId $managedByTenantId -RoleDefinitionId $roleDefinitionId -PrincipalId $principalId -DisplayName $name -Name $definitionId + $definition = New-AzManagedServicesDefinitionWithId -ManagedByTenantId $managedByTenantId -RoleDefinitionId $roleDefinitionId -PrincipalId $principalId -Name $name -RegistrationDefinitionId $definitionId Assert-AreEqual $name $definition.Properties.Name Assert-AreEqual $managedByTenantId $definition.Properties.ManagedByTenantId diff --git a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs index f97e0ac00d34..d921738d0475 100644 --- a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs +++ b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs @@ -32,14 +32,10 @@ public class NewAzureRmManagedServicesDefinition : ManagedServicesCmdletBase protected const string DefaultParameterSet = "Default"; protected const string ByPlanParameterSet = "ByPlan"; - [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = false, HelpMessage = "The unique name of the Registration Definition.")] - [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = false, HelpMessage = "The unique name of the Registration Definition.")] + [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The name of the Registration Definition.")] + [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = true, HelpMessage = "The name of the Registration Definition.")] public string Name { get; set; } - [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The display name of the Registration Definition.")] - [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = true, HelpMessage = "The display name of the Registration Definition.")] - public string DisplayName { get; set; } - [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The ManagedBy Tenant Identifier.")] [Parameter(ParameterSetName = ByPlanParameterSet, Mandatory = true, HelpMessage = "The ManagedBy Tenant Identifier.")] public string ManagedByTenantId { get; set; } @@ -75,7 +71,7 @@ public class NewAzureRmManagedServicesDefinition : ManagedServicesCmdletBase [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")] public SwitchParameter AsJob { get; set; } - public Guid RegistrationDefinitionId { get; set; } + public Guid RegistrationDefinitionId { get; set; } = default(Guid); public override void ExecuteCmdlet() { @@ -96,16 +92,7 @@ public override void ExecuteCmdlet() throw new ApplicationException("RoleDefinitionId must be a valid GUID."); } - if (this.Name != null) - { - if (!this.Name.IsGuid()) - { - throw new ApplicationException("Name must be a valid GUID."); - } - - this.RegistrationDefinitionId = new Guid(this.Name); - } - else + if (this.RegistrationDefinitionId == default(Guid)) { this.RegistrationDefinitionId = Guid.NewGuid(); } @@ -135,7 +122,7 @@ public override void ExecuteCmdlet() Properties = new RegistrationDefinitionProperties { Description = this.Description, - RegistrationDefinitionName = this.DisplayName, + RegistrationDefinitionName = this.Name, ManagedByTenantId = this.ManagedByTenantId, Authorizations = new List { diff --git a/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md b/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md index 77e147e5604e..de36e34616e9 100644 --- a/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md +++ b/src/ManagedServices/ManagedServices/help/New-AzManagedServicesDefinition.md @@ -14,15 +14,15 @@ Creates or updates a registration definition. ### Default (Default) ``` -New-AzManagedServicesDefinition -DisplayName -ManagedByTenantId - -PrincipalId -RoleDefinitionId [-Name ] [-Description ] [-AsJob] +New-AzManagedServicesDefinition -Name -ManagedByTenantId + -PrincipalId -RoleDefinitionId [-Description ] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByPlan ``` -New-AzManagedServicesDefinition -DisplayName -ManagedByTenantId - -PrincipalId -RoleDefinitionId [-Name ] [-Description ] -PlanName +New-AzManagedServicesDefinition -Name -ManagedByTenantId + -PrincipalId -RoleDefinitionId [-Description ] -PlanName -PlanPublisher -PlanProduct -PlanVersion [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -34,7 +34,7 @@ Creates or updates a registration definition. ### Example 1 ```powershell -PS C:\> PS C:\> New-AzManagedServicesDefinition -DisplayName MyRegistrationDefinition -ManagedByTenantId bab3375b-6197-4a15-a44b-16c41faa91d7 -PrincipalId d6f6c88a-5b7a-455e-ba40-ce146d4d3671 -RoleDefinitionId acdd72a7-3385-48ef-bd42-f606fba81ae7 -Description mydef +PS C:\> PS C:\> New-AzManagedServicesDefinition -Name name -ManagedByTenantId bab3375b-6197-4a15-a44b-16c41faa91d7 -PrincipalId d6f6c88a-5b7a-455e-ba40-ce146d4d3671 -RoleDefinitionId acdd72a7-3385-48ef-bd42-f606fba81ae7 -Description mydef Name ManagedByTenantId PrincipalId RoleDefinitionId ---- ----------------- ----------- ---------------- @@ -45,7 +45,7 @@ Creates or updates a registration definition given the required parameters. ### Example 2 ```powershell -PS C> New-AzManagedServicesDefinition -DisplayName asd -ManagedByTenantId "bab3375b-6197-4a15-a44b-16c41faa91d7" -PrincipalId "d6f6c88a-5b7a-455e-ba40-ce146d4d3671" -RoleDefinitionId "acdd72a7-3385-48ef-bd42-f606fba81ae7" -PlanName plan -PlanPublisher publisher -PlanProduct product -PlanVersion 0.1 +PS C> New-AzManagedServicesDefinition -Name asd -ManagedByTenantId "bab3375b-6197-4a15-a44b-16c41faa91d7" -PrincipalId "d6f6c88a-5b7a-455e-ba40-ce146d4d3671" -RoleDefinitionId "acdd72a7-3385-48ef-bd42-f606fba81ae7" -PlanName plan -PlanPublisher publisher -PlanProduct product -PlanVersion 0.1 Name ManagedByTenantId PrincipalId RoleDefinitionId ---- ----------------- ----------- ---------------- @@ -101,21 +101,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -DisplayName -The display name of the Registration Definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ManagedByTenantId The ManagedBy Tenant Identifier. @@ -131,21 +116,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -The unique name of the Registration Definition (for example b0c052e5-c437-4771-a476-8b1201158a57). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -PlanName The name of the plan. @@ -221,6 +191,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -RegistrationDefinitionName +The name of the Registration Definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RoleDefinitionId The Managed Service Provider's Role Identifier. From f7b74fa01748e595ec4a3336d1ada5d1552c4b4e Mon Sep 17 00:00:00 2001 From: Saif Kayani Date: Mon, 21 Sep 2020 13:31:59 -0700 Subject: [PATCH 3/4] Updated breaking changes warnings --- src/ManagedServices/ManagedServices/ChangeLog.md | 1 + .../Commands/NewAzureRmManagedServicesAssignment.cs | 7 ++++++- .../Commands/NewAzureRmManagedServicesDefinition.cs | 7 ++++++- .../ManagedServices/Extensions/ManagedServicesUtility.cs | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/ManagedServices/ManagedServices/ChangeLog.md b/src/ManagedServices/ManagedServices/ChangeLog.md index 70a893f43094..c5d619ab9599 100644 --- a/src/ManagedServices/ManagedServices/ChangeLog.md +++ b/src/ManagedServices/ManagedServices/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Updated breaking change warnings on cmdlets of managed servics assignment and definition ## Version 1.1.0 * Added breaking change warnings on cmdlets of managed services assignment and definition diff --git a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesAssignment.cs b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesAssignment.cs index a938c1153768..1792bf257a41 100644 --- a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesAssignment.cs +++ b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesAssignment.cs @@ -42,6 +42,11 @@ public class NewAzureRmManagedServicesAssignment : ManagedServicesCmdletBase [ScopeCompleter] public string Scope { get; set; } + [CmdletParameterBreakingChange( + nameOfParameterChanging: "RegistrationDefinitionName", + deprecateByVersion: ManagedServicesUtility.UpcomingVersion, + changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate, + ChangeDescription = ManagedServicesUtility.DeprecatedParameterDescription)] [Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The registration definition identifier.")] [ValidateNotNullOrEmpty] public string RegistrationDefinitionName { get; set; } @@ -50,7 +55,7 @@ public class NewAzureRmManagedServicesAssignment : ManagedServicesCmdletBase nameOfParameterChanging: "RegistrationDefinitionResourceId", deprecateByVersion: ManagedServicesUtility.UpcomingVersion, changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate, - ChangeDescription = ManagedServicesUtility.DeprecatedParameterDescription)] + ReplaceMentCmdletParameterName = "RegistrationDefinitionId")] [Parameter(ParameterSetName = ByResourceIdParameterSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The fully qualified resource id of the registration definition.")] [ValidateNotNullOrEmpty] [Alias("ResourceId")] diff --git a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs index a5da0a046708..4918cc6f8163 100644 --- a/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs +++ b/src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs @@ -15,6 +15,7 @@ using Microsoft.Azure.Management.ManagedServices.Models; using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions; using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Collections.Generic; @@ -23,10 +24,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Commands { - [WindowsAzure.Commands.Common.CustomAttributes.GenericBreakingChange( + [GenericBreakingChange( message: "New mandatory parameter 'DisplayName' will be added to represent a user-friendly name for a registration definition", deprecateByVersion: ManagedServicesUtility.UpcomingVersion, changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate)] + [GenericBreakingChange( + message: "New mandatory parameter 'Authorization' will be added to represent a list containing principal IDs and role definition IDs.", + deprecateByVersion: ManagedServicesUtility.UpcomingVersion, + changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate)] [Cmdlet( VerbsCommon.New, Microsoft.Azure.Commands.ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ManagedServicesDefinition", diff --git a/src/ManagedServices/ManagedServices/Extensions/ManagedServicesUtility.cs b/src/ManagedServices/ManagedServices/Extensions/ManagedServicesUtility.cs index b120094a86b3..c524a7e05e75 100644 --- a/src/ManagedServices/ManagedServices/Extensions/ManagedServicesUtility.cs +++ b/src/ManagedServices/ManagedServices/Extensions/ManagedServicesUtility.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions public static class ManagedServicesUtility { // TODO: Remove these three string as well as breaking changes attributes for Oct. 27th change - public const string UpcomingVersion = "1.0.3"; + public const string UpcomingVersion = "1.3.0"; public const string UpcomingVersionReleaseDate = "10/27/2020"; public const string DeprecatedParameterDescription = "Parameter is being deprecated without being replaced"; From a1319efe9f58338bdb479cf58bde204bfe22068a Mon Sep 17 00:00:00 2001 From: Saif Kayani Date: Mon, 21 Sep 2020 14:01:37 -0700 Subject: [PATCH 4/4] Fixed typo in changelog --- src/ManagedServices/ManagedServices/ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ManagedServices/ManagedServices/ChangeLog.md b/src/ManagedServices/ManagedServices/ChangeLog.md index c5d619ab9599..e2638c8b2e0e 100644 --- a/src/ManagedServices/ManagedServices/ChangeLog.md +++ b/src/ManagedServices/ManagedServices/ChangeLog.md @@ -18,7 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release -* Updated breaking change warnings on cmdlets of managed servics assignment and definition +* Updated breaking change warnings on cmdlets of managed services assignment and definition ## Version 1.1.0 * Added breaking change warnings on cmdlets of managed services assignment and definition