Example #1
0
        public override void ExecuteCmdlet()
        {
            ConfirmAction(
                ProjectResources.DeleteDeploymentMessage,
                ResourceGroupName,
                () =>
            {
                var resourceGroupName = !string.IsNullOrEmpty(this.ResourceGroupName) ? this.ResourceGroupName : ResourceIdUtility.GetResourceGroupName(Id);
                var deploymentName    = !string.IsNullOrEmpty(this.Name) ? this.Name : ResourceIdUtility.GetResourceName(Id);

                ResourceManagerSdkClient.DeleteDeploymentAtResourceGroup(resourceGroupName, deploymentName);
                WriteObject(true);
            });
        }