From f54d245ff411df520ee1e0f4206bdd4835945ad3 Mon Sep 17 00:00:00 2001 From: Jonathan Reynes <19974635+jontreynes@users.noreply.github.com> Date: Fri, 21 May 2021 15:22:05 -0400 Subject: [PATCH 1/6] Update TestAzureSubscriptionDeploymentCmdlet.cs --- .../Deployments/TestAzureSubscriptionDeploymentCmdlet.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs index a2853dccdf84..75fdb3dfadd1 100644 --- a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs +++ b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs @@ -29,6 +29,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation [Alias("Test-AzSubscriptionDeployment")] public class TestAzureSubscriptionDeploymentCmdlet : TestDeploymentCmdletBase { + [Alias("DeploymentName")] + [Parameter(Mandatory = false, + HelpMessage = "The name of the deployment it's going to create. If not specified, defaults to the template file name when a template file is provided; defaults to the current time when a template object is provided, e.g. \"20131223140835\".")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + [Parameter(Mandatory = true, HelpMessage = "The location to store deployment data.")] [LocationCompleter("Microsoft.Resources/resourceGroups")] [ValidateNotNullOrEmpty] @@ -40,6 +46,7 @@ protected override void OnProcessRecord() { ScopeType = DeploymentScopeType.Subscription, Location = Location, + DeploymentName = this.Name, TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), TemplateObject = TemplateObject, QueryString = QueryString, From b9b0aae3dc86c8fab01b241a3a3f2353b1aa0238 Mon Sep 17 00:00:00 2001 From: Jonathan Reynes Date: Fri, 21 May 2021 16:26:21 -0400 Subject: [PATCH 2/6] For TestAzureSubscriptionDeployment - If deployment name is null, then generate the name, otherwise, pass the deployment name --- .../ResourceManager/SdkClient/ResourceManagerSdkClient.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs b/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs index c1ce8cace0ec..20a09c4094b7 100644 --- a/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs +++ b/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs @@ -1671,7 +1671,9 @@ private void CancelDeploymentAtResourceGroup(List deployments, str /// The validation errors if there's any, or empty list otherwise. public virtual List ValidateDeployment(PSDeploymentCmdletParameters parameters) { - parameters.DeploymentName = GenerateDeploymentName(parameters); + if (parameters.DeploymentName == null){ + parameters.DeploymentName = GenerateDeploymentName(parameters); + } Deployment deployment = CreateBasicDeployment(parameters, parameters.DeploymentMode, null); var validationInfo = this.GetTemplateValidationResult(parameters, deployment); From 35def761c40d6da176596c2106f05c174889b652 Mon Sep 17 00:00:00 2001 From: Jonathan Reynes Date: Fri, 21 May 2021 16:38:11 -0400 Subject: [PATCH 3/6] Allow to specify deployment name for validate on management group, subscription, and tenant deployments --- .../TestAzureManagementGroupDeploymentCmdlet.cs | 7 +++++++ .../Deployments/TestAzureTenantDeploymentCmdlet.cs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs index 8e0f783e0ce9..ff165ab09431 100644 --- a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs +++ b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs @@ -28,6 +28,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation [Cmdlet(VerbsDiagnostic.Test, AzureRMConstants.AzureRMPrefix + "ManagementGroupDeployment", DefaultParameterSetName = ParameterlessTemplateFileParameterSetName), OutputType(typeof(PSResourceManagerError))] public class TestAzureManagementGroupDeploymentCmdlet : TestDeploymentCmdletBase { + [Alias("DeploymentName")] + [Parameter(Mandatory = false, + HelpMessage = "The name of the deployment it's going to create. If not specified, defaults to the template file name when a template file is provided; defaults to the current time when a template object is provided, e.g. \"20131223140835\".")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + [Parameter(Mandatory = true, HelpMessage = "The management group id.")] [ValidateNotNullOrEmpty] public string ManagementGroupId { get; set; } @@ -44,6 +50,7 @@ protected override void OnProcessRecord() ScopeType = DeploymentScopeType.ManagementGroup, ManagementGroupId = this.ManagementGroupId, Location = this.Location, + DeploymentName = this.Name, QueryString = QueryString, TemplateFile = this.TemplateUri ?? this.TryResolvePath(this.TemplateFile), TemplateObject = this.TemplateObject, diff --git a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs index 74225f662c7b..f17f8e7f2adc 100644 --- a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs +++ b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs @@ -29,6 +29,12 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation DefaultParameterSetName = ParameterlessTemplateFileParameterSetName), OutputType(typeof(PSResourceManagerError))] public class TestAzureTenantDeploymentCmdlet : TestDeploymentCmdletBase { + [Alias("DeploymentName")] + [Parameter(Mandatory = false, + HelpMessage = "The name of the deployment it's going to create. If not specified, defaults to the template file name when a template file is provided; defaults to the current time when a template object is provided, e.g. \"20131223140835\".")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + [Parameter(Mandatory = true, HelpMessage = "The location to store deployment data.")] [LocationCompleter("Microsoft.Resources/resourceGroups")] [ValidateNotNullOrEmpty] @@ -40,6 +46,7 @@ protected override void OnProcessRecord() { ScopeType = DeploymentScopeType.Tenant, Location = this.Location, + DeploymentName = this.Name, TemplateFile = this.TemplateUri ?? this.TryResolvePath(this.TemplateFile), TemplateObject = this.TemplateObject, QueryString = QueryString, From 9ed042c34e935ff65d8b10c92f3373d0090905e2 Mon Sep 17 00:00:00 2001 From: Jonathan Reynes Date: Wed, 26 May 2021 11:15:53 -0400 Subject: [PATCH 4/6] changelog Allow naming the deployment when testing deployments [#11497] --- src/Resources/Resources/ChangeLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Resources/Resources/ChangeLog.md b/src/Resources/Resources/ChangeLog.md index a202b1353f37..9e96c99e3162 100644 --- a/src/Resources/Resources/ChangeLog.md +++ b/src/Resources/Resources/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release +* Allow naming the deployment when testing deployments [#11497] ## Version 4.1.0 * Changed `-IdentifierUris` in `New-AzADApplication` to optional parameter From 65b05e95df43782d837e3c8750bee282f6d30d64 Mon Sep 17 00:00:00 2001 From: Jonathan Reynes Date: Mon, 24 May 2021 12:00:13 -0400 Subject: [PATCH 5/6] change help message --- .../Deployments/TestAzureManagementGroupDeploymentCmdlet.cs | 2 +- .../Deployments/TestAzureSubscriptionDeploymentCmdlet.cs | 2 +- .../Deployments/TestAzureTenantDeploymentCmdlet.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs index ff165ab09431..54aec7b27d48 100644 --- a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs +++ b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureManagementGroupDeploymentCmdlet.cs @@ -30,7 +30,7 @@ public class TestAzureManagementGroupDeploymentCmdlet : TestDeploymentCmdletBase { [Alias("DeploymentName")] [Parameter(Mandatory = false, - HelpMessage = "The name of the deployment it's going to create. If not specified, defaults to the template file name when a template file is provided; defaults to the current time when a template object is provided, e.g. \"20131223140835\".")] + HelpMessage = "The name of the deployment it's going to test. If not specified, defaults to the template file name when a template file is provided")] [ValidateNotNullOrEmpty] public string Name { get; set; } diff --git a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs index 75fdb3dfadd1..f390e4401aea 100644 --- a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs +++ b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureSubscriptionDeploymentCmdlet.cs @@ -31,7 +31,7 @@ public class TestAzureSubscriptionDeploymentCmdlet : TestDeploymentCmdletBase { [Alias("DeploymentName")] [Parameter(Mandatory = false, - HelpMessage = "The name of the deployment it's going to create. If not specified, defaults to the template file name when a template file is provided; defaults to the current time when a template object is provided, e.g. \"20131223140835\".")] + HelpMessage = "The name of the deployment it's going to test. If not specified, defaults to the template file name when a template file is provided")] [ValidateNotNullOrEmpty] public string Name { get; set; } diff --git a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs index f17f8e7f2adc..c5d18c0e089e 100644 --- a/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs +++ b/src/Resources/ResourceManager/Implementation/Deployments/TestAzureTenantDeploymentCmdlet.cs @@ -31,7 +31,7 @@ public class TestAzureTenantDeploymentCmdlet : TestDeploymentCmdletBase { [Alias("DeploymentName")] [Parameter(Mandatory = false, - HelpMessage = "The name of the deployment it's going to create. If not specified, defaults to the template file name when a template file is provided; defaults to the current time when a template object is provided, e.g. \"20131223140835\".")] + HelpMessage = "The name of the deployment it's going to test. If not specified, defaults to the template file name when a template file is provided")] [ValidateNotNullOrEmpty] public string Name { get; set; } From 4ab2fa1a17f6078e2acee1eb1adc31ad8895fd8c Mon Sep 17 00:00:00 2001 From: Jonathan Reynes Date: Mon, 24 May 2021 15:47:16 -0400 Subject: [PATCH 6/6] Update-MarkdownHelpModule --- .../help/Test-AzManagementGroupDeployment.md | 118 +++++++++++------- .../Resources/help/Test-AzTenantDeployment.md | 102 +++++++++------ 2 files changed, 132 insertions(+), 88 deletions(-) diff --git a/src/Resources/Resources/help/Test-AzManagementGroupDeployment.md b/src/Resources/Resources/help/Test-AzManagementGroupDeployment.md index e8f05c32a49b..722329e36b6c 100644 --- a/src/Resources/Resources/help/Test-AzManagementGroupDeployment.md +++ b/src/Resources/Resources/help/Test-AzManagementGroupDeployment.md @@ -14,107 +14,114 @@ Validates a deployment at a management group. ### ByTemplateFileWithNoParameters (Default) ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateObjectAndParameterObject ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterObject -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterObject -TemplateObject + [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateFileAndParameterObject ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterObject -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterObject -TemplateFile + [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateUriAndParameterObject ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterObject -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterObject -TemplateUri + [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] +``` + +### ByTemplateSpecResourceIdAndParamsObject +``` +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterObject -TemplateSpecId + [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateObjectAndParameterFile ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterFile -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterFile -TemplateObject + [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateFileAndParameterFile ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterFile -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterFile -TemplateFile [-SkipTemplateParameterPrompt] + [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateUriAndParameterFile ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterFile -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterFile -TemplateUri [-SkipTemplateParameterPrompt] + [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateSpecResourceIdAndParams ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterFile -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterFile -TemplateSpecId + [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateObjectAndParameterUri ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterUri -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterUri -TemplateObject + [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateFileAndParameterUri ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterUri -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterUri -TemplateFile [-SkipTemplateParameterPrompt] + [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateUriAndParameterUri ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterUri -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterUri -TemplateUri [-SkipTemplateParameterPrompt] + [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateSpecResourceIdAndParamsUri ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateParameterUri -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] - [-DefaultProfile ] [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateParameterUri -TemplateSpecId [-SkipTemplateParameterPrompt] + [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateObjectWithNoParameters ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateUriWithNoParameters ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateSpecResourceId ``` -Test-AzManagementGroupDeployment -ManagementGroupId -Location [-QueryString ] - -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzManagementGroupDeployment [-Name ] -ManagementGroupId -Location + [-QueryString ] -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -185,6 +192,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Name +The name of the deployment it's going to test. If not specified, defaults to the template file name when a template file is provided + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeploymentName + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Pre When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use. @@ -282,7 +304,7 @@ A hash table which represents the parameters. ```yaml Type: System.Collections.Hashtable -Parameter Sets: ByTemplateObjectAndParameterObject, ByTemplateFileAndParameterObject, ByTemplateUriAndParameterObject +Parameter Sets: ByTemplateObjectAndParameterObject, ByTemplateFileAndParameterObject, ByTemplateUriAndParameterObject, ByTemplateSpecResourceIdAndParamsObject Aliases: Required: True @@ -312,7 +334,7 @@ Resource ID of the templateSpec to be deployed. ```yaml Type: System.String -Parameter Sets: ByTemplateSpecResourceIdAndParams, ByTemplateSpecResourceIdAndParamsUri, ByTemplateSpecResourceId +Parameter Sets: ByTemplateSpecResourceIdAndParamsObject, ByTemplateSpecResourceIdAndParams, ByTemplateSpecResourceIdAndParamsUri, ByTemplateSpecResourceId Aliases: Required: True @@ -352,4 +374,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -## RELATED LINKS +## RELATED LINKS \ No newline at end of file diff --git a/src/Resources/Resources/help/Test-AzTenantDeployment.md b/src/Resources/Resources/help/Test-AzTenantDeployment.md index e7f094de45f8..f2732cd10540 100644 --- a/src/Resources/Resources/help/Test-AzTenantDeployment.md +++ b/src/Resources/Resources/help/Test-AzTenantDeployment.md @@ -14,102 +14,109 @@ Validates a deployment at tenant scope. ### ByTemplateFileWithNoParameters (Default) ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateFile +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateObjectAndParameterObject ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterObject - -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterObject -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateFileAndParameterObject ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterObject - -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterObject -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateUriAndParameterObject ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterObject - -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterObject -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] +``` + +### ByTemplateSpecResourceIdAndParamsObject +``` +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterObject -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateObjectAndParameterFile ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterFile - -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterFile -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateFileAndParameterFile ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterFile - -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterFile -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateUriAndParameterFile ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterFile - -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterFile -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateSpecResourceIdAndParams ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterFile - -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterFile -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateObjectAndParameterUri ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterUri - -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterUri -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateFileAndParameterUri ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterUri - -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterUri -TemplateFile [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateUriAndParameterUri ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterUri - -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterUri -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateSpecResourceIdAndParamsUri ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateParameterUri - -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] - [] +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] + -TemplateParameterUri -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] + [-DefaultProfile ] [] ``` ### ByTemplateObjectWithNoParameters ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateObject +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] -TemplateObject [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateUriWithNoParameters ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateUri +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] -TemplateUri [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` ### ByTemplateSpecResourceId ``` -Test-AzTenantDeployment -Location [-QueryString ] -TemplateSpecId +Test-AzTenantDeployment [-Name ] -Location [-QueryString ] -TemplateSpecId [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile ] [] ``` @@ -166,6 +173,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Name +The name of the deployment it's going to test. If not specified, defaults to the template file name when a template file is provided + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeploymentName + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Pre When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use. @@ -263,7 +285,7 @@ A hash table which represents the parameters. ```yaml Type: System.Collections.Hashtable -Parameter Sets: ByTemplateObjectAndParameterObject, ByTemplateFileAndParameterObject, ByTemplateUriAndParameterObject +Parameter Sets: ByTemplateObjectAndParameterObject, ByTemplateFileAndParameterObject, ByTemplateUriAndParameterObject, ByTemplateSpecResourceIdAndParamsObject Aliases: Required: True @@ -293,7 +315,7 @@ Resource ID of the templateSpec to be deployed. ```yaml Type: System.String -Parameter Sets: ByTemplateSpecResourceIdAndParams, ByTemplateSpecResourceIdAndParamsUri, ByTemplateSpecResourceId +Parameter Sets: ByTemplateSpecResourceIdAndParamsObject, ByTemplateSpecResourceIdAndParams, ByTemplateSpecResourceIdAndParamsUri, ByTemplateSpecResourceId Aliases: Required: True @@ -333,4 +355,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -## RELATED LINKS +## RELATED LINKS \ No newline at end of file