Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// *** 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.azure.desktopvirtualization;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.desktopvirtualization.ScalingPlanArgs;
import com.pulumi.azure.desktopvirtualization.inputs.ScalingPlanState;
import com.pulumi.azure.desktopvirtualization.outputs.ScalingPlanHostPool;
import com.pulumi.azure.desktopvirtualization.outputs.ScalingPlanSchedule;
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;
/**
* Manages a Virtual Desktop Scaling Plan.
*
* ## Disclaimers
*
* > **Note** Scaling Plans are currently in preview and are only supported in a limited number of regions. Both the Scaling Plan and any referenced Host Pools must be deployed in a supported region. [Autoscale (preview) for Azure Virtual Desktop host pools](https://docs.microsoft.com/azure/virtual-desktop/autoscale-scaling-plan).
*
* > **Note** Scaling Plans require specific permissions to be granted to the Windows Virtual Desktop application before a 'host_pool' can be configured. [Required Permissions for Scaling Plans](https://docs.microsoft.com/azure/virtual-desktop/autoscale-scaling-plan#create-a-custom-rbac-role).
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Virtual Desktop Scaling Plans can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:desktopvirtualization/scalingPlan:ScalingPlan example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/plan1
* ```
*
*/
@ResourceType(type="azure:desktopvirtualization/scalingPlan:ScalingPlan")
public class ScalingPlan extends com.pulumi.resources.CustomResource {
/**
* A description of the Scaling Plan.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return A description of the Scaling Plan.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* The name of the tag associated with the VMs you want to exclude from autoscaling.
*
*/
@Export(name="exclusionTag", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> exclusionTag;
/**
* @return The name of the tag associated with the VMs you want to exclude from autoscaling.
*
*/
public Output> exclusionTag() {
return Codegen.optional(this.exclusionTag);
}
/**
* Friendly name of the Scaling Plan.
*
*/
@Export(name="friendlyName", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> friendlyName;
/**
* @return Friendly name of the Scaling Plan.
*
*/
public Output> friendlyName() {
return Codegen.optional(this.friendlyName);
}
/**
* One or more `host_pool` blocks as defined below.
*
*/
@Export(name="hostPools", refs={List.class,ScalingPlanHostPool.class}, tree="[0,1]")
private Output> hostPools;
/**
* @return One or more `host_pool` blocks as defined below.
*
*/
public Output> hostPools() {
return this.hostPools;
}
/**
* The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
*
*/
public Output location() {
return this.location;
}
/**
* The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* One or more `schedule` blocks as defined below.
*
*/
@Export(name="schedules", refs={List.class,ScalingPlanSchedule.class}, tree="[0,1]")
private Output> schedules;
/**
* @return One or more `schedule` blocks as defined below.
*
*/
public Output> schedules() {
return this.schedules;
}
/**
* A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
*
*/
@Export(name="timeZone", refs={String.class}, tree="[0]")
private Output timeZone;
/**
* @return Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
*
*/
public Output timeZone() {
return this.timeZone;
}
/**
*
* @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:desktopvirtualization/scalingPlan:ScalingPlan", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ScalingPlan(java.lang.String name, Output id, @Nullable ScalingPlanState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:desktopvirtualization/scalingPlan:ScalingPlan", name, state, 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())
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static ScalingPlan get(java.lang.String name, Output id, @Nullable ScalingPlanState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ScalingPlan(name, id, state, options);
}
}