1. Packages
  2. Azure Classic
  3. API Docs
  4. desktopvirtualization
  5. WorkspaceApplicationGroupAssociation

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.desktopvirtualization.WorkspaceApplicationGroupAssociation

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    Manages a Virtual Desktop Workspace Application Group Association.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "rg-example-virtualdesktop",
        location: "West Europe",
    });
    const pooledbreadthfirst = new azure.desktopvirtualization.HostPool("pooledbreadthfirst", {
        name: "pooledbreadthfirst",
        location: example.location,
        resourceGroupName: example.name,
        type: "Pooled",
        loadBalancerType: "BreadthFirst",
    });
    const remoteapp = new azure.desktopvirtualization.ApplicationGroup("remoteapp", {
        name: "remoteapp",
        location: example.location,
        resourceGroupName: example.name,
        type: "RemoteApp",
        hostPoolId: pooledbreadthfirst.id,
    });
    const workspace = new azure.desktopvirtualization.Workspace("workspace", {
        name: "workspace",
        location: example.location,
        resourceGroupName: example.name,
    });
    const workspaceremoteapp = new azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceremoteapp", {
        workspaceId: workspace.id,
        applicationGroupId: remoteapp.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="rg-example-virtualdesktop",
        location="West Europe")
    pooledbreadthfirst = azure.desktopvirtualization.HostPool("pooledbreadthfirst",
        name="pooledbreadthfirst",
        location=example.location,
        resource_group_name=example.name,
        type="Pooled",
        load_balancer_type="BreadthFirst")
    remoteapp = azure.desktopvirtualization.ApplicationGroup("remoteapp",
        name="remoteapp",
        location=example.location,
        resource_group_name=example.name,
        type="RemoteApp",
        host_pool_id=pooledbreadthfirst.id)
    workspace = azure.desktopvirtualization.Workspace("workspace",
        name="workspace",
        location=example.location,
        resource_group_name=example.name)
    workspaceremoteapp = azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceremoteapp",
        workspace_id=workspace.id,
        application_group_id=remoteapp.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/desktopvirtualization"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("rg-example-virtualdesktop"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		pooledbreadthfirst, err := desktopvirtualization.NewHostPool(ctx, "pooledbreadthfirst", &desktopvirtualization.HostPoolArgs{
    			Name:              pulumi.String("pooledbreadthfirst"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Type:              pulumi.String("Pooled"),
    			LoadBalancerType:  pulumi.String("BreadthFirst"),
    		})
    		if err != nil {
    			return err
    		}
    		remoteapp, err := desktopvirtualization.NewApplicationGroup(ctx, "remoteapp", &desktopvirtualization.ApplicationGroupArgs{
    			Name:              pulumi.String("remoteapp"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Type:              pulumi.String("RemoteApp"),
    			HostPoolId:        pooledbreadthfirst.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		workspace, err := desktopvirtualization.NewWorkspace(ctx, "workspace", &desktopvirtualization.WorkspaceArgs{
    			Name:              pulumi.String("workspace"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = desktopvirtualization.NewWorkspaceApplicationGroupAssociation(ctx, "workspaceremoteapp", &desktopvirtualization.WorkspaceApplicationGroupAssociationArgs{
    			WorkspaceId:        workspace.ID(),
    			ApplicationGroupId: remoteapp.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "rg-example-virtualdesktop",
            Location = "West Europe",
        });
    
        var pooledbreadthfirst = new Azure.DesktopVirtualization.HostPool("pooledbreadthfirst", new()
        {
            Name = "pooledbreadthfirst",
            Location = example.Location,
            ResourceGroupName = example.Name,
            Type = "Pooled",
            LoadBalancerType = "BreadthFirst",
        });
    
        var remoteapp = new Azure.DesktopVirtualization.ApplicationGroup("remoteapp", new()
        {
            Name = "remoteapp",
            Location = example.Location,
            ResourceGroupName = example.Name,
            Type = "RemoteApp",
            HostPoolId = pooledbreadthfirst.Id,
        });
    
        var workspace = new Azure.DesktopVirtualization.Workspace("workspace", new()
        {
            Name = "workspace",
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var workspaceremoteapp = new Azure.DesktopVirtualization.WorkspaceApplicationGroupAssociation("workspaceremoteapp", new()
        {
            WorkspaceId = workspace.Id,
            ApplicationGroupId = remoteapp.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.desktopvirtualization.HostPool;
    import com.pulumi.azure.desktopvirtualization.HostPoolArgs;
    import com.pulumi.azure.desktopvirtualization.ApplicationGroup;
    import com.pulumi.azure.desktopvirtualization.ApplicationGroupArgs;
    import com.pulumi.azure.desktopvirtualization.Workspace;
    import com.pulumi.azure.desktopvirtualization.WorkspaceArgs;
    import com.pulumi.azure.desktopvirtualization.WorkspaceApplicationGroupAssociation;
    import com.pulumi.azure.desktopvirtualization.WorkspaceApplicationGroupAssociationArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("rg-example-virtualdesktop")
                .location("West Europe")
                .build());
    
            var pooledbreadthfirst = new HostPool("pooledbreadthfirst", HostPoolArgs.builder()        
                .name("pooledbreadthfirst")
                .location(example.location())
                .resourceGroupName(example.name())
                .type("Pooled")
                .loadBalancerType("BreadthFirst")
                .build());
    
            var remoteapp = new ApplicationGroup("remoteapp", ApplicationGroupArgs.builder()        
                .name("remoteapp")
                .location(example.location())
                .resourceGroupName(example.name())
                .type("RemoteApp")
                .hostPoolId(pooledbreadthfirst.id())
                .build());
    
            var workspace = new Workspace("workspace", WorkspaceArgs.builder()        
                .name("workspace")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var workspaceremoteapp = new WorkspaceApplicationGroupAssociation("workspaceremoteapp", WorkspaceApplicationGroupAssociationArgs.builder()        
                .workspaceId(workspace.id())
                .applicationGroupId(remoteapp.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: rg-example-virtualdesktop
          location: West Europe
      pooledbreadthfirst:
        type: azure:desktopvirtualization:HostPool
        properties:
          name: pooledbreadthfirst
          location: ${example.location}
          resourceGroupName: ${example.name}
          type: Pooled
          loadBalancerType: BreadthFirst
      remoteapp:
        type: azure:desktopvirtualization:ApplicationGroup
        properties:
          name: remoteapp
          location: ${example.location}
          resourceGroupName: ${example.name}
          type: RemoteApp
          hostPoolId: ${pooledbreadthfirst.id}
      workspace:
        type: azure:desktopvirtualization:Workspace
        properties:
          name: workspace
          location: ${example.location}
          resourceGroupName: ${example.name}
      workspaceremoteapp:
        type: azure:desktopvirtualization:WorkspaceApplicationGroupAssociation
        properties:
          workspaceId: ${workspace.id}
          applicationGroupId: ${remoteapp.id}
    

    Create WorkspaceApplicationGroupAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WorkspaceApplicationGroupAssociation(name: string, args: WorkspaceApplicationGroupAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def WorkspaceApplicationGroupAssociation(resource_name: str,
                                             args: WorkspaceApplicationGroupAssociationArgs,
                                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkspaceApplicationGroupAssociation(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             application_group_id: Optional[str] = None,
                                             workspace_id: Optional[str] = None)
    func NewWorkspaceApplicationGroupAssociation(ctx *Context, name string, args WorkspaceApplicationGroupAssociationArgs, opts ...ResourceOption) (*WorkspaceApplicationGroupAssociation, error)
    public WorkspaceApplicationGroupAssociation(string name, WorkspaceApplicationGroupAssociationArgs args, CustomResourceOptions? opts = null)
    public WorkspaceApplicationGroupAssociation(String name, WorkspaceApplicationGroupAssociationArgs args)
    public WorkspaceApplicationGroupAssociation(String name, WorkspaceApplicationGroupAssociationArgs args, CustomResourceOptions options)
    
    type: azure:desktopvirtualization:WorkspaceApplicationGroupAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WorkspaceApplicationGroupAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WorkspaceApplicationGroupAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WorkspaceApplicationGroupAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkspaceApplicationGroupAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkspaceApplicationGroupAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var workspaceApplicationGroupAssociationResource = new Azure.DesktopVirtualization.WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource", new()
    {
        ApplicationGroupId = "string",
        WorkspaceId = "string",
    });
    
    example, err := desktopvirtualization.NewWorkspaceApplicationGroupAssociation(ctx, "workspaceApplicationGroupAssociationResource", &desktopvirtualization.WorkspaceApplicationGroupAssociationArgs{
    	ApplicationGroupId: pulumi.String("string"),
    	WorkspaceId:        pulumi.String("string"),
    })
    
    var workspaceApplicationGroupAssociationResource = new WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource", WorkspaceApplicationGroupAssociationArgs.builder()        
        .applicationGroupId("string")
        .workspaceId("string")
        .build());
    
    workspace_application_group_association_resource = azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource",
        application_group_id="string",
        workspace_id="string")
    
    const workspaceApplicationGroupAssociationResource = new azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource", {
        applicationGroupId: "string",
        workspaceId: "string",
    });
    
    type: azure:desktopvirtualization:WorkspaceApplicationGroupAssociation
    properties:
        applicationGroupId: string
        workspaceId: string
    

    WorkspaceApplicationGroupAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The WorkspaceApplicationGroupAssociation resource accepts the following input properties:

    ApplicationGroupId string
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    WorkspaceId string
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    ApplicationGroupId string
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    WorkspaceId string
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    applicationGroupId String
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspaceId String
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    applicationGroupId string
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspaceId string
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    application_group_id str
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspace_id str
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    applicationGroupId String
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspaceId String
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkspaceApplicationGroupAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing WorkspaceApplicationGroupAssociation Resource

    Get an existing WorkspaceApplicationGroupAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WorkspaceApplicationGroupAssociationState, opts?: CustomResourceOptions): WorkspaceApplicationGroupAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_group_id: Optional[str] = None,
            workspace_id: Optional[str] = None) -> WorkspaceApplicationGroupAssociation
    func GetWorkspaceApplicationGroupAssociation(ctx *Context, name string, id IDInput, state *WorkspaceApplicationGroupAssociationState, opts ...ResourceOption) (*WorkspaceApplicationGroupAssociation, error)
    public static WorkspaceApplicationGroupAssociation Get(string name, Input<string> id, WorkspaceApplicationGroupAssociationState? state, CustomResourceOptions? opts = null)
    public static WorkspaceApplicationGroupAssociation get(String name, Output<String> id, WorkspaceApplicationGroupAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplicationGroupId string
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    WorkspaceId string
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    ApplicationGroupId string
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    WorkspaceId string
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    applicationGroupId String
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspaceId String
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    applicationGroupId string
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspaceId string
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    application_group_id str
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspace_id str
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
    applicationGroupId String
    The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
    workspaceId String
    The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.

    Import

    Associations between Virtual Desktop Workspaces and Virtual Desktop Application Groups can be imported using the resource id, e.g.

    $ pulumi import azure:desktopvirtualization/workspaceApplicationGroupAssociation:WorkspaceApplicationGroupAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/workspaces/myworkspace|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/myapplicationgroup"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi