GetApplicationServiceEnvironmentResourceId() 정적인 개인적인 메소드

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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #4
0
        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));
        }
예제 #5
0
        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));
        }