static private GetApplicationServiceEnvironmentResourceId ( string subscriptionId, string resourceGroupName, string applicationServiceEnvironmentName ) : string | ||
subscriptionId | string | |
resourceGroupName | string | |
applicationServiceEnvironmentName | string | |
리턴 | string |
public ServerFarmWithRichSku CreateAppServicePlan(string resourceGroupName, string appServicePlanName, string location, string adminSiteName, SkuDescription sku, string aseName = null, string aseResourceGroupName = null, bool?perSiteScaling = false) { var serverFarm = new ServerFarmWithRichSku { Location = location, #if !NETSTANDARD ServerFarmWithRichSkuName = appServicePlanName, #else Name = appServicePlanName, #endif Sku = sku, AdminSiteName = adminSiteName, PerSiteScaling = perSiteScaling }; if (!string.IsNullOrEmpty(aseName) && !string.IsNullOrEmpty(aseResourceGroupName)) { serverFarm.HostingEnvironmentProfile = new HostingEnvironmentProfile( id: CmdletHelpers.GetApplicationServiceEnvironmentResourceId(WrappedWebsitesClient.SubscriptionId, aseResourceGroupName, aseName), name: aseName, type: CmdletHelpers.ApplicationServiceEnvironmentResourcesName); } return(WrappedWebsitesClient.AppServicePlans().CreateOrUpdateServerFarm(resourceGroupName, appServicePlanName, serverFarm)); }
internal static HostingEnvironmentProfile CreateHostingEnvironmentProfile(string subscriptionId, string resourceGroupName, string aseResourceGroupName, string aseName) { var rg = string.IsNullOrEmpty(aseResourceGroupName) ? resourceGroupName : aseResourceGroupName; var aseResourceId = CmdletHelpers.GetApplicationServiceEnvironmentResourceId(subscriptionId, rg, aseName); return(new HostingEnvironmentProfile( aseResourceId, CmdletHelpers.ApplicationServiceEnvironmentResourcesName, aseName)); }
public AppServicePlan CreateOrUpdateAppServicePlan(string resourceGroupName, string appServicePlanName, AppServicePlan appServicePlan, string aseName = null, string aseResourceGroupName = null) { if (!string.IsNullOrEmpty(aseName) && !string.IsNullOrEmpty(aseResourceGroupName)) { appServicePlan.HostingEnvironmentProfile = new HostingEnvironmentProfile( id: CmdletHelpers.GetApplicationServiceEnvironmentResourceId(WrappedWebsitesClient.SubscriptionId, aseResourceGroupName, aseName), name: aseName, type: CmdletHelpers.ApplicationServiceEnvironmentResourcesName); } return(WrappedWebsitesClient.AppServicePlans().CreateOrUpdate(resourceGroupName, appServicePlanName, appServicePlan)); }
public AppServicePlan CreateAppServicePlan(string resourceGroupName, string appServicePlanName, string location, string adminSiteName, SkuDescription sku, string aseName = null, string aseResourceGroupName = null, bool?perSiteScaling = false) { var appServicePlan = new AppServicePlan { Location = location, AppServicePlanName = appServicePlanName, Sku = sku, AdminSiteName = adminSiteName, PerSiteScaling = perSiteScaling }; if (!string.IsNullOrEmpty(aseName) && !string.IsNullOrEmpty(aseResourceGroupName)) { appServicePlan.HostingEnvironmentProfile = new HostingEnvironmentProfile( id: CmdletHelpers.GetApplicationServiceEnvironmentResourceId(WrappedWebsitesClient.SubscriptionId, aseResourceGroupName, aseName), name: aseName, type: CmdletHelpers.ApplicationServiceEnvironmentResourcesName); } return(WrappedWebsitesClient.AppServicePlans().CreateOrUpdate(resourceGroupName, appServicePlanName, appServicePlan)); }
public ServerFarmWithRichSku CreateAppServicePlan(string resourceGroupName, string appServicePlanName, string location, string adminSiteName, SkuDescription sku, string aseName = null, string aseResourceGroupName = null) { var serverFarm = new ServerFarmWithRichSku { Location = location, ServerFarmWithRichSkuName = appServicePlanName, Sku = sku, AdminSiteName = adminSiteName }; if (!string.IsNullOrEmpty(aseName) && !string.IsNullOrEmpty(aseResourceGroupName)) { serverFarm.HostingEnvironmentProfile = new HostingEnvironmentProfile { Id = CmdletHelpers.GetApplicationServiceEnvironmentResourceId(WrappedWebsitesClient.SubscriptionId, aseResourceGroupName, aseName), Type = CmdletHelpers.ApplicationServiceEnvironmentResourcesName, Name = aseName }; } return(WrappedWebsitesClient.ServerFarms.CreateOrUpdateServerFarm(resourceGroupName, appServicePlanName, serverFarm)); }