Skip to content

[Draft] Deployment stacks preview 2 to master #1

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

Closed
wants to merge 110 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
ea8e8b3
stacks initial commit
Xynoclafe Jun 17, 2021
36de8c3
Merge branch 'Azure:main' into DeploymentStacks
Xynoclafe Jun 21, 2021
592eaf7
Added New cmdlets
Xynoclafe Jun 22, 2021
0ea9a21
Add remaining cmdlets
Xynoclafe Jun 24, 2021
d3743a2
Export cmdlets and fix bugs
Xynoclafe Jul 1, 2021
3e51378
Added stack existence checks for New- and Set-
Xynoclafe Jul 1, 2021
2996019
Finished GetAzResourceGroupDeploymentStack cmdnlet [Not tested]
Jul 6, 2021
da36bc2
Bug fixes
Xynoclafe Jul 6, 2021
caebb5c
Merge branch 'DeploymentStacks' of https://github.com/Xynoclafe/azure…
Xynoclafe Jul 6, 2021
d902ce1
Finished GetAzResourceGroupDeploymentStackSnapshot [Needs further tes…
Jul 7, 2021
85e6b5f
Fix snapshot cmdlets
Xynoclafe Jul 7, 2021
dfac372
Finished Test-GetResourceGroupDeploymentStackSnapshot function [Needs…
Jul 8, 2021
9fe082c
Started on Remove Scenario Tests
Jul 9, 2021
d4e45c6
Finished Test-RemoveResourceGroupDeploymentStack [Needs Testing]
Jul 12, 2021
6f26ce8
Fix Get-subscription cmdlets
Xynoclafe Jul 12, 2021
625a946
Merge branch 'DeploymentStacks' of https://github.com/Xynoclafe/azure…
Xynoclafe Jul 12, 2021
74efcff
clarify error messages and format console output
Xynoclafe Jul 15, 2021
eea37a8
Updated Test-GetResourceGroupDeploymentStackSnapshot
Jul 16, 2021
77a202d
Finished Test-NewResourceGroupDeploymentStack
Jul 20, 2021
d2356ad
Finished Test-NewSubscriptionDeploymentStack [Needs Review]
Jul 20, 2021
c1f92bb
Further changes to Test-NewSubscriptionDeploymentStack
Jul 20, 2021
e5b53eb
Small edits
Jul 21, 2021
208b9f9
Finished Test-RemoveSubscriptionDeploymentStackSnapshot [Needs Testing]
Jul 22, 2021
a57da58
Finished Test-RemoveResourceGroupDeploymentStackSnapshot [Needs Testing]
Jul 22, 2021
1d4bb71
Finished Test-SetSubscriptionDeploymentStack & Test-SetResourceGroupD…
Jul 22, 2021
1c84b1e
Merge branch 'Azure:main' into DeploymentStacks
Xynoclafe Jul 26, 2021
a561d3f
Included the new test scripts into test runner
Xynoclafe Jul 26, 2021
3f8542f
Removed hard gates from new and set cmdlets
Xynoclafe Jul 26, 2021
87968fb
Improved errors + updated SDK
Xynoclafe Jul 27, 2021
8b872f6
Finished Test-NewAndSetResourceGroupDeploymentStackWithTemplateSpec […
Jul 29, 2021
06ef7f8
Finished Test-NewAndSetSubscriptionDeploymentStackWithTemplateSpec [N…
Jul 30, 2021
10213b1
Merge branch 'Azure:main' into DeploymentStacks
Xynoclafe Jul 30, 2021
b2d4db2
Fixed provisionState check for the NewAndSet tests with template specs
Jul 30, 2021
2132b7c
Updated SDK + purge delete support
Xynoclafe Aug 2, 2021
df3085a
Merge branch 'DeploymentStacks' of https://github.com/Xynoclafe/azure…
Xynoclafe Aug 2, 2021
eb5373d
Test fixes and recordings
Xynoclafe Aug 5, 2021
5c9df43
Test recording - subscriptionGet
Xynoclafe Aug 5, 2021
5b61d41
Test recording - subscriptionSnapshotGet
Xynoclafe Aug 5, 2021
f9b0647
Test recordings
Xynoclafe Aug 6, 2021
d733b01
Add StackName alias to -Name parameter
Xynoclafe Aug 10, 2021
3912597
Finished testing Scenario test [need to do playback]
Aug 10, 2021
0b8f12c
Fix build failures
Xynoclafe Aug 10, 2021
299d04b
Moved scenario tests to the playback directory, all tests accept for …
Aug 11, 2021
6a43c15
Added optional -UpdateBehavior for New cmdlets and added polling to N…
Xynoclafe Aug 11, 2021
082c08e
Merge branch 'DeploymentStacks' of https://github.com/Xynoclafe/azure…
Xynoclafe Aug 11, 2021
150c6f1
Added deployment scope paramter to new and set RG & sub [Needs testing]
Aug 12, 2021
a8c415b
Added -AsJOb to New and Set cmdlets and more terminating statuses for…
Xynoclafe Aug 12, 2021
83e5ec7
Re-record tests
Xynoclafe Aug 12, 2021
260df64
Modified New/Set cmdlet confirmation messages to use DeploymentStack …
Xynoclafe Aug 16, 2021
89258a1
Fixed typo in detached resources preventing it from showing in output
Xynoclafe Aug 16, 2021
ff198c3
Renamed some parameters
Xynoclafe Aug 24, 2021
2409dc4
Fix API version used for polling cascade delete requests
Xynoclafe Sep 7, 2021
878e38d
merge upstream
Xynoclafe Sep 7, 2021
15f8462
Change updateBehavior to enum
Xynoclafe Sep 8, 2021
923e518
few parameter names changed, new parameter -TemplateParameterObject a…
Xynoclafe Sep 13, 2021
ea93530
Updated SDK to fix parsing of FailedResources and updated output form…
Xynoclafe Sep 15, 2021
bdc63c3
Updated error messages; Removed scope-less aliases; changed -Purge to…
Xynoclafe Sep 21, 2021
648a131
Parameter renames
Xynoclafe Oct 8, 2021
a5a72bd
Removed purge delete flag
Xynoclafe Oct 19, 2021
b3db00c
Added piping support and real time debug/verbose logs. Updated Versio…
Xynoclafe Nov 11, 2021
cd0272d
merge fixes
Xynoclafe Nov 11, 2021
8c8713e
Corrected Az.Resources manifest to include stacks cmdlets
Xynoclafe Nov 12, 2021
8c814d7
Stacks now outputs errors correctly, 2 tests failing
harshpatel17 Apr 21, 2022
d491dda
Fixed nit, 2 tests still failing
harshpatel17 Apr 22, 2022
208a8cb
New scenario tests
harshpatel17 May 2, 2022
73375f6
nit changes
harshpatel17 May 2, 2022
3628d39
Updated the moduleversion
harshpatel17 May 4, 2022
539efb8
Updated module number to 9.0.2 for release
harshpatel17 Jun 16, 2022
6aff57e
initial work on new stacks api
dantedallag Sep 21, 2022
ca9a340
Merge branch 'main' of https://github.com/Azure/azure-powershell into…
Xynoclafe Sep 26, 2022
315809f
working on implementing commands
dantedallag Sep 26, 2022
0414344
more work on commands
dantedallag Sep 28, 2022
da5af36
Bicep support for DeploymentStacks
Xynoclafe Sep 28, 2022
9ff034a
Merge branch 'DeploymentStacks' of https://github.com/Xynoclafe/azure…
Xynoclafe Sep 28, 2022
20c328a
Fixed broken DeploymentStackTests
Xynoclafe Sep 28, 2022
dfaf63f
Test cases + fixed bicep function
Xynoclafe Sep 30, 2022
f389059
Implementing rest of stacks commands and tests
dantedallag Sep 28, 2022
0c7d8a1
working on refactor of DeploymentScope
dantedallag Oct 6, 2022
19febbc
Resolving bug bash issues
dantedallag Oct 13, 2022
5dfe415
more work with bugbash fixes
dantedallag Oct 24, 2022
042bfe5
adjusted confirmation message in remove/new
dantedallag Oct 24, 2022
415c284
refactoring tests
dantedallag Oct 27, 2022
a3fc9e7
working on testing and small bug fixes
dantedallag Nov 2, 2022
27505b6
running/saving scenario test runs
dantedallag Nov 4, 2022
deb54e3
working on cmdlets
dantedallag Nov 21, 2022
f786b99
working on final changes to commands
dantedallag Nov 29, 2022
35acd23
adjusting scenario tests
dantedallag Dec 13, 2022
61358aa
checking in session records for rg and sub stack tests
dantedallag Dec 13, 2022
96842f0
small test change
dantedallag Dec 13, 2022
24f41bb
Remove data plane actions from deny settings parameters
dantedallag Dec 14, 2022
c1bd480
adding marksdown files for stack commands
dantedallag Dec 29, 2022
616f7fd
adding tags
dantedallag Jan 26, 2023
b66a5fc
update tag view
dantedallag Jan 26, 2023
187764d
changes for incremental release
dantedallag Feb 1, 2023
8cbe578
adding resources view file changes
dantedallag Feb 1, 2023
a65ba9b
updated resources ps1xml file
dantedallag Feb 8, 2023
5d6a1a9
finalizing management group scenario testing
dantedallag Feb 13, 2023
4e079f4
Fixed management group remove by id parameter set
dantedallag Feb 13, 2023
0380907
Poll deployment operations to ensure -Verbose parity with deployments…
Xynoclafe Oct 27, 2022
38d8421
Enable verbose dpeloyment operation logging and make it best effort
Xynoclafe Mar 9, 2023
5ba8e31
Modify SDKClient constructor to be private
Xynoclafe Mar 20, 2023
e09eb86
cleaning up powershell repo
dantedallag Mar 22, 2023
dc92cd1
add back placeholder in local folder
dantedallag Mar 22, 2023
1c33c08
more cleanup of unintended changes
dantedallag Mar 22, 2023
01217c2
cleaning up snapsnot code and unused imports
dantedallag Mar 23, 2023
57f735f
revert test file
dantedallag Mar 23, 2023
18e8df2
make DenySettingsMode required in new/set commands
dantedallag Apr 11, 2023
0e1d4bd
updated tests for required denysettings mode
dantedallag Apr 11, 2023
dd4f283
updating scenario tests
dantedallag Apr 20, 2023
2ae973a
changing up test templates to avoid RG deletes, halving execution time
dantedallag Apr 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<clear/>
<!-- Do not add any additional feeds if new packages are needed they need to come from nuget.org or our azure-sdk-for-net DevOps feed -->
<add key="local-feed" value="tools/LocalFeed" />
<add key="azure-powershell" value="https://pkgs.dev.azure.com/azclitools/public/_packaging/azure-powershell/nuget/v3/index.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class ResourceIdentifier

public string Subscription { get; set; }

public string ManagementGroupName { get; set; }

public ResourceIdentifier() { }

public ResourceIdentifier(string idFromServer)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Utilities;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using System.Collections;

namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
public abstract class DeploymentStacksCmdletBase : ResourceManagerCmdletBase
{

/// <summary>
/// Deployment stacks client instance field
/// </summary>
private DeploymentStacksSdkClient deploymentStacksSdkClient;

/// <summary>
/// Gets or sets the deployment stacks sdk client
/// </summary>
public DeploymentStacksSdkClient DeploymentStacksSdkClient
{
get
{
if (this.deploymentStacksSdkClient == null)
{
this.deploymentStacksSdkClient = new DeploymentStacksSdkClient(DefaultContext);
}

this.deploymentStacksSdkClient.VerboseLogger = WriteVerboseWithTimestamp;
this.deploymentStacksSdkClient.ErrorLogger = WriteErrorWithTimestamp;
this.deploymentStacksSdkClient.WarningLogger = WriteWarningWithTimestamp;

return this.deploymentStacksSdkClient;
}

set
{
this.deploymentStacksSdkClient = value;
}
}

protected string ResolveBicepFile(string TemplateFile)
{
string filePath = "";
if (BicepUtility.IsBicepFile(TemplateFile))
{
filePath = BicepUtility.BuildFile(this.ResolvePath(TemplateFile), this.WriteVerbose, this.WriteWarning);
return filePath;
}
else
return TemplateFile;

}

protected Hashtable GetParameterObject(string parameterFile)
{
var parameters = new Hashtable();
string templateParameterFilePath = this.ResolvePath(parameterFile);
if (parameterFile != null && FileUtilities.DataStore.FileExists(templateParameterFilePath))
{
var parametersFromFile = TemplateUtility.ParseTemplateParameterFileContents(templateParameterFilePath);
parametersFromFile.ForEach(dp =>
{
var parameter = new Hashtable();
if (dp.Value.Value != null)
{
parameter.Add("value", dp.Value.Value);
}
if (dp.Value.Reference != null)
{
parameter.Add("reference", dp.Value.Reference);
}

parameters[dp.Key] = parameter;
});
}
return parameters;
}

protected Hashtable GetTemplateParameterObject(Hashtable templateParameterObject)
{
//create a new Hashtable so that user can re-use the templateParameterObject.
var parameterObject = new Hashtable();
foreach (var parameterKey in templateParameterObject.Keys)
{
// Let default behavior of a value parameter if not a KeyVault reference Hashtable
var hashtableParameter = templateParameterObject[parameterKey] as Hashtable;
if (hashtableParameter != null && hashtableParameter.ContainsKey("reference"))
{
parameterObject[parameterKey] = templateParameterObject[parameterKey];
}
else
{
parameterObject[parameterKey] = new Hashtable { { "value", templateParameterObject[parameterKey] } };
}
}
return parameterObject;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
using System;
using System.Management.Automation;

[Cmdlet("Export", Common.AzureRMConstants.AzureRMPrefix + "ManagementGroupDeploymentStackTemplate",
DefaultParameterSetName = ExportByNameAndManagementGroupIdParameterSetName), OutputType(typeof(PSDeploymentStackTemplateDefinition))]
public class ExportAzManagementGroupDeploymentStackTemplate : DeploymentStacksCmdletBase
{
#region Cmdlet Parameters and Parameter Set Definitions

internal const string ExportByResourceIdParameterSetName = "ExportByResourceId";
internal const string ExportByNameAndManagementGroupIdParameterSetName = "ExportByNameAndManagmentGroupId";

[Alias("Id")]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByResourceIdParameterSetName,
HelpMessage = "ResourceId of the DeploymentStack to get")]
[ValidateNotNullOrEmpty]
public string ResourceId { get; set; }

[Alias("StackName")]
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByNameAndManagementGroupIdParameterSetName,
HelpMessage = "The name of the DeploymentStack to get")]
[ValidateNotNullOrEmpty]
public string Name { get; set; }

[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByNameAndManagementGroupIdParameterSetName,
HelpMessage = "The id of the ManagementGroup where the DeploymentStack is deployed")]
[ValidateNotNullOrEmpty]
public string ManagementGroupId { get; set; }

#endregion

#region Cmdlet Overrides
protected override void OnProcessRecord()
{
try
{
switch (ParameterSetName)
{
case ExportByResourceIdParameterSetName:
ManagementGroupId = ResourceIdUtility.GetManagementGroupId(ResourceId);
Name = ResourceIdUtility.GetDeploymentName(ResourceId);
if (ManagementGroupId == null || Name == null)
{
throw new PSArgumentException($"Provided Id '{ResourceId}' is not in correct form. Should be in form " +
"/providers/Microsoft.Management/managementGroups/<managementgroupid>/providers/Microsoft.Resources/deploymentStacks/<stackname>");
}
WriteObject(DeploymentStacksSdkClient.ExportManagementGroupDeploymentStack(ManagementGroupId, Name), true);
break;
case ExportByNameAndManagementGroupIdParameterSetName:
WriteObject(DeploymentStacksSdkClient.ExportManagementGroupDeploymentStack(ManagementGroupId, Name), true);
break;
default:
throw new PSInvalidOperationException();
}
}
catch (Exception ex)
{
WriteExceptionError(ex);
}
}

#endregion
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using System;
using System.Management.Automation;

[Cmdlet("Export", Common.AzureRMConstants.AzureRMPrefix + "ResourceGroupDeploymentStackTemplate",
DefaultParameterSetName = ExportByNameAndResourceGroupNameParameterSetName), OutputType(typeof(PSDeploymentStackTemplateDefinition))]
public class ExportAzResourceGroupDeploymentStackTemplate : DeploymentStacksCmdletBase
{
#region Cmdlet Parameters and Parameter Set Definitions

internal const string ExportByResourceIdParameterSetName = "ExportByResourceId";
internal const string ExportByNameAndResourceGroupNameParameterSetName = "ExportByNameAndResourceGroupName";

[Alias("Id")]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByResourceIdParameterSetName,
HelpMessage = "ResourceId of the DeploymentStack to get")]
[ValidateNotNullOrEmpty]
public string ResourceId { get; set; }

[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByNameAndResourceGroupNameParameterSetName,
HelpMessage = "The name of the ResourceGroup where the DeploymentStack is deployed")]
[ResourceGroupCompleter]
[ValidateNotNullOrEmpty]
public string ResourceGroupName { get; set; }

[Alias("StackName")]
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByNameAndResourceGroupNameParameterSetName,
HelpMessage = "The name of the DeploymentStack to get")]
[ValidateNotNullOrEmpty]
public string Name { get; set; }

#endregion

#region Cmdlet Overrides

protected override void OnProcessRecord()
{
try
{
switch (ParameterSetName)
{
case ExportByResourceIdParameterSetName:
ResourceGroupName = ResourceIdUtility.GetResourceGroupName(ResourceId);
Name = ResourceIdUtility.GetDeploymentName(ResourceId);
if (ResourceGroupName == null || Name == null)
{
throw new PSArgumentException($"Provided Id '{ResourceId}' is not in correct form. Should be in form " +
"/subscriptions/<subid>/resourceGroups/<rgname>/providers/Microsoft.Resources/deploymentStacks/<stackname>");
}
WriteObject(DeploymentStacksSdkClient.ExportResourceGroupDeploymentStack(ResourceGroupName, Name), true);
break;
case ExportByNameAndResourceGroupNameParameterSetName:
WriteObject(DeploymentStacksSdkClient.ExportResourceGroupDeploymentStack(ResourceGroupName, Name), true);
break;
default:
throw new PSInvalidOperationException();
}
}
catch (Exception ex)
{
WriteExceptionError(ex);
}
}

#endregion
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{

using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
using System;
using System.Management.Automation;

[Cmdlet("Export", Common.AzureRMConstants.AzureRMPrefix + "SubscriptionDeploymentStackTemplate",
DefaultParameterSetName = ExportByNameParameterSetName), OutputType(typeof(PSDeploymentStackTemplateDefinition))]
public class ExportAzSubscriptionDeploymentStackTemplate : DeploymentStacksCmdletBase
{
#region Cmdlet Parameters and Parameter Set Definitions

internal const string ExportByResourceIdParameterSetName = "ExportByResourceId";
internal const string ExportByNameParameterSetName = "ExportByName";

[Alias("Id")]
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByResourceIdParameterSetName,
HelpMessage = "ResourceId of the DeploymentStack to get")]
[ValidateNotNullOrEmpty]
public string ResourceId { get; set; }

[Alias("StackName")]
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ExportByNameParameterSetName,
HelpMessage = "The name of the DeploymentStack to get")]
[ValidateNotNullOrEmpty]
public string Name { get; set; }

#endregion

#region Cmdlet Overrides
protected override void OnProcessRecord()
{
try
{
switch (ParameterSetName)
{
case ExportByResourceIdParameterSetName:
Name = ResourceIdUtility.GetDeploymentName(ResourceId);
if (Name == null)
{
throw new PSArgumentException($"Provided Id '{ResourceId}' is not in correct form. Should be in form " +
"/subscriptions/<subid>/providers/Microsoft.Resources/deploymentStacks/<stackname>");
}
WriteObject(DeploymentStacksSdkClient.ExportSubscriptionDeploymentStack(Name), true);
break;
case ExportByNameParameterSetName:
WriteObject(DeploymentStacksSdkClient.ExportSubscriptionDeploymentStack(Name), true);
break;
default:
throw new PSInvalidOperationException();
}
}
catch (Exception ex)
{
WriteExceptionError(ex);
}
}

#endregion
}
}
Loading