All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.web.AppServicePlan Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.web;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.web.AppServicePlanArgs;
import com.pulumi.azurenative.web.outputs.ExtendedLocationResponse;
import com.pulumi.azurenative.web.outputs.HostingEnvironmentProfileResponse;
import com.pulumi.azurenative.web.outputs.KubeEnvironmentProfileResponse;
import com.pulumi.azurenative.web.outputs.SkuDescriptionResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * App Service plan.
 * Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * 
 * Other available API versions: 2016-09-01, 2020-10-01, 2023-01-01, 2023-12-01, 2024-04-01.
 * 
 * ## Example Usage
 * ### Create Or Update App Service plan
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.web.AppServicePlan;
 * import com.pulumi.azurenative.web.AppServicePlanArgs;
 * import com.pulumi.azurenative.web.inputs.SkuDescriptionArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var appServicePlan = new AppServicePlan("appServicePlan", AppServicePlanArgs.builder()
 *             .kind("app")
 *             .location("East US")
 *             .name("testsf6141")
 *             .resourceGroupName("testrg123")
 *             .sku(SkuDescriptionArgs.builder()
 *                 .capacity(1)
 *                 .family("P")
 *                 .name("P1")
 *                 .size("P1")
 *                 .tier("Premium")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:web:AppServicePlan testsf6141 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name} * ``` * */ @ResourceType(type="azure-native:web:AppServicePlan") public class AppServicePlan extends com.pulumi.resources.CustomResource { /** * ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku * */ @Export(name="elasticScaleEnabled", refs={Boolean.class}, tree="[0]") private Output elasticScaleEnabled; /** * @return ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku * */ public Output> elasticScaleEnabled() { return Codegen.optional(this.elasticScaleEnabled); } /** * Extended Location. * */ @Export(name="extendedLocation", refs={ExtendedLocationResponse.class}, tree="[0]") private Output extendedLocation; /** * @return Extended Location. * */ public Output> extendedLocation() { return Codegen.optional(this.extendedLocation); } /** * The time when the server farm free offer expires. * */ @Export(name="freeOfferExpirationTime", refs={String.class}, tree="[0]") private Output freeOfferExpirationTime; /** * @return The time when the server farm free offer expires. * */ public Output> freeOfferExpirationTime() { return Codegen.optional(this.freeOfferExpirationTime); } /** * Geographical location for the App Service plan. * */ @Export(name="geoRegion", refs={String.class}, tree="[0]") private Output geoRegion; /** * @return Geographical location for the App Service plan. * */ public Output geoRegion() { return this.geoRegion; } /** * Specification for the App Service Environment to use for the App Service plan. * */ @Export(name="hostingEnvironmentProfile", refs={HostingEnvironmentProfileResponse.class}, tree="[0]") private Output hostingEnvironmentProfile; /** * @return Specification for the App Service Environment to use for the App Service plan. * */ public Output> hostingEnvironmentProfile() { return Codegen.optional(this.hostingEnvironmentProfile); } /** * If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. * */ @Export(name="hyperV", refs={Boolean.class}, tree="[0]") private Output hyperV; /** * @return If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. * */ public Output> hyperV() { return Codegen.optional(this.hyperV); } /** * If <code>true</code>, this App Service Plan owns spot instances. * */ @Export(name="isSpot", refs={Boolean.class}, tree="[0]") private Output isSpot; /** * @return If <code>true</code>, this App Service Plan owns spot instances. * */ public Output> isSpot() { return Codegen.optional(this.isSpot); } /** * Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. * */ @Export(name="isXenon", refs={Boolean.class}, tree="[0]") private Output isXenon; /** * @return Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. * */ public Output> isXenon() { return Codegen.optional(this.isXenon); } /** * Kind of resource. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Kind of resource. * */ public Output> kind() { return Codegen.optional(this.kind); } /** * Specification for the Kubernetes Environment to use for the App Service plan. * */ @Export(name="kubeEnvironmentProfile", refs={KubeEnvironmentProfileResponse.class}, tree="[0]") private Output kubeEnvironmentProfile; /** * @return Specification for the Kubernetes Environment to use for the App Service plan. * */ public Output> kubeEnvironmentProfile() { return Codegen.optional(this.kubeEnvironmentProfile); } /** * Resource Location. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource Location. * */ public Output location() { return this.location; } /** * Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan * */ @Export(name="maximumElasticWorkerCount", refs={Integer.class}, tree="[0]") private Output maximumElasticWorkerCount; /** * @return Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan * */ public Output> maximumElasticWorkerCount() { return Codegen.optional(this.maximumElasticWorkerCount); } /** * Maximum number of instances that can be assigned to this App Service plan. * */ @Export(name="maximumNumberOfWorkers", refs={Integer.class}, tree="[0]") private Output maximumNumberOfWorkers; /** * @return Maximum number of instances that can be assigned to this App Service plan. * */ public Output maximumNumberOfWorkers() { return this.maximumNumberOfWorkers; } /** * Resource Name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource Name. * */ public Output name() { return this.name; } /** * Number of apps assigned to this App Service plan. * */ @Export(name="numberOfSites", refs={Integer.class}, tree="[0]") private Output numberOfSites; /** * @return Number of apps assigned to this App Service plan. * */ public Output numberOfSites() { return this.numberOfSites; } /** * The number of instances that are assigned to this App Service plan. * */ @Export(name="numberOfWorkers", refs={Integer.class}, tree="[0]") private Output numberOfWorkers; /** * @return The number of instances that are assigned to this App Service plan. * */ public Output numberOfWorkers() { return this.numberOfWorkers; } /** * If <code>true</code>, apps assigned to this App Service plan can be scaled independently. * If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan. * */ @Export(name="perSiteScaling", refs={Boolean.class}, tree="[0]") private Output perSiteScaling; /** * @return If <code>true</code>, apps assigned to this App Service plan can be scaled independently. * If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan. * */ public Output> perSiteScaling() { return Codegen.optional(this.perSiteScaling); } /** * Provisioning state of the App Service Plan. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning state of the App Service Plan. * */ public Output provisioningState() { return this.provisioningState; } /** * If Linux app service plan <code>true</code>, <code>false</code> otherwise. * */ @Export(name="reserved", refs={Boolean.class}, tree="[0]") private Output reserved; /** * @return If Linux app service plan <code>true</code>, <code>false</code> otherwise. * */ public Output> reserved() { return Codegen.optional(this.reserved); } /** * Resource group of the App Service plan. * */ @Export(name="resourceGroup", refs={String.class}, tree="[0]") private Output resourceGroup; /** * @return Resource group of the App Service plan. * */ public Output resourceGroup() { return this.resourceGroup; } /** * Description of a SKU for a scalable resource. * */ @Export(name="sku", refs={SkuDescriptionResponse.class}, tree="[0]") private Output sku; /** * @return Description of a SKU for a scalable resource. * */ public Output> sku() { return Codegen.optional(this.sku); } /** * The time when the server farm expires. Valid only if it is a spot server farm. * */ @Export(name="spotExpirationTime", refs={String.class}, tree="[0]") private Output spotExpirationTime; /** * @return The time when the server farm expires. Valid only if it is a spot server farm. * */ public Output> spotExpirationTime() { return Codegen.optional(this.spotExpirationTime); } /** * App Service plan status. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return App Service plan status. * */ public Output status() { return this.status; } /** * App Service plan subscription. * */ @Export(name="subscription", refs={String.class}, tree="[0]") private Output subscription; /** * @return App Service plan subscription. * */ public Output subscription() { return this.subscription; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Scaling worker count. * */ @Export(name="targetWorkerCount", refs={Integer.class}, tree="[0]") private Output targetWorkerCount; /** * @return Scaling worker count. * */ public Output> targetWorkerCount() { return Codegen.optional(this.targetWorkerCount); } /** * Scaling worker size ID. * */ @Export(name="targetWorkerSizeId", refs={Integer.class}, tree="[0]") private Output targetWorkerSizeId; /** * @return Scaling worker size ID. * */ public Output> targetWorkerSizeId() { return Codegen.optional(this.targetWorkerSizeId); } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * Target worker tier assigned to the App Service plan. * */ @Export(name="workerTierName", refs={String.class}, tree="[0]") private Output workerTierName; /** * @return Target worker tier assigned to the App Service plan. * */ public Output> workerTierName() { return Codegen.optional(this.workerTierName); } /** * If <code>true</code>, this App Service Plan will perform availability zone balancing. * If <code>false</code>, this App Service Plan will not perform availability zone balancing. * */ @Export(name="zoneRedundant", refs={Boolean.class}, tree="[0]") private Output zoneRedundant; /** * @return If <code>true</code>, this App Service Plan will perform availability zone balancing. * If <code>false</code>, this App Service Plan will not perform availability zone balancing. * */ public Output> zoneRedundant() { return Codegen.optional(this.zoneRedundant); } /** * * @param name The _unique_ name of the resulting resource. */ public AppServicePlan(java.lang.String name) { this(name, AppServicePlanArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public AppServicePlan(java.lang.String name, AppServicePlanArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public AppServicePlan(java.lang.String name, AppServicePlanArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:web:AppServicePlan", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private AppServicePlan(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:web:AppServicePlan", name, null, makeResourceOptions(options, id), false); } private static AppServicePlanArgs makeArgs(AppServicePlanArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AppServicePlanArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:web/v20150801:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20160901:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20180201:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20190801:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20200601:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20200901:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20201001:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20201201:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20210101:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20210115:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20210201:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20210301:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20220301:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20220901:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20230101:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20231201:AppServicePlan").build()), Output.of(Alias.builder().type("azure-native:web/v20240401:AppServicePlan").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static AppServicePlan get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new AppServicePlan(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy