public PSDeploymentWhatIfCmdletParameters(
     DeploymentScopeType scopeType,
     string deploymentName              = null,
     DeploymentMode mode                = DeploymentMode.Incremental,
     string location                    = null,
     string managementGroupId           = null,
     string queryString                 = null,
     string resourceGroupName           = null,
     string templateUri                 = null,
     string templateSpecId              = null,
     string templateParametersUri       = null,
     Hashtable templateObject           = null,
     Hashtable templateParametersObject = null,
     WhatIfResultFormat resultFormat    = WhatIfResultFormat.FullResourcePayloads,
     string[] excludeChangeTypes        = null)
 {
     this.DeploymentName           = deploymentName ?? this.GenerateDeployName();
     this.ScopeType                = scopeType;
     this.Mode                     = mode;
     this.Location                 = location;
     this.ManagementGroupId        = managementGroupId;
     this.QueryString              = queryString;
     this.ResourceGroupName        = resourceGroupName;
     this.TemplateUri              = templateUri;
     this.TemplateParametersUri    = templateParametersUri;
     this.TemplateObject           = templateObject;
     this.TemplateSpecId           = templateSpecId;
     this.TemplateParametersObject = templateParametersObject;
     this.ResultFormat             = resultFormat;
     this.ExcludeChangeTypes       = excludeChangeTypes?
                                     .Select(changeType => changeType.ToLowerInvariant())
                                     .Distinct()
                                     .Select(changeType => (ChangeType)Enum.Parse(typeof(ChangeType), changeType, true));
 }
Exemple #2
0
 public FilterDeploymentOptions(DeploymentScopeType scopeType)
 {
     ScopeType                  = scopeType;
     DeploymentName             = null;
     ManagementGroupId          = null;
     ResourceGroupName          = null;
     ProvisioningStates         = new List <string>();
     ExcludedProvisioningStates = new List <string>();
 }