Host Pool
Represents a HostPool 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-02-preview, 2020-11-10-preview, 2022-04-01-preview, 2022-10-14-preview, 2023-07-07-preview, 2023-09-05.
Example Usage
HostPool_Create
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var hostPool = new AzureNative.DesktopVirtualization.HostPool("hostPool", new()
{
AgentUpdate = new AzureNative.DesktopVirtualization.Inputs.AgentUpdatePropertiesArgs
{
MaintenanceWindowTimeZone = "Alaskan Standard Time",
MaintenanceWindows = new[]
{
new AzureNative.DesktopVirtualization.Inputs.MaintenanceWindowPropertiesArgs
{
DayOfWeek = AzureNative.DesktopVirtualization.DayOfWeek.Friday,
Hour = 7,
},
new AzureNative.DesktopVirtualization.Inputs.MaintenanceWindowPropertiesArgs
{
DayOfWeek = AzureNative.DesktopVirtualization.DayOfWeek.Saturday,
Hour = 8,
},
},
Type = "Scheduled",
UseSessionHostLocalTime = false,
},
Description = "des1",
FriendlyName = "friendly",
HostPoolName = "hostPool1",
HostPoolType = "Pooled",
LoadBalancerType = "BreadthFirst",
Location = "centralus",
MaxSessionLimit = 999999,
PersonalDesktopAssignmentType = "Automatic",
PreferredAppGroupType = "Desktop",
RegistrationInfo = new AzureNative.DesktopVirtualization.Inputs.RegistrationInfoArgs
{
ExpirationTime = "2020-10-01T14:01:54.9571247Z",
RegistrationTokenOperation = "Update",
},
ResourceGroupName = "resourceGroup1",
SsoClientId = "client",
SsoClientSecretKeyVaultPath = "https://keyvault/secret",
SsoSecretType = "SharedKey",
SsoadfsAuthority = "https://adfs",
StartVMOnConnect = false,
Tags =
{
{ "tag1", "value1" },
{ "tag2", "value2" },
},
VmTemplate = "{json:json}",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/desktopvirtualization/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := desktopvirtualization.NewHostPool(ctx, "hostPool", &desktopvirtualization.HostPoolArgs{
AgentUpdate: desktopvirtualization.AgentUpdatePropertiesResponse{
MaintenanceWindowTimeZone: pulumi.String("Alaskan Standard Time"),
MaintenanceWindows: desktopvirtualization.MaintenanceWindowPropertiesArray{
&desktopvirtualization.MaintenanceWindowPropertiesArgs{
DayOfWeek: desktopvirtualization.DayOfWeekFriday,
Hour: pulumi.Int(7),
},
&desktopvirtualization.MaintenanceWindowPropertiesArgs{
DayOfWeek: desktopvirtualization.DayOfWeekSaturday,
Hour: pulumi.Int(8),
},
},
Type: pulumi.String("Scheduled"),
UseSessionHostLocalTime: pulumi.Bool(false),
},
Description: pulumi.String("des1"),
FriendlyName: pulumi.String("friendly"),
HostPoolName: pulumi.String("hostPool1"),
HostPoolType: pulumi.String("Pooled"),
LoadBalancerType: pulumi.String("BreadthFirst"),
Location: pulumi.String("centralus"),
MaxSessionLimit: pulumi.Int(999999),
PersonalDesktopAssignmentType: pulumi.String("Automatic"),
PreferredAppGroupType: pulumi.String("Desktop"),
RegistrationInfo: &desktopvirtualization.RegistrationInfoArgs{
ExpirationTime: pulumi.String("2020-10-01T14:01:54.9571247Z"),
RegistrationTokenOperation: pulumi.String("Update"),
},
ResourceGroupName: pulumi.String("resourceGroup1"),
SsoClientId: pulumi.String("client"),
SsoClientSecretKeyVaultPath: pulumi.String("https://keyvault/secret"),
SsoSecretType: pulumi.String("SharedKey"),
SsoadfsAuthority: pulumi.String("https://adfs"),
StartVMOnConnect: pulumi.Bool(false),
Tags: pulumi.StringMap{
"tag1": pulumi.String("value1"),
"tag2": pulumi.String("value2"),
},
VmTemplate: pulumi.String("{json:json}"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.desktopvirtualization.HostPool;
import com.pulumi.azurenative.desktopvirtualization.HostPoolArgs;
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 hostPool = new HostPool("hostPool", HostPoolArgs.builder()
.agentUpdate(Map.ofEntries(
Map.entry("maintenanceWindowTimeZone", "Alaskan Standard Time"),
Map.entry("maintenanceWindows",
Map.ofEntries(
Map.entry("dayOfWeek", "Friday"),
Map.entry("hour", 7)
),
Map.ofEntries(
Map.entry("dayOfWeek", "Saturday"),
Map.entry("hour", 8)
)),
Map.entry("type", "Scheduled"),
Map.entry("useSessionHostLocalTime", false)
))
.description("des1")
.friendlyName("friendly")
.hostPoolName("hostPool1")
.hostPoolType("Pooled")
.loadBalancerType("BreadthFirst")
.location("centralus")
.maxSessionLimit(999999)
.personalDesktopAssignmentType("Automatic")
.preferredAppGroupType("Desktop")
.registrationInfo(Map.ofEntries(
Map.entry("expirationTime", "2020-10-01T14:01:54.9571247Z"),
Map.entry("registrationTokenOperation", "Update")
))
.resourceGroupName("resourceGroup1")
.ssoClientId("client")
.ssoClientSecretKeyVaultPath("https://keyvault/secret")
.ssoSecretType("SharedKey")
.ssoadfsAuthority("https://adfs")
.startVMOnConnect(false)
.tags(Map.ofEntries(
Map.entry("tag1", "value1"),
Map.entry("tag2", "value2")
))
.vmTemplate("{json:json}")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:desktopvirtualization:HostPool hostPool1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard