private List<PricingTier> correctPricingTiers(final List<PricingTier> pricingTiers) { pricingTiers.remove(PricingTier.PREMIUM_P1); pricingTiers.remove(PricingTier.PREMIUM_P2); pricingTiers.remove(PricingTier.PREMIUM_P3); pricingTiers.add(new PricingTier("Premium", "P1V2")); pricingTiers.add(new PricingTier("Premium", "P2V2")); pricingTiers.add(new PricingTier("Premium", "P3V2")); return pricingTiers; }
@Override public FunctionAppImpl withNewConsumptionPlan() { return withNewAppServicePlan(OperatingSystem.WINDOWS, new PricingTier("Dynamic", "Y1")); }
public PricingTier getPricingTier() throws MojoExecutionException { return pricingTier == null ? new PricingTier("Premium", "P1V2") : pricingTier.toPricingTier(); }
/** * Parses a serialized value to an AppServicePricingTier instance. * * @param skuDescription the serialized value to parse. * @return the parsed AppServicePricingTier object, or null if unable to parse. */ public static PricingTier fromSkuDescription(SkuDescription skuDescription) { if (skuDescription == null) { return null; } return new PricingTier(skuDescription.tier(), skuDescription.size()); }
private AppServicePlan.DefinitionStages.WithCreate prepareWithCreate( @NotNull Azure azure, @NotNull WebAppSettingModel model) throws Exception { final String[] tierSize = model.getPricing().split("_"); if (tierSize.length != 2) { throw new Exception("Cannot get valid price tier"); } final PricingTier pricingTier = new PricingTier(tierSize[0], tierSize[1]); final AppServicePlan.DefinitionStages.WithGroup withGroup = azure .appServices() .appServicePlans() .define(model.getAppServicePlanName()) .withRegion(model.getRegion()); final AppServicePlan.DefinitionStages.WithPricingTier withPricingTier; final String resourceGroup = model.getResourceGroup(); if (model.isCreatingResGrp()) { withPricingTier = withGroup.withNewResourceGroup(resourceGroup); } else { withPricingTier = withGroup.withExistingResourceGroup(resourceGroup); } return withPricingTier.withPricingTier(pricingTier).withOperatingSystem(model.getOS()); }
WebApp app; Azure azure = AuthMethodManager.getInstance().getAzureClient(model.getSubscriptionId()); PricingTier pricingTier = new PricingTier(model.getPricingSkuTier(), model.getPricingSkuSize());