
com.pulumi.azurenative.desktopvirtualization.ScalingPlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.desktopvirtualization;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.desktopvirtualization.ScalingPlanArgs;
import com.pulumi.azurenative.desktopvirtualization.outputs.ResourceModelWithAllowedPropertySetResponseIdentity;
import com.pulumi.azurenative.desktopvirtualization.outputs.ResourceModelWithAllowedPropertySetResponsePlan;
import com.pulumi.azurenative.desktopvirtualization.outputs.ResourceModelWithAllowedPropertySetResponseSku;
import com.pulumi.azurenative.desktopvirtualization.outputs.ScalingHostPoolReferenceResponse;
import com.pulumi.azurenative.desktopvirtualization.outputs.ScalingScheduleResponse;
import com.pulumi.azurenative.desktopvirtualization.outputs.SystemDataResponse;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Represents a scaling plan definition.
* Azure REST API version: 2022-09-09. Prior API version in Azure Native 1.x: 2021-02-01-preview.
*
* Other available API versions: 2020-11-10-preview, 2021-02-01-preview, 2022-02-10-preview, 2022-10-14-preview, 2023-07-07-preview, 2023-09-05, 2023-10-04-preview, 2023-11-01-preview, 2024-01-16-preview, 2024-03-06-preview, 2024-04-03, 2024-04-08-preview, 2024-08-08-preview.
*
* ## Example Usage
* ### ScalingPlans_Create
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.desktopvirtualization.ScalingPlan;
* import com.pulumi.azurenative.desktopvirtualization.ScalingPlanArgs;
* import com.pulumi.azurenative.desktopvirtualization.inputs.ScalingHostPoolReferenceArgs;
* import com.pulumi.azurenative.desktopvirtualization.inputs.ScalingScheduleArgs;
* import com.pulumi.azurenative.desktopvirtualization.inputs.TimeArgs;
* 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 scalingPlan = new ScalingPlan("scalingPlan", ScalingPlanArgs.builder()
* .description("Description of Scaling Plan")
* .exclusionTag("value")
* .friendlyName("Scaling Plan 1")
* .hostPoolReferences(ScalingHostPoolReferenceArgs.builder()
* .hostPoolArmPath("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1")
* .scalingPlanEnabled(true)
* .build())
* .hostPoolType("Pooled")
* .location("centralus")
* .resourceGroupName("resourceGroup1")
* .scalingPlanName("scalingPlan1")
* .schedules(ScalingScheduleArgs.builder()
* .daysOfWeek(
* "Monday",
* "Tuesday",
* "Wednesday",
* "Thursday",
* "Friday")
* .name("schedule1")
* .offPeakLoadBalancingAlgorithm("DepthFirst")
* .offPeakStartTime(TimeArgs.builder()
* .hour(20)
* .minute(0)
* .build())
* .peakLoadBalancingAlgorithm("BreadthFirst")
* .peakStartTime(TimeArgs.builder()
* .hour(8)
* .minute(0)
* .build())
* .rampDownCapacityThresholdPct(50)
* .rampDownForceLogoffUsers(true)
* .rampDownLoadBalancingAlgorithm("DepthFirst")
* .rampDownMinimumHostsPct(20)
* .rampDownNotificationMessage("message")
* .rampDownStartTime(TimeArgs.builder()
* .hour(18)
* .minute(0)
* .build())
* .rampDownWaitTimeMinutes(30)
* .rampUpCapacityThresholdPct(80)
* .rampUpLoadBalancingAlgorithm("DepthFirst")
* .rampUpMinimumHostsPct(20)
* .rampUpStartTime(TimeArgs.builder()
* .hour(6)
* .minute(0)
* .build())
* .build())
* .tags(Map.ofEntries(
* Map.entry("tag1", "value1"),
* Map.entry("tag2", "value2")
* ))
* .timeZone("Central Standard Time")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:desktopvirtualization:ScalingPlan scalingPlan1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}
* ```
*
*/
@ResourceType(type="azure-native:desktopvirtualization:ScalingPlan")
public class ScalingPlan extends com.pulumi.resources.CustomResource {
/**
* Description of scaling plan.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return Description of scaling plan.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output etag;
/**
* @return The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
*
*/
public Output etag() {
return this.etag;
}
/**
* Exclusion tag for scaling plan.
*
*/
@Export(name="exclusionTag", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> exclusionTag;
/**
* @return Exclusion tag for scaling plan.
*
*/
public Output> exclusionTag() {
return Codegen.optional(this.exclusionTag);
}
/**
* User friendly name of scaling plan.
*
*/
@Export(name="friendlyName", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> friendlyName;
/**
* @return User friendly name of scaling plan.
*
*/
public Output> friendlyName() {
return Codegen.optional(this.friendlyName);
}
/**
* List of ScalingHostPoolReference definitions.
*
*/
@Export(name="hostPoolReferences", refs={List.class,ScalingHostPoolReferenceResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> hostPoolReferences;
/**
* @return List of ScalingHostPoolReference definitions.
*
*/
public Output>> hostPoolReferences() {
return Codegen.optional(this.hostPoolReferences);
}
/**
* HostPool type for desktop.
*
*/
@Export(name="hostPoolType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> hostPoolType;
/**
* @return HostPool type for desktop.
*
*/
public Output> hostPoolType() {
return Codegen.optional(this.hostPoolType);
}
@Export(name="identity", refs={ResourceModelWithAllowedPropertySetResponseIdentity.class}, tree="[0]")
private Output* @Nullable */ ResourceModelWithAllowedPropertySetResponseIdentity> identity;
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
*
*/
@Export(name="kind", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> kind;
/**
* @return Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
*
*/
public Output> kind() {
return Codegen.optional(this.kind);
}
/**
* The geo-location where the resource lives
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> location;
/**
* @return The geo-location where the resource lives
*
*/
public Output> location() {
return Codegen.optional(this.location);
}
/**
* The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
*
*/
@Export(name="managedBy", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> managedBy;
/**
* @return The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
*
*/
public Output> managedBy() {
return Codegen.optional(this.managedBy);
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* ObjectId of scaling plan. (internal use)
*
*/
@Export(name="objectId", refs={String.class}, tree="[0]")
private Output objectId;
/**
* @return ObjectId of scaling plan. (internal use)
*
*/
public Output objectId() {
return this.objectId;
}
@Export(name="plan", refs={ResourceModelWithAllowedPropertySetResponsePlan.class}, tree="[0]")
private Output* @Nullable */ ResourceModelWithAllowedPropertySetResponsePlan> plan;
public Output> plan() {
return Codegen.optional(this.plan);
}
/**
* List of ScalingPlanPooledSchedule definitions.
*
*/
@Export(name="schedules", refs={List.class,ScalingScheduleResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> schedules;
/**
* @return List of ScalingPlanPooledSchedule definitions.
*
*/
public Output>> schedules() {
return Codegen.optional(this.schedules);
}
@Export(name="sku", refs={ResourceModelWithAllowedPropertySetResponseSku.class}, tree="[0]")
private Output* @Nullable */ ResourceModelWithAllowedPropertySetResponseSku> sku;
public Output> sku() {
return Codegen.optional(this.sku);
}
/**
* Metadata pertaining to creation and last modification of the resource.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Metadata pertaining to creation and last modification of the resource.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Timezone of the scaling plan.
*
*/
@Export(name="timeZone", refs={String.class}, tree="[0]")
private Output timeZone;
/**
* @return Timezone of the scaling plan.
*
*/
public Output timeZone() {
return this.timeZone;
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ScalingPlan(java.lang.String name) {
this(name, ScalingPlanArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ScalingPlan(java.lang.String name, ScalingPlanArgs 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 ScalingPlan(java.lang.String name, ScalingPlanArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:desktopvirtualization:ScalingPlan", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ScalingPlan(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:desktopvirtualization:ScalingPlan", name, null, makeResourceOptions(options, id), false);
}
private static ScalingPlanArgs makeArgs(ScalingPlanArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ScalingPlanArgs.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:desktopvirtualization/v20201110preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20210114preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20210201preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20210309preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20210401preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20210712:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20210903preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20220210preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20220401preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20220909:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20221014preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20230707preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20230905:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20231004preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20231101preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20240116preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20240306preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20240403:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20240408preview:ScalingPlan").build()),
Output.of(Alias.builder().type("azure-native:desktopvirtualization/v20240808preview:ScalingPlan").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 ScalingPlan get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ScalingPlan(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy