public override void ExecuteCmdlet() { CreatePSResourceGroupDeploymentParameters parameters = new CreatePSResourceGroupDeploymentParameters() { ResourceGroupName = ResourceGroupName, DeploymentName = Name, DeploymentMode = Mode, TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject), ParameterUri = TemplateParameterUri, DeploymentDebugLogLevel = GetDeploymentDebugLogLevel(DeploymentDebugLogLevel) }; if (this.Mode == DeploymentMode.Complete) { this.ConfirmAction( this.Force, "Are you sure you want to use the complete deployment mode? Resources in the resource group '" + ResourceGroupName + "' which are not included in the template will be deleted.", "Creating a deployment with Complete mode", ResourceGroupName, () => { WriteObject(ResourcesClient.ExecuteDeployment(parameters)); }); } else { WriteObject(ResourcesClient.ExecuteDeployment(parameters)); } }
public override void ExecuteCmdlet() { CreatePSResourceGroupDeploymentParameters parameters = new CreatePSResourceGroupDeploymentParameters() { ResourceGroupName = ResourceGroupName, DeploymentName = Name, GalleryTemplateIdentity = GalleryTemplateIdentity, TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject), TemplateVersion = TemplateVersion, StorageAccountName = StorageAccountName }; WriteObject(ResourcesClient.ExecuteDeployment(parameters)); }
public override void ExecuteCmdlet() { CreatePSResourceGroupDeploymentParameters parameters = new CreatePSResourceGroupDeploymentParameters() { ResourceGroupName = ResourceGroupName, DeploymentName = Name, DeploymentMode = Mode, GalleryTemplateIdentity = GalleryTemplateIdentity, TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject), ParameterUri = TemplateParameterUri, TemplateVersion = TemplateVersion, StorageAccountName = StorageAccountName }; if (!string.IsNullOrEmpty(TemplateVersion) || !string.IsNullOrEmpty(StorageAccountName) || !string.IsNullOrEmpty(GalleryTemplateIdentity)) { WriteWarning("The GalleryTemplateIdentity, TemplateVersion and StorageAccountName parameters in New-AzureResourceGroupDeployment cmdlet is being deprecated and will be removed in a future release."); } if (this.Mode == DeploymentMode.Complete) { this.ConfirmAction( this.Force, "Are you sure you want to use the complete deployment mode? Resources in the resource group '" + ResourceGroupName + "' which are not included in the template will be deleted.", "Creating a deployment with Complete mode", ResourceGroupName, () => { WriteObject(ResourcesClient.ExecuteDeployment(parameters)); }); } else { WriteObject(ResourcesClient.ExecuteDeployment(parameters)); } }
public override void ExecuteCmdlet() { WriteWarning("The output object type of this cmdlet will be modified in a future release."); CreatePSResourceGroupDeploymentParameters parameters = new CreatePSResourceGroupDeploymentParameters() { ResourceGroupName = ResourceGroupName, DeploymentName = Name, DeploymentMode = Mode, TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject), ParameterUri = TemplateParameterUri, DeploymentDebugLogLevel = GetDeploymentDebugLogLevel(DeploymentDebugLogLevel) }; if (!string.IsNullOrEmpty(parameters.DeploymentDebugLogLevel)) { WriteWarning("The DeploymentDebug setting has been enabled. This can potentially log secrets like passwords used in resource property or listKeys operations when you retrieve the deployment operations through Get-AzureRmResourceGroupDeploymentOperation"); } if (this.Mode == DeploymentMode.Complete) { this.ConfirmAction( this.Force, "Are you sure you want to use the complete deployment mode? Resources in the resource group '" + ResourceGroupName + "' which are not included in the template will be deleted.", "Creating a deployment with Complete mode", ResourceGroupName, () => { WriteObject(ResourcesClient.ExecuteDeployment(parameters)); }); } else { WriteObject(ResourcesClient.ExecuteDeployment(parameters)); } }