armdesktopvirtualization

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2022 License: MIT Imports: 17 Imported by: 4

README

Azure Virtual Desktop Module for Go

PkgGoDev

The armdesktopvirtualization module provides operations for working with Azure Virtual Desktop.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Virtual Desktop module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Virtual Desktop. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Virtual Desktop modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armdesktopvirtualization.NewWorkspacesClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armdesktopvirtualization.NewWorkspacesClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Virtual Desktop label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// REQUIRED; Detailed properties for Application
	Properties *ApplicationProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Application - Schema for Application properties.

type ApplicationGroup

type ApplicationGroup struct {
	// REQUIRED; Detailed properties for ApplicationGroup
	Properties *ApplicationGroupProperties                  `json:"properties,omitempty"`
	Identity   *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"`

	// 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.
	Kind *string `json:"kind,omitempty"`

	// The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// 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.
	ManagedBy *string                                  `json:"managedBy,omitempty"`
	Plan      *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"`
	SKU       *ResourceModelWithAllowedPropertySetSKU  `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; 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.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ApplicationGroup - Represents a ApplicationGroup definition.

func (ApplicationGroup) MarshalJSON

func (a ApplicationGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationGroup.

type ApplicationGroupList

type ApplicationGroupList struct {
	// List of ApplicationGroup definitions.
	Value []*ApplicationGroup `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ApplicationGroupList - List of ApplicationGroup definitions.

type ApplicationGroupPatch

type ApplicationGroupPatch struct {
	// ApplicationGroup properties that can be patched.
	Properties *ApplicationGroupPatchProperties `json:"properties,omitempty"`

	// tags to be updated
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ApplicationGroupPatch - ApplicationGroup properties that can be patched.

func (ApplicationGroupPatch) MarshalJSON

func (a ApplicationGroupPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationGroupPatch.

type ApplicationGroupPatchProperties

type ApplicationGroupPatchProperties struct {
	// Description of ApplicationGroup.
	Description *string `json:"description,omitempty"`

	// Friendly name of ApplicationGroup.
	FriendlyName *string `json:"friendlyName,omitempty"`
}

ApplicationGroupPatchProperties - ApplicationGroup properties that can be patched.

type ApplicationGroupProperties

type ApplicationGroupProperties struct {
	// REQUIRED; Resource Type of ApplicationGroup.
	ApplicationGroupType *ApplicationGroupType `json:"applicationGroupType,omitempty"`

	// REQUIRED; HostPool arm path of ApplicationGroup.
	HostPoolArmPath *string `json:"hostPoolArmPath,omitempty"`

	// Description of ApplicationGroup.
	Description *string `json:"description,omitempty"`

	// Friendly name of ApplicationGroup.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// The registration info of HostPool.
	MigrationRequest *MigrationRequestProperties `json:"migrationRequest,omitempty"`

	// READ-ONLY; Is cloud pc resource.
	CloudPcResource *bool `json:"cloudPcResource,omitempty" azure:"ro"`

	// READ-ONLY; ObjectId of ApplicationGroup. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`

	// READ-ONLY; Workspace arm path of ApplicationGroup.
	WorkspaceArmPath *string `json:"workspaceArmPath,omitempty" azure:"ro"`
}

ApplicationGroupProperties - Schema for ApplicationGroup properties.

type ApplicationGroupType

type ApplicationGroupType string

ApplicationGroupType - Resource Type of ApplicationGroup.

const (
	ApplicationGroupTypeDesktop   ApplicationGroupType = "Desktop"
	ApplicationGroupTypeRemoteApp ApplicationGroupType = "RemoteApp"
)

func PossibleApplicationGroupTypeValues

func PossibleApplicationGroupTypeValues() []ApplicationGroupType

PossibleApplicationGroupTypeValues returns the possible values for the ApplicationGroupType const type.

type ApplicationGroupsClient

type ApplicationGroupsClient struct {
	// contains filtered or unexported fields
}

ApplicationGroupsClient contains the methods for the ApplicationGroups group. Don't use this type directly, use NewApplicationGroupsClient() instead.

func NewApplicationGroupsClient

func NewApplicationGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGroupsClient, error)

NewApplicationGroupsClient creates a new instance of ApplicationGroupsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ApplicationGroupsClient) CreateOrUpdate

func (client *ApplicationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationGroup ApplicationGroup, options *ApplicationGroupsClientCreateOrUpdateOptions) (ApplicationGroupsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update an applicationGroup. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group applicationGroup - Object containing ApplicationGroup definitions. options - ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ApplicationGroup_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationGroupsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"resourceGroup1",
		"applicationGroup1",
		armdesktopvirtualization.ApplicationGroup{
			Location: to.Ptr("centralus"),
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
			Properties: &armdesktopvirtualization.ApplicationGroupProperties{
				Description:          to.Ptr("des1"),
				ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp),
				FriendlyName:         to.Ptr("friendly"),
				HostPoolArmPath:      to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"),
				MigrationRequest: &armdesktopvirtualization.MigrationRequestProperties{
					MigrationPath: to.Ptr("TenantGroups/{defaultV1TenantGroup.Name}/Tenants/{defaultV1Tenant.Name}/HostPools/{sessionHostPool.Name}"),
					Operation:     to.Ptr(armdesktopvirtualization.OperationStart),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ApplicationGroupsClient) Delete

func (client *ApplicationGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientDeleteOptions) (ApplicationGroupsClientDeleteResponse, error)

Delete - Remove an applicationGroup. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group options - ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ApplicationGroup_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationGroupsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"applicationGroup1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ApplicationGroupsClient) Get

func (client *ApplicationGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientGetOptions) (ApplicationGroupsClientGetResponse, error)

Get - Get an application group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group options - ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ApplicationGroup_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationGroupsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"applicationGroup1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ApplicationGroupsClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - List applicationGroups. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. options - ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ApplicationGroup_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationGroupsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("resourceGroup1",
		&armdesktopvirtualization.ApplicationGroupsClientListByResourceGroupOptions{Filter: to.Ptr("applicationGroupType eq 'RailApplication'")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ApplicationGroupsClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - List applicationGroups in subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 options - ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ApplicationGroup_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationGroupsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(&armdesktopvirtualization.ApplicationGroupsClientListBySubscriptionOptions{Filter: to.Ptr("applicationGroupType eq 'RailApplication'")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ApplicationGroupsClient) Update

func (client *ApplicationGroupsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientUpdateOptions) (ApplicationGroupsClientUpdateResponse, error)

Update - Update an applicationGroup. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group options - ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ApplicationGroup_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationGroupsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"applicationGroup1",
		&armdesktopvirtualization.ApplicationGroupsClientUpdateOptions{ApplicationGroup: &armdesktopvirtualization.ApplicationGroupPatch{
			Properties: &armdesktopvirtualization.ApplicationGroupPatchProperties{
				Description:  to.Ptr("des1"),
				FriendlyName: to.Ptr("friendly"),
			},
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ApplicationGroupsClientCreateOrUpdateOptions added in v0.2.0

type ApplicationGroupsClientCreateOrUpdateOptions struct {
}

ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate method.

type ApplicationGroupsClientCreateOrUpdateResponse added in v0.2.0

type ApplicationGroupsClientCreateOrUpdateResponse struct {
	ApplicationGroup
}

ApplicationGroupsClientCreateOrUpdateResponse contains the response from method ApplicationGroupsClient.CreateOrUpdate.

type ApplicationGroupsClientDeleteOptions added in v0.2.0

type ApplicationGroupsClientDeleteOptions struct {
}

ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete method.

type ApplicationGroupsClientDeleteResponse added in v0.2.0

type ApplicationGroupsClientDeleteResponse struct {
}

ApplicationGroupsClientDeleteResponse contains the response from method ApplicationGroupsClient.Delete.

type ApplicationGroupsClientGetOptions added in v0.2.0

type ApplicationGroupsClientGetOptions struct {
}

ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method.

type ApplicationGroupsClientGetResponse added in v0.2.0

type ApplicationGroupsClientGetResponse struct {
	ApplicationGroup
}

ApplicationGroupsClientGetResponse contains the response from method ApplicationGroupsClient.Get.

type ApplicationGroupsClientListByResourceGroupOptions added in v0.2.0

type ApplicationGroupsClientListByResourceGroupOptions struct {
	// OData filter expression. Valid properties for filtering are applicationGroupType.
	Filter *string
}

ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.ListByResourceGroup method.

type ApplicationGroupsClientListByResourceGroupResponse added in v0.2.0

type ApplicationGroupsClientListByResourceGroupResponse struct {
	ApplicationGroupList
}

ApplicationGroupsClientListByResourceGroupResponse contains the response from method ApplicationGroupsClient.ListByResourceGroup.

type ApplicationGroupsClientListBySubscriptionOptions added in v0.2.0

type ApplicationGroupsClientListBySubscriptionOptions struct {
	// OData filter expression. Valid properties for filtering are applicationGroupType.
	Filter *string
}

ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.ListBySubscription method.

type ApplicationGroupsClientListBySubscriptionResponse added in v0.2.0

type ApplicationGroupsClientListBySubscriptionResponse struct {
	ApplicationGroupList
}

ApplicationGroupsClientListBySubscriptionResponse contains the response from method ApplicationGroupsClient.ListBySubscription.

type ApplicationGroupsClientUpdateOptions added in v0.2.0

type ApplicationGroupsClientUpdateOptions struct {
	// Object containing ApplicationGroup definitions.
	ApplicationGroup *ApplicationGroupPatch
}

ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update method.

type ApplicationGroupsClientUpdateResponse added in v0.2.0

type ApplicationGroupsClientUpdateResponse struct {
	ApplicationGroup
}

ApplicationGroupsClientUpdateResponse contains the response from method ApplicationGroupsClient.Update.

type ApplicationList

type ApplicationList struct {
	// List of Application definitions.
	Value []*Application `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ApplicationList - List of Application definitions.

type ApplicationPatch

type ApplicationPatch struct {
	// Detailed properties for Application
	Properties *ApplicationPatchProperties `json:"properties,omitempty"`

	// tags to be updated
	Tags map[string]*string `json:"tags,omitempty"`
}

ApplicationPatch - Application properties that can be patched.

func (ApplicationPatch) MarshalJSON

func (a ApplicationPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationPatch.

type ApplicationPatchProperties

type ApplicationPatchProperties struct {
	// Resource Type of Application.
	ApplicationType *RemoteApplicationType `json:"applicationType,omitempty"`

	// Command Line Arguments for Application.
	CommandLineArguments *string `json:"commandLineArguments,omitempty"`

	// Specifies whether this published application can be launched with command line arguments provided by the client, command
	// line arguments specified at publish time, or no command line arguments at all.
	CommandLineSetting *CommandLineSetting `json:"commandLineSetting,omitempty"`

	// Description of Application.
	Description *string `json:"description,omitempty"`

	// Specifies a path for the executable file for the application.
	FilePath *string `json:"filePath,omitempty"`

	// Friendly name of Application.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// Index of the icon.
	IconIndex *int32 `json:"iconIndex,omitempty"`

	// Path to icon.
	IconPath *string `json:"iconPath,omitempty"`

	// Specifies the package application Id for MSIX applications
	MsixPackageApplicationID *string `json:"msixPackageApplicationId,omitempty"`

	// Specifies the package family name for MSIX applications
	MsixPackageFamilyName *string `json:"msixPackageFamilyName,omitempty"`

	// Specifies whether to show the RemoteApp program in the RD Web Access server.
	ShowInPortal *bool `json:"showInPortal,omitempty"`
}

ApplicationPatchProperties - Application properties that can be patched.

type ApplicationProperties

type ApplicationProperties struct {
	// REQUIRED; Specifies whether this published application can be launched with command line arguments provided by the client,
	// command line arguments specified at publish time, or no command line arguments at all.
	CommandLineSetting *CommandLineSetting `json:"commandLineSetting,omitempty"`

	// Resource Type of Application.
	ApplicationType *RemoteApplicationType `json:"applicationType,omitempty"`

	// Command Line Arguments for Application.
	CommandLineArguments *string `json:"commandLineArguments,omitempty"`

	// Description of Application.
	Description *string `json:"description,omitempty"`

	// Specifies a path for the executable file for the application.
	FilePath *string `json:"filePath,omitempty"`

	// Friendly name of Application.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// Index of the icon.
	IconIndex *int32 `json:"iconIndex,omitempty"`

	// Path to icon.
	IconPath *string `json:"iconPath,omitempty"`

	// Specifies the package application Id for MSIX applications
	MsixPackageApplicationID *string `json:"msixPackageApplicationId,omitempty"`

	// Specifies the package family name for MSIX applications
	MsixPackageFamilyName *string `json:"msixPackageFamilyName,omitempty"`

	// Specifies whether to show the RemoteApp program in the RD Web Access server.
	ShowInPortal *bool `json:"showInPortal,omitempty"`

	// READ-ONLY; the icon a 64 bit string as a byte array.
	IconContent []byte `json:"iconContent,omitempty" azure:"ro"`

	// READ-ONLY; Hash of the icon.
	IconHash *string `json:"iconHash,omitempty" azure:"ro"`

	// READ-ONLY; ObjectId of Application. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`
}

ApplicationProperties - Schema for Application properties.

func (ApplicationProperties) MarshalJSON

func (a ApplicationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationProperties.

func (*ApplicationProperties) UnmarshalJSON

func (a *ApplicationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties.

type ApplicationType

type ApplicationType string

ApplicationType - Application type of application.

const (
	ApplicationTypeDesktop   ApplicationType = "Desktop"
	ApplicationTypeRemoteApp ApplicationType = "RemoteApp"
)

func PossibleApplicationTypeValues

func PossibleApplicationTypeValues() []ApplicationType

PossibleApplicationTypeValues returns the possible values for the ApplicationType const type.

type ApplicationsClient

type ApplicationsClient struct {
	// contains filtered or unexported fields
}

ApplicationsClient contains the methods for the Applications group. Don't use this type directly, use NewApplicationsClient() instead.

func NewApplicationsClient

func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error)

NewApplicationsClient creates a new instance of ApplicationsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ApplicationsClient) CreateOrUpdate

func (client *ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, application Application, options *ApplicationsClientCreateOrUpdateOptions) (ApplicationsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update an application. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group applicationName - The name of the application within the specified application group application - Object containing Application definitions. options - ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Application_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"resourceGroup1",
		"applicationGroup1",
		"application1",
		armdesktopvirtualization.Application{
			Properties: &armdesktopvirtualization.ApplicationProperties{
				Description:          to.Ptr("des1"),
				CommandLineArguments: to.Ptr("arguments"),
				CommandLineSetting:   to.Ptr(armdesktopvirtualization.CommandLineSettingAllow),
				FilePath:             to.Ptr("path"),
				FriendlyName:         to.Ptr("friendly"),
				IconIndex:            to.Ptr[int32](1),
				IconPath:             to.Ptr("icon"),
				ShowInPortal:         to.Ptr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ApplicationsClient) Delete

func (client *ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientDeleteOptions) (ApplicationsClientDeleteResponse, error)

Delete - Remove an application. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group applicationName - The name of the application within the specified application group options - ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Application_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"applicationGroup1",
		"application1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ApplicationsClient) Get

func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientGetOptions) (ApplicationsClientGetResponse, error)

Get - Get an application. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group applicationName - The name of the application within the specified application group options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Application_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"applicationGroup1",
		"application1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ApplicationsClient) NewListPager added in v0.4.0

func (client *ApplicationsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *ApplicationsClientListOptions) *runtime.Pager[ApplicationsClientListResponse]

NewListPager - List applications. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group options - ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Application_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("resourceGroup1",
		"applicationGroup1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ApplicationsClient) Update

func (client *ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientUpdateOptions) (ApplicationsClientUpdateResponse, error)

Update - Update an application. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group applicationName - The name of the application within the specified application group options - ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Application_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewApplicationsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"applicationGroup1",
		"application1",
		&armdesktopvirtualization.ApplicationsClientUpdateOptions{Application: &armdesktopvirtualization.ApplicationPatch{
			Properties: &armdesktopvirtualization.ApplicationPatchProperties{
				Description:          to.Ptr("des1"),
				ApplicationType:      to.Ptr(armdesktopvirtualization.RemoteApplicationTypeInBuilt),
				CommandLineArguments: to.Ptr("arguments"),
				CommandLineSetting:   to.Ptr(armdesktopvirtualization.CommandLineSettingAllow),
				FilePath:             to.Ptr("path"),
				FriendlyName:         to.Ptr("friendly"),
				IconIndex:            to.Ptr[int32](1),
				IconPath:             to.Ptr("icon"),
				ShowInPortal:         to.Ptr(true),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ApplicationsClientCreateOrUpdateOptions added in v0.2.0

type ApplicationsClientCreateOrUpdateOptions struct {
}

ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate method.

type ApplicationsClientCreateOrUpdateResponse added in v0.2.0

type ApplicationsClientCreateOrUpdateResponse struct {
	Application
}

ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.CreateOrUpdate.

type ApplicationsClientDeleteOptions added in v0.2.0

type ApplicationsClientDeleteOptions struct {
}

ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method.

type ApplicationsClientDeleteResponse added in v0.2.0

type ApplicationsClientDeleteResponse struct {
}

ApplicationsClientDeleteResponse contains the response from method ApplicationsClient.Delete.

type ApplicationsClientGetOptions added in v0.2.0

type ApplicationsClientGetOptions struct {
}

ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.

type ApplicationsClientGetResponse added in v0.2.0

type ApplicationsClientGetResponse struct {
	Application
}

ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get.

type ApplicationsClientListOptions added in v0.2.0

type ApplicationsClientListOptions struct {
}

ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method.

type ApplicationsClientListResponse added in v0.2.0

type ApplicationsClientListResponse struct {
	ApplicationList
}

ApplicationsClientListResponse contains the response from method ApplicationsClient.List.

type ApplicationsClientUpdateOptions added in v0.2.0

type ApplicationsClientUpdateOptions struct {
	// Object containing Application definitions.
	Application *ApplicationPatch
}

ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method.

type ApplicationsClientUpdateResponse added in v0.2.0

type ApplicationsClientUpdateResponse struct {
	Application
}

ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.Update.

type CloudError

type CloudError struct {
	Error *CloudErrorProperties `json:"error,omitempty"`
}

type CloudErrorProperties

type CloudErrorProperties struct {
	// Error code
	Code *string `json:"code,omitempty"`

	// Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

type CommandLineSetting

type CommandLineSetting string

CommandLineSetting - Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all.

const (
	CommandLineSettingAllow      CommandLineSetting = "Allow"
	CommandLineSettingDoNotAllow CommandLineSetting = "DoNotAllow"
	CommandLineSettingRequire    CommandLineSetting = "Require"
)

func PossibleCommandLineSettingValues

func PossibleCommandLineSettingValues() []CommandLineSetting

PossibleCommandLineSettingValues returns the possible values for the CommandLineSetting const type.

type Desktop

type Desktop struct {
	// Detailed properties for Desktop
	Properties *DesktopProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Desktop - Schema for Desktop properties.

type DesktopList

type DesktopList struct {
	// List of Desktop definitions.
	Value []*Desktop `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

DesktopList - List of Desktop definitions.

type DesktopPatch

type DesktopPatch struct {
	// Detailed properties for Desktop
	Properties *DesktopPatchProperties `json:"properties,omitempty"`

	// tags to be updated
	Tags map[string]*string `json:"tags,omitempty"`
}

DesktopPatch - Desktop properties that can be patched.

func (DesktopPatch) MarshalJSON

func (d DesktopPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DesktopPatch.

type DesktopPatchProperties

type DesktopPatchProperties struct {
	// Description of Desktop.
	Description *string `json:"description,omitempty"`

	// Friendly name of Desktop.
	FriendlyName *string `json:"friendlyName,omitempty"`
}

DesktopPatchProperties - Desktop properties that can be patched.

type DesktopProperties

type DesktopProperties struct {
	// Description of Desktop.
	Description *string `json:"description,omitempty"`

	// Friendly name of Desktop.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// READ-ONLY; The icon a 64 bit string as a byte array.
	IconContent []byte `json:"iconContent,omitempty" azure:"ro"`

	// READ-ONLY; Hash of the icon.
	IconHash *string `json:"iconHash,omitempty" azure:"ro"`

	// READ-ONLY; ObjectId of Desktop. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`
}

DesktopProperties - Schema for Desktop properties.

func (DesktopProperties) MarshalJSON

func (d DesktopProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DesktopProperties.

func (*DesktopProperties) UnmarshalJSON

func (d *DesktopProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DesktopProperties.

type DesktopsClient

type DesktopsClient struct {
	// contains filtered or unexported fields
}

DesktopsClient contains the methods for the Desktops group. Don't use this type directly, use NewDesktopsClient() instead.

func NewDesktopsClient

func NewDesktopsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DesktopsClient, error)

NewDesktopsClient creates a new instance of DesktopsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DesktopsClient) Get

func (client *DesktopsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientGetOptions) (DesktopsClientGetResponse, error)

Get - Get a desktop. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group desktopName - The name of the desktop within the specified desktop group options - DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Desktop_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewDesktopsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"applicationGroup1",
		"SessionDesktop",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DesktopsClient) List

func (client *DesktopsClient) List(ctx context.Context, resourceGroupName string, applicationGroupName string, options *DesktopsClientListOptions) (DesktopsClientListResponse, error)

List - List desktops. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group options - DesktopsClientListOptions contains the optional parameters for the DesktopsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Desktop_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewDesktopsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"resourceGroup1",
		"applicationGroup1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DesktopsClient) Update

func (client *DesktopsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientUpdateOptions) (DesktopsClientUpdateResponse, error)

Update - Update a desktop. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group desktopName - The name of the desktop within the specified desktop group options - DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Desktop_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewDesktopsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"applicationGroup1",
		"SessionDesktop",
		&armdesktopvirtualization.DesktopsClientUpdateOptions{Desktop: &armdesktopvirtualization.DesktopPatch{
			Properties: &armdesktopvirtualization.DesktopPatchProperties{
				Description:  to.Ptr("des1"),
				FriendlyName: to.Ptr("friendly"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type DesktopsClientGetOptions added in v0.2.0

type DesktopsClientGetOptions struct {
}

DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method.

type DesktopsClientGetResponse added in v0.2.0

type DesktopsClientGetResponse struct {
	Desktop
}

DesktopsClientGetResponse contains the response from method DesktopsClient.Get.

type DesktopsClientListOptions added in v0.2.0

type DesktopsClientListOptions struct {
}

DesktopsClientListOptions contains the optional parameters for the DesktopsClient.List method.

type DesktopsClientListResponse added in v0.2.0

type DesktopsClientListResponse struct {
	DesktopList
}

DesktopsClientListResponse contains the response from method DesktopsClient.List.

type DesktopsClientUpdateOptions added in v0.2.0

type DesktopsClientUpdateOptions struct {
	// Object containing Desktop definitions.
	Desktop *DesktopPatch
}

DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method.

type DesktopsClientUpdateResponse added in v0.2.0

type DesktopsClientUpdateResponse struct {
	Desktop
}

DesktopsClientUpdateResponse contains the response from method DesktopsClient.Update.

type ExpandMsixImage

type ExpandMsixImage struct {
	// Detailed properties for ExpandMsixImage
	Properties *ExpandMsixImageProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ExpandMsixImage - Represents the definition of contents retrieved after expanding the MSIX Image.

type ExpandMsixImageList

type ExpandMsixImageList struct {
	// List of MSIX package properties from give MSIX Image.
	Value []*ExpandMsixImage `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ExpandMsixImageList - List of MSIX package properties retrieved from MSIX Image expansion.

type ExpandMsixImageProperties

type ExpandMsixImageProperties struct {
	// User friendly Name to be displayed in the portal.
	DisplayName *string `json:"displayName,omitempty"`

	// VHD/CIM image path on Network Share.
	ImagePath *string `json:"imagePath,omitempty"`

	// Make this version of the package the active one across the hostpool.
	IsActive *bool `json:"isActive,omitempty"`

	// Specifies how to register Package in feed.
	IsRegularRegistration *bool `json:"isRegularRegistration,omitempty"`

	// Date Package was last updated, found in the appxmanifest.xml.
	LastUpdated *time.Time `json:"lastUpdated,omitempty"`

	// Alias of MSIX Package.
	PackageAlias *string `json:"packageAlias,omitempty"`

	// List of package applications.
	PackageApplications []*MsixPackageApplications `json:"packageApplications,omitempty"`

	// List of package dependencies.
	PackageDependencies []*MsixPackageDependencies `json:"packageDependencies,omitempty"`

	// Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name.
	PackageFamilyName *string `json:"packageFamilyName,omitempty"`

	// Package Full Name from appxmanifest.xml.
	PackageFullName *string `json:"packageFullName,omitempty"`

	// Package Name from appxmanifest.xml.
	PackageName *string `json:"packageName,omitempty"`

	// Relative Path to the package inside the image.
	PackageRelativePath *string `json:"packageRelativePath,omitempty"`

	// Package Version found in the appxmanifest.xml.
	Version *string `json:"version,omitempty"`
}

ExpandMsixImageProperties - Schema for Expand MSIX Image properties.

func (ExpandMsixImageProperties) MarshalJSON

func (e ExpandMsixImageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExpandMsixImageProperties.

func (*ExpandMsixImageProperties) UnmarshalJSON

func (e *ExpandMsixImageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExpandMsixImageProperties.

type HealthCheckName

type HealthCheckName string

HealthCheckName - Represents the name of the health check operation performed.

const (
	// HealthCheckNameAppAttachHealthCheck - Verifies that the AppAttachService is healthy (there were no issues during package
	// staging). The AppAttachService is used to enable the staging/registration (and eventual deregistration/destaging) of MSIX
	// apps that have been set up by the tenant admin. This checks whether the component had any failures during package staging.
	// Failures in staging will prevent some MSIX apps from working properly for the end user. If this check fails, it is non
	// fatal and the machine still can service connections, main issue may be certain apps will not work for end-users.
	HealthCheckNameAppAttachHealthCheck HealthCheckName = "AppAttachHealthCheck"
	// HealthCheckNameDomainJoinedCheck - Verifies the SessionHost is joined to a domain. If this check fails is classified as
	// fatal as no connection can succeed if the SessionHost is not joined to the domain.
	HealthCheckNameDomainJoinedCheck HealthCheckName = "DomainJoinedCheck"
	// HealthCheckNameDomainReachable - Verifies the domain the SessionHost is joined to is still reachable. If this check fails
	// is classified as fatal as no connection can succeed if the domain the SessionHost is joined is not reachable at the time
	// of connection.
	HealthCheckNameDomainReachable HealthCheckName = "DomainReachable"
	// HealthCheckNameDomainTrustCheck - Verifies the SessionHost is not experiencing domain trust issues that will prevent authentication
	// on SessionHost at connection time when session is created. If this check fails is classified as fatal as no connection
	// can succeed if we cannot reach the domain for authentication on the SessionHost.
	HealthCheckNameDomainTrustCheck HealthCheckName = "DomainTrustCheck"
	// HealthCheckNameFSLogixHealthCheck - Verifies the FSLogix service is up and running to make sure users' profiles are loaded
	// in the session. If this check fails is classified as fatal as even if the connection can succeed, user experience is bad
	// as the user profile cannot be loaded and user will get a temporary profile in the session.
	HealthCheckNameFSLogixHealthCheck HealthCheckName = "FSLogixHealthCheck"
	// HealthCheckNameMetaDataServiceCheck - Verifies the metadata service is accessible and return compute properties.
	HealthCheckNameMetaDataServiceCheck HealthCheckName = "MetaDataServiceCheck"
	// HealthCheckNameMonitoringAgentCheck - Verifies that the required Geneva agent is running. If this check fails, it is non
	// fatal and the machine still can service connections, main issue may be that monitoring agent is missing or running (possibly)
	// older version.
	HealthCheckNameMonitoringAgentCheck HealthCheckName = "MonitoringAgentCheck"
	// HealthCheckNameSupportedEncryptionCheck - Verifies the value of SecurityLayer registration key. If the value is 0 (SecurityLayer.RDP)
	// this check fails with Error code = NativeMethodErrorCode.E_FAIL and is fatal. If the value is 1 (SecurityLayer.Negotiate)
	// this check fails with Error code = NativeMethodErrorCode.ERROR_SUCCESS and is non fatal.
	HealthCheckNameSupportedEncryptionCheck HealthCheckName = "SupportedEncryptionCheck"
	// HealthCheckNameSxSStackListenerCheck - Verifies that the SxS stack is up and running so connections can succeed. If this
	// check fails is classified as fatal as no connection can succeed if the SxS stack is not ready.
	HealthCheckNameSxSStackListenerCheck HealthCheckName = "SxSStackListenerCheck"
	// HealthCheckNameUrlsAccessibleCheck - Verifies that the required WVD service and Geneva URLs are reachable from the SessionHost.
	// These URLs are: RdTokenUri, RdBrokerURI, RdDiagnosticsUri and storage blob URLs for agent monitoring (geneva). If this
	// check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is
	// unable to store warm path data (logs, operations ...).
	HealthCheckNameUrlsAccessibleCheck HealthCheckName = "UrlsAccessibleCheck"
	// HealthCheckNameWebRTCRedirectorCheck - Verifies whether the WebRTCRedirector component is healthy. The WebRTCRedirector
	// component is used to optimize video and audio performance in Microsoft Teams. This checks whether the component is still
	// running, and whether there is a higher version available. If this check fails, it is non fatal and the machine still can
	// service connections, main issue may be the WebRTCRedirector component has to be restarted or updated.
	HealthCheckNameWebRTCRedirectorCheck HealthCheckName = "WebRTCRedirectorCheck"
)

func PossibleHealthCheckNameValues

func PossibleHealthCheckNameValues() []HealthCheckName

PossibleHealthCheckNameValues returns the possible values for the HealthCheckName const type.

type HealthCheckResult

type HealthCheckResult string

HealthCheckResult - Represents the Health state of the health check we performed.

const (
	// HealthCheckResultHealthCheckFailed - Health check failed.
	HealthCheckResultHealthCheckFailed HealthCheckResult = "HealthCheckFailed"
	// HealthCheckResultHealthCheckSucceeded - Health check passed.
	HealthCheckResultHealthCheckSucceeded HealthCheckResult = "HealthCheckSucceeded"
	// HealthCheckResultSessionHostShutdown - We received a Shutdown notification.
	HealthCheckResultSessionHostShutdown HealthCheckResult = "SessionHostShutdown"
	// HealthCheckResultUnknown - Health check result is not currently known.
	HealthCheckResultUnknown HealthCheckResult = "Unknown"
)

func PossibleHealthCheckResultValues

func PossibleHealthCheckResultValues() []HealthCheckResult

PossibleHealthCheckResultValues returns the possible values for the HealthCheckResult const type.

type HostPool

type HostPool struct {
	// REQUIRED; Detailed properties for HostPool
	Properties *HostPoolProperties                          `json:"properties,omitempty"`
	Identity   *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"`

	// 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.
	Kind *string `json:"kind,omitempty"`

	// The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// 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.
	ManagedBy *string                                  `json:"managedBy,omitempty"`
	Plan      *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"`
	SKU       *ResourceModelWithAllowedPropertySetSKU  `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; 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.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

HostPool - Represents a HostPool definition.

func (HostPool) MarshalJSON

func (h HostPool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HostPool.

type HostPoolList

type HostPoolList struct {
	// List of HostPool definitions.
	Value []*HostPool `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

HostPoolList - List of HostPool definitions.

type HostPoolPatch

type HostPoolPatch struct {
	// HostPool properties that can be patched.
	Properties *HostPoolPatchProperties `json:"properties,omitempty"`

	// tags to be updated
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

HostPoolPatch - HostPool properties that can be patched.

func (HostPoolPatch) MarshalJSON

func (h HostPoolPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HostPoolPatch.

type HostPoolPatchProperties

type HostPoolPatchProperties struct {
	// Custom rdp property of HostPool.
	CustomRdpProperty *string `json:"customRdpProperty,omitempty"`

	// Description of HostPool.
	Description *string `json:"description,omitempty"`

	// Friendly name of HostPool.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// The type of the load balancer.
	LoadBalancerType *LoadBalancerType `json:"loadBalancerType,omitempty"`

	// The max session limit of HostPool.
	MaxSessionLimit *int32 `json:"maxSessionLimit,omitempty"`

	// PersonalDesktopAssignment type for HostPool.
	PersonalDesktopAssignmentType *PersonalDesktopAssignmentType `json:"personalDesktopAssignmentType,omitempty"`

	// The type of preferred application group type, default to Desktop Application Group
	PreferredAppGroupType *PreferredAppGroupType `json:"preferredAppGroupType,omitempty"`

	// The registration info of HostPool.
	RegistrationInfo *RegistrationInfoPatch `json:"registrationInfo,omitempty"`

	// The ring number of HostPool.
	Ring *int32 `json:"ring,omitempty"`

	// ClientId for the registered Relying Party used to issue WVD SSO certificates.
	SsoClientID *string `json:"ssoClientId,omitempty"`

	// Path to Azure KeyVault storing the secret used for communication to ADFS.
	SsoClientSecretKeyVaultPath *string `json:"ssoClientSecretKeyVaultPath,omitempty"`

	// The type of single sign on Secret Type.
	SsoSecretType *SSOSecretType `json:"ssoSecretType,omitempty"`

	// URL to customer ADFS server for signing WVD SSO certificates.
	SsoadfsAuthority *string `json:"ssoadfsAuthority,omitempty"`

	// The flag to turn on/off StartVMOnConnect feature.
	StartVMOnConnect *bool `json:"startVMOnConnect,omitempty"`

	// VM template for sessionhosts configuration within hostpool.
	VMTemplate *string `json:"vmTemplate,omitempty"`

	// Is validation environment.
	ValidationEnvironment *bool `json:"validationEnvironment,omitempty"`
}

HostPoolPatchProperties - Properties of HostPool.

type HostPoolProperties

type HostPoolProperties struct {
	// REQUIRED; HostPool type for desktop.
	HostPoolType *HostPoolType `json:"hostPoolType,omitempty"`

	// REQUIRED; The type of the load balancer.
	LoadBalancerType *LoadBalancerType `json:"loadBalancerType,omitempty"`

	// REQUIRED; The type of preferred application group type, default to Desktop Application Group
	PreferredAppGroupType *PreferredAppGroupType `json:"preferredAppGroupType,omitempty"`

	// Custom rdp property of HostPool.
	CustomRdpProperty *string `json:"customRdpProperty,omitempty"`

	// Description of HostPool.
	Description *string `json:"description,omitempty"`

	// Friendly name of HostPool.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// The max session limit of HostPool.
	MaxSessionLimit *int32 `json:"maxSessionLimit,omitempty"`

	// The registration info of HostPool.
	MigrationRequest *MigrationRequestProperties `json:"migrationRequest,omitempty"`

	// PersonalDesktopAssignment type for HostPool.
	PersonalDesktopAssignmentType *PersonalDesktopAssignmentType `json:"personalDesktopAssignmentType,omitempty"`

	// The registration info of HostPool.
	RegistrationInfo *RegistrationInfo `json:"registrationInfo,omitempty"`

	// The ring number of HostPool.
	Ring *int32 `json:"ring,omitempty"`

	// ClientId for the registered Relying Party used to issue WVD SSO certificates.
	SsoClientID *string `json:"ssoClientId,omitempty"`

	// Path to Azure KeyVault storing the secret used for communication to ADFS.
	SsoClientSecretKeyVaultPath *string `json:"ssoClientSecretKeyVaultPath,omitempty"`

	// The type of single sign on Secret Type.
	SsoSecretType *SSOSecretType `json:"ssoSecretType,omitempty"`

	// URL to customer ADFS server for signing WVD SSO certificates.
	SsoadfsAuthority *string `json:"ssoadfsAuthority,omitempty"`

	// The flag to turn on/off StartVMOnConnect feature.
	StartVMOnConnect *bool `json:"startVMOnConnect,omitempty"`

	// VM template for sessionhosts configuration within hostpool.
	VMTemplate *string `json:"vmTemplate,omitempty"`

	// Is validation environment.
	ValidationEnvironment *bool `json:"validationEnvironment,omitempty"`

	// READ-ONLY; List of applicationGroup links.
	ApplicationGroupReferences []*string `json:"applicationGroupReferences,omitempty" azure:"ro"`

	// READ-ONLY; Is cloud pc resource.
	CloudPcResource *bool `json:"cloudPcResource,omitempty" azure:"ro"`

	// READ-ONLY; ObjectId of HostPool. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`
}

HostPoolProperties - Properties of HostPool.

func (HostPoolProperties) MarshalJSON

func (h HostPoolProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HostPoolProperties.

type HostPoolType

type HostPoolType string

HostPoolType - HostPool type for desktop.

const (
	// HostPoolTypeBYODesktop - Users assign their own machines, load balancing logic remains the same as Personal. PersonalDesktopAssignmentType
	// must be Direct.
	HostPoolTypeBYODesktop HostPoolType = "BYODesktop"
	// HostPoolTypePersonal - Users will be assigned a SessionHost either by administrators (PersonalDesktopAssignmentType = Direct)
	// or upon connecting to the pool (PersonalDesktopAssignmentType = Automatic). They will always be redirected to their assigned
	// SessionHost.
	HostPoolTypePersonal HostPoolType = "Personal"
	// HostPoolTypePooled - Users get a new (random) SessionHost every time it connects to the HostPool.
	HostPoolTypePooled HostPoolType = "Pooled"
)

func PossibleHostPoolTypeValues

func PossibleHostPoolTypeValues() []HostPoolType

PossibleHostPoolTypeValues returns the possible values for the HostPoolType const type.

type HostPoolsClient

type HostPoolsClient struct {
	// contains filtered or unexported fields
}

HostPoolsClient contains the methods for the HostPools group. Don't use this type directly, use NewHostPoolsClient() instead.

func NewHostPoolsClient

func NewHostPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HostPoolsClient, error)

NewHostPoolsClient creates a new instance of HostPoolsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*HostPoolsClient) CreateOrUpdate

func (client *HostPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, hostPool HostPool, options *HostPoolsClientCreateOrUpdateOptions) (HostPoolsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a host pool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group hostPool - Object containing HostPool definitions. options - HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/HostPool_Create.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewHostPoolsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"resourceGroup1",
		"hostPool1",
		armdesktopvirtualization.HostPool{
			Location: to.Ptr("centralus"),
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
			Properties: &armdesktopvirtualization.HostPoolProperties{
				Description:      to.Ptr("des1"),
				FriendlyName:     to.Ptr("friendly"),
				HostPoolType:     to.Ptr(armdesktopvirtualization.HostPoolTypePooled),
				LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst),
				MaxSessionLimit:  to.Ptr[int32](999999),
				MigrationRequest: &armdesktopvirtualization.MigrationRequestProperties{
					MigrationPath: to.Ptr("TenantGroups/{defaultV1TenantGroup.Name}/Tenants/{defaultV1Tenant.Name}/HostPools/{sessionHostPool.Name}"),
					Operation:     to.Ptr(armdesktopvirtualization.OperationStart),
				},
				PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic),
				PreferredAppGroupType:         to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop),
				RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{
					ExpirationTime:             to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T14:01:54.9571247Z"); return t }()),
					RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate),
				},
				SsoClientID:                 to.Ptr("client"),
				SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"),
				SsoSecretType:               to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey),
				SsoadfsAuthority:            to.Ptr("https://adfs"),
				StartVMOnConnect:            to.Ptr(false),
				VMTemplate:                  to.Ptr("{json:json}"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*HostPoolsClient) Delete

func (client *HostPoolsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientDeleteOptions) (HostPoolsClientDeleteResponse, error)

Delete - Remove a host pool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/HostPool_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewHostPoolsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"hostPool1",
		&armdesktopvirtualization.HostPoolsClientDeleteOptions{Force: to.Ptr(true)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*HostPoolsClient) Get

func (client *HostPoolsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientGetOptions) (HostPoolsClientGetResponse, error)

Get - Get a host pool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/HostPool_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewHostPoolsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"hostPool1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*HostPoolsClient) NewListByResourceGroupPager added in v0.4.0

func (client *HostPoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostPoolsClientListByResourceGroupOptions) *runtime.Pager[HostPoolsClientListByResourceGroupResponse]

NewListByResourceGroupPager - List hostPools. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. options - HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/HostPool_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewHostPoolsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("resourceGroup1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*HostPoolsClient) NewListPager added in v0.4.0

NewListPager - List hostPools in subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 options - HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/HostPool_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewHostPoolsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*HostPoolsClient) RetrieveRegistrationToken

func (client *HostPoolsClient) RetrieveRegistrationToken(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientRetrieveRegistrationTokenOptions) (HostPoolsClientRetrieveRegistrationTokenResponse, error)

RetrieveRegistrationToken - Registration token of the host pool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/HostPools_RetrieveRegistrationToken_Post.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewHostPoolsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.RetrieveRegistrationToken(ctx,
		"resourceGroup1",
		"hostPool1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*HostPoolsClient) Update

func (client *HostPoolsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientUpdateOptions) (HostPoolsClientUpdateResponse, error)

Update - Update a host pool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/HostPool_Update.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewHostPoolsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"hostPool1",
		&armdesktopvirtualization.HostPoolsClientUpdateOptions{HostPool: &armdesktopvirtualization.HostPoolPatch{
			Properties: &armdesktopvirtualization.HostPoolPatchProperties{
				Description:                   to.Ptr("des1"),
				FriendlyName:                  to.Ptr("friendly"),
				LoadBalancerType:              to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst),
				MaxSessionLimit:               to.Ptr[int32](999999),
				PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic),
				RegistrationInfo: &armdesktopvirtualization.RegistrationInfoPatch{
					ExpirationTime:             to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T15:01:54.9571247Z"); return t }()),
					RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate),
				},
				SsoClientID:                 to.Ptr("client"),
				SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"),
				SsoSecretType:               to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey),
				SsoadfsAuthority:            to.Ptr("https://adfs"),
				StartVMOnConnect:            to.Ptr(false),
				VMTemplate:                  to.Ptr("{json:json}"),
			},
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type HostPoolsClientCreateOrUpdateOptions added in v0.2.0

type HostPoolsClientCreateOrUpdateOptions struct {
}

HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate method.

type HostPoolsClientCreateOrUpdateResponse added in v0.2.0

type HostPoolsClientCreateOrUpdateResponse struct {
	HostPool
}

HostPoolsClientCreateOrUpdateResponse contains the response from method HostPoolsClient.CreateOrUpdate.

type HostPoolsClientDeleteOptions added in v0.2.0

type HostPoolsClientDeleteOptions struct {
	// Force flag to delete sessionHost.
	Force *bool
}

HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method.

type HostPoolsClientDeleteResponse added in v0.2.0

type HostPoolsClientDeleteResponse struct {
}

HostPoolsClientDeleteResponse contains the response from method HostPoolsClient.Delete.

type HostPoolsClientGetOptions added in v0.2.0

type HostPoolsClientGetOptions struct {
}

HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method.

type HostPoolsClientGetResponse added in v0.2.0

type HostPoolsClientGetResponse struct {
	HostPool
}

HostPoolsClientGetResponse contains the response from method HostPoolsClient.Get.

type HostPoolsClientListByResourceGroupOptions added in v0.2.0

type HostPoolsClientListByResourceGroupOptions struct {
}

HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.ListByResourceGroup method.

type HostPoolsClientListByResourceGroupResponse added in v0.2.0

type HostPoolsClientListByResourceGroupResponse struct {
	HostPoolList
}

HostPoolsClientListByResourceGroupResponse contains the response from method HostPoolsClient.ListByResourceGroup.

type HostPoolsClientListOptions added in v0.2.0

type HostPoolsClientListOptions struct {
}

HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.List method.

type HostPoolsClientListResponse added in v0.2.0

type HostPoolsClientListResponse struct {
	HostPoolList
}

HostPoolsClientListResponse contains the response from method HostPoolsClient.List.

type HostPoolsClientRetrieveRegistrationTokenOptions added in v0.2.0

type HostPoolsClientRetrieveRegistrationTokenOptions struct {
}

HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken method.

type HostPoolsClientRetrieveRegistrationTokenResponse added in v0.2.0

type HostPoolsClientRetrieveRegistrationTokenResponse struct {
	RegistrationInfo
}

HostPoolsClientRetrieveRegistrationTokenResponse contains the response from method HostPoolsClient.RetrieveRegistrationToken.

type HostPoolsClientUpdateOptions added in v0.2.0

type HostPoolsClientUpdateOptions struct {
	// Object containing HostPool definitions.
	HostPool *HostPoolPatch
}

HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method.

type HostPoolsClientUpdateResponse added in v0.2.0

type HostPoolsClientUpdateResponse struct {
	HostPool
}

HostPoolsClientUpdateResponse contains the response from method HostPoolsClient.Update.

type Identity

type Identity struct {
	// The identity type.
	Type *string `json:"type,omitempty"`

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID of resource.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

Identity for the resource.

type LoadBalancerType

type LoadBalancerType string

LoadBalancerType - The type of the load balancer.

const (
	LoadBalancerTypeBreadthFirst LoadBalancerType = "BreadthFirst"
	LoadBalancerTypeDepthFirst   LoadBalancerType = "DepthFirst"
	LoadBalancerTypePersistent   LoadBalancerType = "Persistent"
)

func PossibleLoadBalancerTypeValues

func PossibleLoadBalancerTypeValues() []LoadBalancerType

PossibleLoadBalancerTypeValues returns the possible values for the LoadBalancerType const type.

type LogSpecification

type LogSpecification struct {
	// Blob duration of the log
	BlobDuration *string `json:"blobDuration,omitempty"`

	// Localized friendly display name of the log
	DisplayName *string `json:"displayName,omitempty"`

	// Name of the log
	Name *string `json:"name,omitempty"`
}

LogSpecification - Specifications of the Log for Azure Monitoring

type MSIXImageURI

type MSIXImageURI struct {
	// URI to Image
	URI *string `json:"uri,omitempty"`
}

MSIXImageURI - Represents URI referring to MSIX Image

type MSIXPackage

type MSIXPackage struct {
	// REQUIRED; Detailed properties for MSIX Package
	Properties *MSIXPackageProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

MSIXPackage - Schema for MSIX Package properties.

type MSIXPackageList

type MSIXPackageList struct {
	// List of MSIX Package definitions.
	Value []*MSIXPackage `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

MSIXPackageList - List of MSIX Package definitions.

type MSIXPackagePatch

type MSIXPackagePatch struct {
	// Detailed properties for MSIX Package
	Properties *MSIXPackagePatchProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

MSIXPackagePatch - MSIX Package properties that can be patched.

func (MSIXPackagePatch) MarshalJSON

func (m MSIXPackagePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MSIXPackagePatch.

type MSIXPackagePatchProperties

type MSIXPackagePatchProperties struct {
	// Display name for MSIX Package.
	DisplayName *string `json:"displayName,omitempty"`

	// Set a version of the package to be active across hostpool.
	IsActive *bool `json:"isActive,omitempty"`

	// Set Registration mode. Regular or Delayed.
	IsRegularRegistration *bool `json:"isRegularRegistration,omitempty"`
}

MSIXPackagePatchProperties - MSIX Package properties that can be patched.

type MSIXPackageProperties

type MSIXPackageProperties struct {
	// User friendly Name to be displayed in the portal.
	DisplayName *string `json:"displayName,omitempty"`

	// VHD/CIM image path on Network Share.
	ImagePath *string `json:"imagePath,omitempty"`

	// Make this version of the package the active one across the hostpool.
	IsActive *bool `json:"isActive,omitempty"`

	// Specifies how to register Package in feed.
	IsRegularRegistration *bool `json:"isRegularRegistration,omitempty"`

	// Date Package was last updated, found in the appxmanifest.xml.
	LastUpdated *time.Time `json:"lastUpdated,omitempty"`

	// List of package applications.
	PackageApplications []*MsixPackageApplications `json:"packageApplications,omitempty"`

	// List of package dependencies.
	PackageDependencies []*MsixPackageDependencies `json:"packageDependencies,omitempty"`

	// Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name.
	PackageFamilyName *string `json:"packageFamilyName,omitempty"`

	// Package Name from appxmanifest.xml.
	PackageName *string `json:"packageName,omitempty"`

	// Relative Path to the package inside the image.
	PackageRelativePath *string `json:"packageRelativePath,omitempty"`

	// Package Version found in the appxmanifest.xml.
	Version *string `json:"version,omitempty"`
}

MSIXPackageProperties - Schema for MSIX Package properties.

func (MSIXPackageProperties) MarshalJSON

func (m MSIXPackageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MSIXPackageProperties.

func (*MSIXPackageProperties) UnmarshalJSON

func (m *MSIXPackageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackageProperties.

type MSIXPackagesClient

type MSIXPackagesClient struct {
	// contains filtered or unexported fields
}

MSIXPackagesClient contains the methods for the MSIXPackages group. Don't use this type directly, use NewMSIXPackagesClient() instead.

func NewMSIXPackagesClient

func NewMSIXPackagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MSIXPackagesClient, error)

NewMSIXPackagesClient creates a new instance of MSIXPackagesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*MSIXPackagesClient) CreateOrUpdate

func (client *MSIXPackagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, msixPackage MSIXPackage, options *MSIXPackagesClientCreateOrUpdateOptions) (MSIXPackagesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a MSIX package. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool msixPackage - Object containing MSIX Package definitions. options - MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/MsixPackage_Create.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewMSIXPackagesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"resourceGroup1",
		"hostpool1",
		"msixpackagefullname",
		armdesktopvirtualization.MSIXPackage{
			Properties: &armdesktopvirtualization.MSIXPackageProperties{
				DisplayName:           to.Ptr("displayname"),
				ImagePath:             to.Ptr("imagepath"),
				IsActive:              to.Ptr(false),
				IsRegularRegistration: to.Ptr(false),
				LastUpdated:           to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.9571247Z"); return t }()),
				PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{
					{
						Description:    to.Ptr("application-desc"),
						AppID:          to.Ptr("ApplicationId"),
						AppUserModelID: to.Ptr("AppUserModelId"),
						FriendlyName:   to.Ptr("friendlyname"),
						IconImageName:  to.Ptr("Apptile"),
						RawIcon:        []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"),
						RawPNG:         []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"),
					}},
				PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{
					{
						DependencyName: to.Ptr("MsixTest_Dependency_Name"),
						MinVersion:     to.Ptr("version"),
						Publisher:      to.Ptr("PublishedName"),
					}},
				PackageFamilyName:   to.Ptr("MsixPackage_FamilyName"),
				PackageName:         to.Ptr("MsixPackage_name"),
				PackageRelativePath: to.Ptr("packagerelativepath"),
				Version:             to.Ptr("version"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*MSIXPackagesClient) Delete

func (client *MSIXPackagesClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientDeleteOptions) (MSIXPackagesClientDeleteResponse, error)

Delete - Remove an MSIX Package. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool options - MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/MsixPackage_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewMSIXPackagesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"hostpool1",
		"packagefullname",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*MSIXPackagesClient) Get

func (client *MSIXPackagesClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientGetOptions) (MSIXPackagesClientGetResponse, error)

Get - Get a msixpackage. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool options - MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/MsixPackage_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewMSIXPackagesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"hostpool1",
		"packagefullname",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*MSIXPackagesClient) NewListPager added in v0.4.0

func (client *MSIXPackagesClient) NewListPager(resourceGroupName string, hostPoolName string, options *MSIXPackagesClientListOptions) *runtime.Pager[MSIXPackagesClientListResponse]

NewListPager - List MSIX packages in hostpool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/MsixPackage_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewMSIXPackagesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("resourceGroup1",
		"hostpool1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*MSIXPackagesClient) Update

func (client *MSIXPackagesClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientUpdateOptions) (MSIXPackagesClientUpdateResponse, error)

Update - Update an MSIX Package. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool options - MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/MsixPackage_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewMSIXPackagesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"hostpool1",
		"msixpackagefullname",
		&armdesktopvirtualization.MSIXPackagesClientUpdateOptions{MsixPackage: &armdesktopvirtualization.MSIXPackagePatch{
			Properties: &armdesktopvirtualization.MSIXPackagePatchProperties{
				DisplayName:           to.Ptr("displayname"),
				IsActive:              to.Ptr(true),
				IsRegularRegistration: to.Ptr(false),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type MSIXPackagesClientCreateOrUpdateOptions added in v0.2.0

type MSIXPackagesClientCreateOrUpdateOptions struct {
}

MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate method.

type MSIXPackagesClientCreateOrUpdateResponse added in v0.2.0

type MSIXPackagesClientCreateOrUpdateResponse struct {
	MSIXPackage
}

MSIXPackagesClientCreateOrUpdateResponse contains the response from method MSIXPackagesClient.CreateOrUpdate.

type MSIXPackagesClientDeleteOptions added in v0.2.0

type MSIXPackagesClientDeleteOptions struct {
}

MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method.

type MSIXPackagesClientDeleteResponse added in v0.2.0

type MSIXPackagesClientDeleteResponse struct {
}

MSIXPackagesClientDeleteResponse contains the response from method MSIXPackagesClient.Delete.

type MSIXPackagesClientGetOptions added in v0.2.0

type MSIXPackagesClientGetOptions struct {
}

MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method.

type MSIXPackagesClientGetResponse added in v0.2.0

type MSIXPackagesClientGetResponse struct {
	MSIXPackage
}

MSIXPackagesClientGetResponse contains the response from method MSIXPackagesClient.Get.

type MSIXPackagesClientListOptions added in v0.2.0

type MSIXPackagesClientListOptions struct {
}

MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.List method.

type MSIXPackagesClientListResponse added in v0.2.0

type MSIXPackagesClientListResponse struct {
	MSIXPackageList
}

MSIXPackagesClientListResponse contains the response from method MSIXPackagesClient.List.

type MSIXPackagesClientUpdateOptions added in v0.2.0

type MSIXPackagesClientUpdateOptions struct {
	// Object containing MSIX Package definitions.
	MsixPackage *MSIXPackagePatch
}

MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method.

type MSIXPackagesClientUpdateResponse added in v0.2.0

type MSIXPackagesClientUpdateResponse struct {
	MSIXPackage
}

MSIXPackagesClientUpdateResponse contains the response from method MSIXPackagesClient.Update.

type MigrationRequestProperties

type MigrationRequestProperties struct {
	// The path to the legacy object to migrate.
	MigrationPath *string `json:"migrationPath,omitempty"`

	// The type of operation for migration.
	Operation *Operation `json:"operation,omitempty"`
}

MigrationRequestProperties - Properties for arm migration.

type MsixImagesClient

type MsixImagesClient struct {
	// contains filtered or unexported fields
}

MsixImagesClient contains the methods for the MsixImages group. Don't use this type directly, use NewMsixImagesClient() instead.

func NewMsixImagesClient

func NewMsixImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MsixImagesClient, error)

NewMsixImagesClient creates a new instance of MsixImagesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*MsixImagesClient) NewExpandPager added in v0.4.0

func (client *MsixImagesClient) NewExpandPager(resourceGroupName string, hostPoolName string, msixImageURI MSIXImageURI, options *MsixImagesClientExpandOptions) *runtime.Pager[MsixImagesClientExpandResponse]

NewExpandPager - Expands and Lists MSIX packages in an Image, given the Image Path. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group msixImageURI - Object containing URI to MSIX Image options - MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.Expand method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/MsixImage_Expand_Post.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewMsixImagesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewExpandPager("resourceGroup1",
		"hostpool1",
		armdesktopvirtualization.MSIXImageURI{
			URI: to.Ptr("imagepath"),
		},
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type MsixImagesClientExpandOptions added in v0.2.0

type MsixImagesClientExpandOptions struct {
}

MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.Expand method.

type MsixImagesClientExpandResponse added in v0.2.0

type MsixImagesClientExpandResponse struct {
	ExpandMsixImageList
}

MsixImagesClientExpandResponse contains the response from method MsixImagesClient.Expand.

type MsixPackageApplications

type MsixPackageApplications struct {
	// Package Application Id, found in appxmanifest.xml.
	AppID *string `json:"appId,omitempty"`

	// Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml.
	AppUserModelID *string `json:"appUserModelID,omitempty"`

	// Description of Package Application.
	Description *string `json:"description,omitempty"`

	// User friendly name.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// User friendly name.
	IconImageName *string `json:"iconImageName,omitempty"`

	// the icon a 64 bit string as a byte array.
	RawIcon []byte `json:"rawIcon,omitempty"`

	// the icon a 64 bit string as a byte array.
	RawPNG []byte `json:"rawPng,omitempty"`
}

MsixPackageApplications - Schema for MSIX Package Application properties.

func (MsixPackageApplications) MarshalJSON

func (m MsixPackageApplications) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MsixPackageApplications.

func (*MsixPackageApplications) UnmarshalJSON

func (m *MsixPackageApplications) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MsixPackageApplications.

type MsixPackageDependencies

type MsixPackageDependencies struct {
	// Name of package dependency.
	DependencyName *string `json:"dependencyName,omitempty"`

	// Dependency version required.
	MinVersion *string `json:"minVersion,omitempty"`

	// Name of dependency publisher.
	Publisher *string `json:"publisher,omitempty"`
}

MsixPackageDependencies - Schema for MSIX Package Dependencies properties.

type Operation

type Operation string

Operation - The type of operation for migration.

const (
	// OperationComplete - Complete the migration.
	OperationComplete Operation = "Complete"
	// OperationHide - Hide the hostpool.
	OperationHide Operation = "Hide"
	// OperationRevoke - Revoke the migration.
	OperationRevoke Operation = "Revoke"
	// OperationStart - Start the migration.
	OperationStart Operation = "Start"
	// OperationUnhide - Unhide the hostpool.
	OperationUnhide Operation = "Unhide"
)

func PossibleOperationValues

func PossibleOperationValues() []Operation

PossibleOperationValues returns the possible values for the Operation const type.

type OperationProperties

type OperationProperties struct {
	// Service specification payload
	ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
}

OperationProperties - Properties of the operation

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) List

List - List all of the available operations the Desktop Virtualization resource provider supports. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/OperationDescription_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	ResourceProviderOperationList
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type PersonalDesktopAssignmentType

type PersonalDesktopAssignmentType string

PersonalDesktopAssignmentType - PersonalDesktopAssignment type for HostPool.

const (
	PersonalDesktopAssignmentTypeAutomatic PersonalDesktopAssignmentType = "Automatic"
	PersonalDesktopAssignmentTypeDirect    PersonalDesktopAssignmentType = "Direct"
)

func PossiblePersonalDesktopAssignmentTypeValues

func PossiblePersonalDesktopAssignmentTypeValues() []PersonalDesktopAssignmentType

PossiblePersonalDesktopAssignmentTypeValues returns the possible values for the PersonalDesktopAssignmentType const type.

type Plan

type Plan struct {
	// REQUIRED; A user defined name of the 3rd Party Artifact that is being procured.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact
	// at the time of Data Market onboarding.
	Product *string `json:"product,omitempty"`

	// REQUIRED; The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic
	Publisher *string `json:"publisher,omitempty"`

	// A publisher provided promotion code as provisioned in Data Market for the said product/artifact.
	PromotionCode *string `json:"promotionCode,omitempty"`

	// The version of the desired product/artifact.
	Version *string `json:"version,omitempty"`
}

Plan for the resource.

type PreferredAppGroupType

type PreferredAppGroupType string

PreferredAppGroupType - The type of preferred application group type, default to Desktop Application Group

const (
	PreferredAppGroupTypeDesktop          PreferredAppGroupType = "Desktop"
	PreferredAppGroupTypeNone             PreferredAppGroupType = "None"
	PreferredAppGroupTypeRailApplications PreferredAppGroupType = "RailApplications"
)

func PossiblePreferredAppGroupTypeValues

func PossiblePreferredAppGroupTypeValues() []PreferredAppGroupType

PossiblePreferredAppGroupTypeValues returns the possible values for the PreferredAppGroupType const type.

type RegistrationInfo

type RegistrationInfo struct {
	// Expiration time of registration token.
	ExpirationTime *time.Time `json:"expirationTime,omitempty"`

	// The type of resetting the token.
	RegistrationTokenOperation *RegistrationTokenOperation `json:"registrationTokenOperation,omitempty"`

	// The registration token base64 encoded string.
	Token *string `json:"token,omitempty"`
}

RegistrationInfo - Represents a RegistrationInfo definition.

func (RegistrationInfo) MarshalJSON

func (r RegistrationInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationInfo.

func (*RegistrationInfo) UnmarshalJSON

func (r *RegistrationInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationInfo.

type RegistrationInfoPatch

type RegistrationInfoPatch struct {
	// Expiration time of registration token.
	ExpirationTime *time.Time `json:"expirationTime,omitempty"`

	// The type of resetting the token.
	RegistrationTokenOperation *RegistrationTokenOperation `json:"registrationTokenOperation,omitempty"`
}

RegistrationInfoPatch - Represents a RegistrationInfo definition.

func (RegistrationInfoPatch) MarshalJSON

func (r RegistrationInfoPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegistrationInfoPatch.

func (*RegistrationInfoPatch) UnmarshalJSON

func (r *RegistrationInfoPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationInfoPatch.

type RegistrationTokenOperation

type RegistrationTokenOperation string

RegistrationTokenOperation - The type of resetting the token.

const (
	RegistrationTokenOperationDelete RegistrationTokenOperation = "Delete"
	RegistrationTokenOperationNone   RegistrationTokenOperation = "None"
	RegistrationTokenOperationUpdate RegistrationTokenOperation = "Update"
)

func PossibleRegistrationTokenOperationValues

func PossibleRegistrationTokenOperationValues() []RegistrationTokenOperation

PossibleRegistrationTokenOperationValues returns the possible values for the RegistrationTokenOperation const type.

type RemoteApplicationType

type RemoteApplicationType string

RemoteApplicationType - Resource Type of Application.

const (
	RemoteApplicationTypeInBuilt         RemoteApplicationType = "InBuilt"
	RemoteApplicationTypeMsixApplication RemoteApplicationType = "MsixApplication"
)

func PossibleRemoteApplicationTypeValues

func PossibleRemoteApplicationTypeValues() []RemoteApplicationType

PossibleRemoteApplicationTypeValues returns the possible values for the RemoteApplicationType const type.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

type ResourceModelWithAllowedPropertySet

type ResourceModelWithAllowedPropertySet struct {
	Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"`

	// 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.
	Kind *string `json:"kind,omitempty"`

	// The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// 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.
	ManagedBy *string                                  `json:"managedBy,omitempty"`
	Plan      *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"`
	SKU       *ResourceModelWithAllowedPropertySetSKU  `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; 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.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ResourceModelWithAllowedPropertySet - The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.

func (ResourceModelWithAllowedPropertySet) MarshalJSON

func (r ResourceModelWithAllowedPropertySet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySet.

type ResourceModelWithAllowedPropertySetIdentity

type ResourceModelWithAllowedPropertySetIdentity struct {
	// The identity type.
	Type *string `json:"type,omitempty"`

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID of resource.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

type ResourceModelWithAllowedPropertySetPlan

type ResourceModelWithAllowedPropertySetPlan struct {
	// REQUIRED; A user defined name of the 3rd Party Artifact that is being procured.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact
	// at the time of Data Market onboarding.
	Product *string `json:"product,omitempty"`

	// REQUIRED; The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic
	Publisher *string `json:"publisher,omitempty"`

	// A publisher provided promotion code as provisioned in Data Market for the said product/artifact.
	PromotionCode *string `json:"promotionCode,omitempty"`

	// The version of the desired product/artifact.
	Version *string `json:"version,omitempty"`
}

type ResourceModelWithAllowedPropertySetSKU

type ResourceModelWithAllowedPropertySetSKU struct {
	// REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code
	Name *string `json:"name,omitempty"`

	// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the
	// resource this may be omitted.
	Capacity *int32 `json:"capacity,omitempty"`

	// If the service has different generations of hardware, for the same SKU, then that can be captured here.
	Family *string `json:"family,omitempty"`

	// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
	Size *string `json:"size,omitempty"`

	// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required
	// on a PUT.
	Tier *SKUTier `json:"tier,omitempty"`
}

type ResourceProviderOperation

type ResourceProviderOperation struct {
	// Display metadata associated with the operation.
	Display *ResourceProviderOperationDisplay `json:"display,omitempty"`

	// Is a data action.
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Operation name, in format of {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`

	// Properties of the operation
	Properties *OperationProperties `json:"properties,omitempty"`
}

ResourceProviderOperation - Supported operation of this resource provider.

type ResourceProviderOperationDisplay

type ResourceProviderOperationDisplay struct {
	// Description of this operation.
	Description *string `json:"description,omitempty"`

	// Type of operation: get, read, delete, etc.
	Operation *string `json:"operation,omitempty"`

	// Resource provider: Microsoft Desktop Virtualization.
	Provider *string `json:"provider,omitempty"`

	// Resource on which the operation is performed.
	Resource *string `json:"resource,omitempty"`
}

ResourceProviderOperationDisplay - Display metadata associated with the operation.

type ResourceProviderOperationList

type ResourceProviderOperationList struct {
	// List of operations supported by this resource provider.
	Value []*ResourceProviderOperation `json:"value,omitempty"`
}

ResourceProviderOperationList - Result of the request to list operations.

type SKU

type SKU struct {
	// REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code
	Name *string `json:"name,omitempty"`

	// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the
	// resource this may be omitted.
	Capacity *int32 `json:"capacity,omitempty"`

	// If the service has different generations of hardware, for the same SKU, then that can be captured here.
	Family *string `json:"family,omitempty"`

	// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
	Size *string `json:"size,omitempty"`

	// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required
	// on a PUT.
	Tier *SKUTier `json:"tier,omitempty"`
}

SKU - The resource model definition representing SKU

type SKUTier

type SKUTier string

SKUTier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

const (
	SKUTierFree     SKUTier = "Free"
	SKUTierBasic    SKUTier = "Basic"
	SKUTierStandard SKUTier = "Standard"
	SKUTierPremium  SKUTier = "Premium"
)

func PossibleSKUTierValues

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier const type.

type SSOSecretType

type SSOSecretType string

SSOSecretType - The type of single sign on Secret Type.

const (
	SSOSecretTypeCertificate           SSOSecretType = "Certificate"
	SSOSecretTypeCertificateInKeyVault SSOSecretType = "CertificateInKeyVault"
	SSOSecretTypeSharedKey             SSOSecretType = "SharedKey"
	SSOSecretTypeSharedKeyInKeyVault   SSOSecretType = "SharedKeyInKeyVault"
)

func PossibleSSOSecretTypeValues

func PossibleSSOSecretTypeValues() []SSOSecretType

PossibleSSOSecretTypeValues returns the possible values for the SSOSecretType const type.

type ScalingHostPoolReference

type ScalingHostPoolReference struct {
	// Arm path of referenced hostpool.
	HostPoolArmPath *string `json:"hostPoolArmPath,omitempty"`

	// Is the scaling plan enabled for this hostpool.
	ScalingPlanEnabled *bool `json:"scalingPlanEnabled,omitempty"`
}

ScalingHostPoolReference - Scaling plan reference to hostpool.

type ScalingPlan

type ScalingPlan struct {
	Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"`

	// 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.
	Kind *string `json:"kind,omitempty"`

	// The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// 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.
	ManagedBy *string                                  `json:"managedBy,omitempty"`
	Plan      *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"`

	// Detailed properties for scaling plan.
	Properties *ScalingPlanProperties                  `json:"properties,omitempty"`
	SKU        *ResourceModelWithAllowedPropertySetSKU `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; 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.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ScalingPlan - Represents a scaling plan definition.

func (ScalingPlan) MarshalJSON

func (s ScalingPlan) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScalingPlan.

type ScalingPlanList

type ScalingPlanList struct {
	// List of scaling plan definitions.
	Value []*ScalingPlan `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ScalingPlanList - List of scaling plan definitions.

type ScalingPlanPatch

type ScalingPlanPatch struct {
	// Detailed properties for scaling plan
	Properties *ScalingPlanPatchProperties `json:"properties,omitempty"`

	// tags to be updated
	Tags map[string]*string `json:"tags,omitempty"`
}

ScalingPlanPatch - Scaling plan properties that can be patched.

func (ScalingPlanPatch) MarshalJSON

func (s ScalingPlanPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScalingPlanPatch.

type ScalingPlanPatchProperties

type ScalingPlanPatchProperties struct {
	// Description of scaling plan.
	Description *string `json:"description,omitempty"`

	// Exclusion tag for scaling plan.
	ExclusionTag *string `json:"exclusionTag,omitempty"`

	// User friendly name of scaling plan.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// List of ScalingHostPoolReference definitions.
	HostPoolReferences []*ScalingHostPoolReference `json:"hostPoolReferences,omitempty"`

	// HostPool type for desktop.
	HostPoolType *HostPoolType `json:"hostPoolType,omitempty"`

	// List of ScalingSchedule definitions.
	Schedules []*ScalingSchedule `json:"schedules,omitempty"`

	// Timezone of the scaling plan.
	TimeZone *string `json:"timeZone,omitempty"`
}

ScalingPlanPatchProperties - Scaling plan properties.

func (ScalingPlanPatchProperties) MarshalJSON

func (s ScalingPlanPatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScalingPlanPatchProperties.

type ScalingPlanProperties

type ScalingPlanProperties struct {
	// Description of scaling plan.
	Description *string `json:"description,omitempty"`

	// Exclusion tag for scaling plan.
	ExclusionTag *string `json:"exclusionTag,omitempty"`

	// User friendly name of scaling plan.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// List of ScalingHostPoolReference definitions.
	HostPoolReferences []*ScalingHostPoolReference `json:"hostPoolReferences,omitempty"`

	// HostPool type for desktop.
	HostPoolType *HostPoolType `json:"hostPoolType,omitempty"`

	// List of ScalingSchedule definitions.
	Schedules []*ScalingSchedule `json:"schedules,omitempty"`

	// Timezone of the scaling plan.
	TimeZone *string `json:"timeZone,omitempty"`

	// READ-ONLY; ObjectId of scaling plan. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`
}

ScalingPlanProperties - Scaling plan properties.

func (ScalingPlanProperties) MarshalJSON

func (s ScalingPlanProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScalingPlanProperties.

type ScalingPlansClient

type ScalingPlansClient struct {
	// contains filtered or unexported fields
}

ScalingPlansClient contains the methods for the ScalingPlans group. Don't use this type directly, use NewScalingPlansClient() instead.

func NewScalingPlansClient

func NewScalingPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlansClient, error)

NewScalingPlansClient creates a new instance of ScalingPlansClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ScalingPlansClient) Create

func (client *ScalingPlansClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlan ScalingPlan, options *ScalingPlansClientCreateOptions) (ScalingPlansClientCreateResponse, error)

Create - Create or update a scaling plan. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. scalingPlanName - The name of the scaling plan. scalingPlan - Object containing scaling plan definitions. options - ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ScalingPlan_Create.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewScalingPlansClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx,
		"resourceGroup1",
		"scalingPlan1",
		armdesktopvirtualization.ScalingPlan{
			Location: to.Ptr("centralus"),
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
			Properties: &armdesktopvirtualization.ScalingPlanProperties{
				Description:  to.Ptr("des1"),
				ExclusionTag: to.Ptr("value"),
				FriendlyName: to.Ptr("friendly"),
				HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{
					{
						HostPoolArmPath:    to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"),
						ScalingPlanEnabled: to.Ptr(true),
					}},
				HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePersonal),
				Schedules: []*armdesktopvirtualization.ScalingSchedule{
					{
						Name: to.Ptr("schedule1"),
						DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{
							to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday),
							to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday),
							to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday),
							to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday),
							to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)},
						OffPeakLoadBalancingAlgorithm:  to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst),
						OffPeakStartTime:               to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-10T20:00:00.000Z"); return t }()),
						PeakLoadBalancingAlgorithm:     to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst),
						PeakStartTime:                  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-10T08:00:00.000Z"); return t }()),
						RampDownCapacityThresholdPct:   to.Ptr[int32](50),
						RampDownForceLogoffUsers:       to.Ptr(true),
						RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst),
						RampDownMinimumHostsPct:        to.Ptr[int32](20),
						RampDownNotificationMessage:    to.Ptr("message"),
						RampDownStartTime:              to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-10T18:00:00.000Z"); return t }()),
						RampDownWaitTimeMinutes:        to.Ptr[int32](30),
						RampUpCapacityThresholdPct:     to.Ptr[int32](80),
						RampUpLoadBalancingAlgorithm:   to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst),
						RampUpMinimumHostsPct:          to.Ptr[int32](20),
						RampUpStartTime:                to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-10T06:00:00.000Z"); return t }()),
					}},
				TimeZone: to.Ptr(""),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ScalingPlansClient) Delete

func (client *ScalingPlansClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientDeleteOptions) (ScalingPlansClientDeleteResponse, error)

Delete - Remove a scaling plan. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. scalingPlanName - The name of the scaling plan. options - ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ScalingPlan_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewScalingPlansClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"scalingPlan1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ScalingPlansClient) Get

func (client *ScalingPlansClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientGetOptions) (ScalingPlansClientGetResponse, error)

Get - Get a scaling plan. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. scalingPlanName - The name of the scaling plan. options - ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ScalingPlan_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewScalingPlansClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"scalingPlan1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ScalingPlansClient) NewListByHostPoolPager added in v0.4.0

func (client *ScalingPlansClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *ScalingPlansClientListByHostPoolOptions) *runtime.Pager[ScalingPlansClientListByHostPoolResponse]

NewListByHostPoolPager - List scaling plan associated with hostpool. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.ListByHostPool method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ScalingPlan_ListByHostPool.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewScalingPlansClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHostPoolPager("resourceGroup1",
		"hostPool1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ScalingPlansClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - List scaling plans. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. options - ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ScalingPlan_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewScalingPlansClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("resourceGroup1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ScalingPlansClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - List scaling plans in subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 options - ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ScalingPlan_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewScalingPlansClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ScalingPlansClient) Update

func (client *ScalingPlansClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientUpdateOptions) (ScalingPlansClientUpdateResponse, error)

Update - Update a scaling plan. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. scalingPlanName - The name of the scaling plan. options - ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/ScalingPlan_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewScalingPlansClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"scalingPlan1",
		&armdesktopvirtualization.ScalingPlansClientUpdateOptions{ScalingPlan: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ScalingPlansClientCreateOptions added in v0.2.0

type ScalingPlansClientCreateOptions struct {
}

ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method.

type ScalingPlansClientCreateResponse added in v0.2.0

type ScalingPlansClientCreateResponse struct {
	ScalingPlan
}

ScalingPlansClientCreateResponse contains the response from method ScalingPlansClient.Create.

type ScalingPlansClientDeleteOptions added in v0.2.0

type ScalingPlansClientDeleteOptions struct {
}

ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method.

type ScalingPlansClientDeleteResponse added in v0.2.0

type ScalingPlansClientDeleteResponse struct {
}

ScalingPlansClientDeleteResponse contains the response from method ScalingPlansClient.Delete.

type ScalingPlansClientGetOptions added in v0.2.0

type ScalingPlansClientGetOptions struct {
}

ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method.

type ScalingPlansClientGetResponse added in v0.2.0

type ScalingPlansClientGetResponse struct {
	ScalingPlan
}

ScalingPlansClientGetResponse contains the response from method ScalingPlansClient.Get.

type ScalingPlansClientListByHostPoolOptions added in v0.2.0

type ScalingPlansClientListByHostPoolOptions struct {
}

ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.ListByHostPool method.

type ScalingPlansClientListByHostPoolResponse added in v0.2.0

type ScalingPlansClientListByHostPoolResponse struct {
	ScalingPlanList
}

ScalingPlansClientListByHostPoolResponse contains the response from method ScalingPlansClient.ListByHostPool.

type ScalingPlansClientListByResourceGroupOptions added in v0.2.0

type ScalingPlansClientListByResourceGroupOptions struct {
}

ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.ListByResourceGroup method.

type ScalingPlansClientListByResourceGroupResponse added in v0.2.0

type ScalingPlansClientListByResourceGroupResponse struct {
	ScalingPlanList
}

ScalingPlansClientListByResourceGroupResponse contains the response from method ScalingPlansClient.ListByResourceGroup.

type ScalingPlansClientListBySubscriptionOptions added in v0.2.0

type ScalingPlansClientListBySubscriptionOptions struct {
}

ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.ListBySubscription method.

type ScalingPlansClientListBySubscriptionResponse added in v0.2.0

type ScalingPlansClientListBySubscriptionResponse struct {
	ScalingPlanList
}

ScalingPlansClientListBySubscriptionResponse contains the response from method ScalingPlansClient.ListBySubscription.

type ScalingPlansClientUpdateOptions added in v0.2.0

type ScalingPlansClientUpdateOptions struct {
	// Object containing scaling plan definitions.
	ScalingPlan *ScalingPlanPatch
}

ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method.

type ScalingPlansClientUpdateResponse added in v0.2.0

type ScalingPlansClientUpdateResponse struct {
	ScalingPlan
}

ScalingPlansClientUpdateResponse contains the response from method ScalingPlansClient.Update.

type ScalingSchedule

type ScalingSchedule struct {
	// Set of days of the week on which this schedule is active.
	DaysOfWeek []*ScalingScheduleDaysOfWeekItem `json:"daysOfWeek,omitempty"`

	// Name of the scaling schedule.
	Name *string `json:"name,omitempty"`

	// Load balancing algorithm for off-peak period.
	OffPeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"offPeakLoadBalancingAlgorithm,omitempty"`

	// Starting time for off-peak period.
	OffPeakStartTime *time.Time `json:"offPeakStartTime,omitempty"`

	// Load balancing algorithm for peak period.
	PeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"peakLoadBalancingAlgorithm,omitempty"`

	// Starting time for peak period.
	PeakStartTime *time.Time `json:"peakStartTime,omitempty"`

	// Capacity threshold for ramp down period.
	RampDownCapacityThresholdPct *int32 `json:"rampDownCapacityThresholdPct,omitempty"`

	// Should users be logged off forcefully from hosts.
	RampDownForceLogoffUsers *bool `json:"rampDownForceLogoffUsers,omitempty"`

	// Load balancing algorithm for ramp down period.
	RampDownLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"rampDownLoadBalancingAlgorithm,omitempty"`

	// Minimum host percentage for ramp down period.
	RampDownMinimumHostsPct *int32 `json:"rampDownMinimumHostsPct,omitempty"`

	// Notification message for users during ramp down period.
	RampDownNotificationMessage *string `json:"rampDownNotificationMessage,omitempty"`

	// Starting time for ramp down period.
	RampDownStartTime *time.Time `json:"rampDownStartTime,omitempty"`

	// Specifies when to stop hosts during ramp down period.
	RampDownStopHostsWhen *StopHostsWhen `json:"rampDownStopHostsWhen,omitempty"`

	// Number of minutes to wait to stop hosts during ramp down period.
	RampDownWaitTimeMinutes *int32 `json:"rampDownWaitTimeMinutes,omitempty"`

	// Capacity threshold for ramp up period.
	RampUpCapacityThresholdPct *int32 `json:"rampUpCapacityThresholdPct,omitempty"`

	// Load balancing algorithm for ramp up period.
	RampUpLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"rampUpLoadBalancingAlgorithm,omitempty"`

	// Minimum host percentage for ramp up period.
	RampUpMinimumHostsPct *int32 `json:"rampUpMinimumHostsPct,omitempty"`

	// Starting time for ramp up period.
	RampUpStartTime *time.Time `json:"rampUpStartTime,omitempty"`
}

ScalingSchedule - Scaling plan schedule.

func (ScalingSchedule) MarshalJSON

func (s ScalingSchedule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ScalingSchedule.

func (*ScalingSchedule) UnmarshalJSON added in v1.0.0

func (s *ScalingSchedule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScalingSchedule.

type ScalingScheduleDaysOfWeekItem

type ScalingScheduleDaysOfWeekItem string
const (
	ScalingScheduleDaysOfWeekItemFriday    ScalingScheduleDaysOfWeekItem = "Friday"
	ScalingScheduleDaysOfWeekItemMonday    ScalingScheduleDaysOfWeekItem = "Monday"
	ScalingScheduleDaysOfWeekItemSaturday  ScalingScheduleDaysOfWeekItem = "Saturday"
	ScalingScheduleDaysOfWeekItemSunday    ScalingScheduleDaysOfWeekItem = "Sunday"
	ScalingScheduleDaysOfWeekItemThursday  ScalingScheduleDaysOfWeekItem = "Thursday"
	ScalingScheduleDaysOfWeekItemTuesday   ScalingScheduleDaysOfWeekItem = "Tuesday"
	ScalingScheduleDaysOfWeekItemWednesday ScalingScheduleDaysOfWeekItem = "Wednesday"
)

func PossibleScalingScheduleDaysOfWeekItemValues

func PossibleScalingScheduleDaysOfWeekItemValues() []ScalingScheduleDaysOfWeekItem

PossibleScalingScheduleDaysOfWeekItemValues returns the possible values for the ScalingScheduleDaysOfWeekItem const type.

type SendMessage

type SendMessage struct {
	// Body of message.
	MessageBody *string `json:"messageBody,omitempty"`

	// Title of message.
	MessageTitle *string `json:"messageTitle,omitempty"`
}

SendMessage - Represents message sent to a UserSession.

type ServiceSpecification

type ServiceSpecification struct {
	// Specifications of the Log for Azure Monitoring
	LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"`
}

ServiceSpecification - Service specification payload

type SessionHost

type SessionHost struct {
	// Detailed properties for SessionHost
	Properties *SessionHostProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

SessionHost - Represents a SessionHost definition.

type SessionHostHealthCheckFailureDetails

type SessionHostHealthCheckFailureDetails struct {
	// READ-ONLY; Error code corresponding for the failure.
	ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"`

	// READ-ONLY; The timestamp of the last update.
	LastHealthCheckDateTime *time.Time `json:"lastHealthCheckDateTime,omitempty" azure:"ro"`

	// READ-ONLY; Failure message: hints on what is wrong and how to recover.
	Message *string `json:"message,omitempty" azure:"ro"`
}

SessionHostHealthCheckFailureDetails - Contains details on the failure.

func (SessionHostHealthCheckFailureDetails) MarshalJSON

func (s SessionHostHealthCheckFailureDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SessionHostHealthCheckFailureDetails.

func (*SessionHostHealthCheckFailureDetails) UnmarshalJSON

func (s *SessionHostHealthCheckFailureDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostHealthCheckFailureDetails.

type SessionHostHealthCheckReport

type SessionHostHealthCheckReport struct {
	// READ-ONLY; Additional detailed information on the failure.
	AdditionalFailureDetails *SessionHostHealthCheckFailureDetails `json:"additionalFailureDetails,omitempty" azure:"ro"`

	// READ-ONLY; Represents the name of the health check operation performed.
	HealthCheckName *HealthCheckName `json:"healthCheckName,omitempty" azure:"ro"`

	// READ-ONLY; Represents the Health state of the health check we performed.
	HealthCheckResult *HealthCheckResult `json:"healthCheckResult,omitempty" azure:"ro"`
}

SessionHostHealthCheckReport - The report for session host information.

type SessionHostList

type SessionHostList struct {
	// List of SessionHost definitions.
	Value []*SessionHost `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

SessionHostList - List of SessionHost definitions.

type SessionHostLoadBalancingAlgorithm

type SessionHostLoadBalancingAlgorithm string

SessionHostLoadBalancingAlgorithm - Load balancing algorithm for ramp up period.

const (
	SessionHostLoadBalancingAlgorithmBreadthFirst SessionHostLoadBalancingAlgorithm = "BreadthFirst"
	SessionHostLoadBalancingAlgorithmDepthFirst   SessionHostLoadBalancingAlgorithm = "DepthFirst"
)

func PossibleSessionHostLoadBalancingAlgorithmValues

func PossibleSessionHostLoadBalancingAlgorithmValues() []SessionHostLoadBalancingAlgorithm

PossibleSessionHostLoadBalancingAlgorithmValues returns the possible values for the SessionHostLoadBalancingAlgorithm const type.

type SessionHostPatch

type SessionHostPatch struct {
	// Detailed properties for SessionHost
	Properties *SessionHostPatchProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

SessionHostPatch - SessionHost properties that can be patched.

func (SessionHostPatch) MarshalJSON

func (s SessionHostPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SessionHostPatch.

type SessionHostPatchProperties

type SessionHostPatchProperties struct {
	// Allow a new session.
	AllowNewSession *bool `json:"allowNewSession,omitempty"`

	// User assigned to SessionHost.
	AssignedUser *string `json:"assignedUser,omitempty"`
}

SessionHostPatchProperties - SessionHost properties that can be patched.

type SessionHostProperties

type SessionHostProperties struct {
	// Version of agent on SessionHost.
	AgentVersion *string `json:"agentVersion,omitempty"`

	// Allow a new session.
	AllowNewSession *bool `json:"allowNewSession,omitempty"`

	// User assigned to SessionHost.
	AssignedUser *string `json:"assignedUser,omitempty"`

	// Last heart beat from SessionHost.
	LastHeartBeat *time.Time `json:"lastHeartBeat,omitempty"`

	// The version of the OS on the session host.
	OSVersion *string `json:"osVersion,omitempty"`

	// Number of sessions on SessionHost.
	Sessions *int32 `json:"sessions,omitempty"`

	// Status for a SessionHost.
	Status *Status `json:"status,omitempty"`

	// The version of the side by side stack on the session host.
	SxSStackVersion *string `json:"sxSStackVersion,omitempty"`

	// The error message.
	UpdateErrorMessage *string `json:"updateErrorMessage,omitempty"`

	// Update state of a SessionHost.
	UpdateState *UpdateState `json:"updateState,omitempty"`

	// READ-ONLY; The timestamp of the last update.
	LastUpdateTime *time.Time `json:"lastUpdateTime,omitempty" azure:"ro"`

	// READ-ONLY; ObjectId of SessionHost. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`

	// READ-ONLY; Resource Id of SessionHost's underlying virtual machine.
	ResourceID *string `json:"resourceId,omitempty" azure:"ro"`

	// READ-ONLY; List of SessionHostHealthCheckReports
	SessionHostHealthCheckResults []*SessionHostHealthCheckReport `json:"sessionHostHealthCheckResults,omitempty" azure:"ro"`

	// READ-ONLY; The timestamp of the status.
	StatusTimestamp *time.Time `json:"statusTimestamp,omitempty" azure:"ro"`

	// READ-ONLY; Virtual Machine Id of SessionHost's underlying virtual machine.
	VirtualMachineID *string `json:"virtualMachineId,omitempty" azure:"ro"`
}

SessionHostProperties - Schema for SessionHost properties.

func (SessionHostProperties) MarshalJSON

func (s SessionHostProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SessionHostProperties.

func (*SessionHostProperties) UnmarshalJSON

func (s *SessionHostProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostProperties.

type SessionHostsClient

type SessionHostsClient struct {
	// contains filtered or unexported fields
}

SessionHostsClient contains the methods for the SessionHosts group. Don't use this type directly, use NewSessionHostsClient() instead.

func NewSessionHostsClient

func NewSessionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SessionHostsClient, error)

NewSessionHostsClient creates a new instance of SessionHostsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SessionHostsClient) Delete

func (client *SessionHostsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientDeleteOptions) (SessionHostsClientDeleteResponse, error)

Delete - Remove a SessionHost. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool options - SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/SessionHost_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewSessionHostsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		&armdesktopvirtualization.SessionHostsClientDeleteOptions{Force: to.Ptr(true)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*SessionHostsClient) Get

func (client *SessionHostsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientGetOptions) (SessionHostsClientGetResponse, error)

Get - Get a session host. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool options - SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/SessionHost_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewSessionHostsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SessionHostsClient) NewListPager added in v0.4.0

func (client *SessionHostsClient) NewListPager(resourceGroupName string, hostPoolName string, options *SessionHostsClientListOptions) *runtime.Pager[SessionHostsClientListResponse]

NewListPager - List sessionHosts. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/SessionHost_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewSessionHostsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("resourceGroup1",
		"hostPool1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SessionHostsClient) Update

func (client *SessionHostsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientUpdateOptions) (SessionHostsClientUpdateResponse, error)

Update - Update a session host. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool options - SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/SessionHost_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewSessionHostsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		&armdesktopvirtualization.SessionHostsClientUpdateOptions{SessionHost: &armdesktopvirtualization.SessionHostPatch{
			Properties: &armdesktopvirtualization.SessionHostPatchProperties{
				AllowNewSession: to.Ptr(true),
				AssignedUser:    to.Ptr("user1@microsoft.com"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SessionHostsClientDeleteOptions added in v0.2.0

type SessionHostsClientDeleteOptions struct {
	// Force flag to force sessionHost deletion even when userSession exists.
	Force *bool
}

SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method.

type SessionHostsClientDeleteResponse added in v0.2.0

type SessionHostsClientDeleteResponse struct {
}

SessionHostsClientDeleteResponse contains the response from method SessionHostsClient.Delete.

type SessionHostsClientGetOptions added in v0.2.0

type SessionHostsClientGetOptions struct {
}

SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method.

type SessionHostsClientGetResponse added in v0.2.0

type SessionHostsClientGetResponse struct {
	SessionHost
}

SessionHostsClientGetResponse contains the response from method SessionHostsClient.Get.

type SessionHostsClientListOptions added in v0.2.0

type SessionHostsClientListOptions struct {
}

SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.List method.

type SessionHostsClientListResponse added in v0.2.0

type SessionHostsClientListResponse struct {
	SessionHostList
}

SessionHostsClientListResponse contains the response from method SessionHostsClient.List.

type SessionHostsClientUpdateOptions added in v0.2.0

type SessionHostsClientUpdateOptions struct {
	// Object containing SessionHost definitions.
	SessionHost *SessionHostPatch
}

SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method.

type SessionHostsClientUpdateResponse added in v0.2.0

type SessionHostsClientUpdateResponse struct {
	SessionHost
}

SessionHostsClientUpdateResponse contains the response from method SessionHostsClient.Update.

type SessionState

type SessionState string

SessionState - State of user session.

const (
	SessionStateActive                 SessionState = "Active"
	SessionStateDisconnected           SessionState = "Disconnected"
	SessionStateLogOff                 SessionState = "LogOff"
	SessionStatePending                SessionState = "Pending"
	SessionStateUnknown                SessionState = "Unknown"
	SessionStateUserProfileDiskMounted SessionState = "UserProfileDiskMounted"
)

func PossibleSessionStateValues

func PossibleSessionStateValues() []SessionState

PossibleSessionStateValues returns the possible values for the SessionState const type.

type StartMenuItem

type StartMenuItem struct {
	// Detailed properties for StartMenuItem
	Properties *StartMenuItemProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

StartMenuItem - Represents a StartMenuItem definition.

type StartMenuItemList

type StartMenuItemList struct {
	// List of StartMenuItem definitions.
	Value []*StartMenuItem `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

StartMenuItemList - List of StartMenuItem definitions.

type StartMenuItemProperties

type StartMenuItemProperties struct {
	// Alias of StartMenuItem.
	AppAlias *string `json:"appAlias,omitempty"`

	// Command line arguments for StartMenuItem.
	CommandLineArguments *string `json:"commandLineArguments,omitempty"`

	// Path to the file of StartMenuItem.
	FilePath *string `json:"filePath,omitempty"`

	// Index of the icon.
	IconIndex *int32 `json:"iconIndex,omitempty"`

	// Path to the icon.
	IconPath *string `json:"iconPath,omitempty"`
}

StartMenuItemProperties - Schema for StartMenuItem properties.

type StartMenuItemsClient

type StartMenuItemsClient struct {
	// contains filtered or unexported fields
}

StartMenuItemsClient contains the methods for the StartMenuItems group. Don't use this type directly, use NewStartMenuItemsClient() instead.

func NewStartMenuItemsClient

func NewStartMenuItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StartMenuItemsClient, error)

NewStartMenuItemsClient creates a new instance of StartMenuItemsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*StartMenuItemsClient) NewListPager added in v0.4.0

func (client *StartMenuItemsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *StartMenuItemsClientListOptions) *runtime.Pager[StartMenuItemsClientListResponse]

NewListPager - List start menu items in the given application group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. applicationGroupName - The name of the application group options - StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/StartMenuItem_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewStartMenuItemsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("resourceGroup1",
		"applicationGroup1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type StartMenuItemsClientListOptions added in v0.2.0

type StartMenuItemsClientListOptions struct {
}

StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.List method.

type StartMenuItemsClientListResponse added in v0.2.0

type StartMenuItemsClientListResponse struct {
	StartMenuItemList
}

StartMenuItemsClientListResponse contains the response from method StartMenuItemsClient.List.

type Status

type Status string

Status - Status for a SessionHost.

const (
	// StatusAvailable - Session Host has passed all the health checks and is available to handle connections.
	StatusAvailable Status = "Available"
	// StatusDisconnected - The Session Host is unavailable because it is currently disconnected.
	StatusDisconnected Status = "Disconnected"
	// StatusDomainTrustRelationshipLost - SessionHost's domain trust relationship lost
	StatusDomainTrustRelationshipLost Status = "DomainTrustRelationshipLost"
	// StatusFSLogixNotHealthy - FSLogix is in an unhealthy state on the session host.
	StatusFSLogixNotHealthy Status = "FSLogixNotHealthy"
	// StatusNeedsAssistance - New status to inform admins that the health on their endpoint needs to be fixed. The connections
	// might not fail, as these issues are not fatal.
	StatusNeedsAssistance Status = "NeedsAssistance"
	// StatusNoHeartbeat - The Session Host is not heart beating.
	StatusNoHeartbeat Status = "NoHeartbeat"
	// StatusNotJoinedToDomain - SessionHost is not joined to domain.
	StatusNotJoinedToDomain Status = "NotJoinedToDomain"
	// StatusShutdown - Session Host is shutdown - RD Agent reported session host to be stopped or deallocated.
	StatusShutdown Status = "Shutdown"
	// StatusSxSStackListenerNotReady - SxS stack installed on the SessionHost is not ready to receive connections.
	StatusSxSStackListenerNotReady Status = "SxSStackListenerNotReady"
	// StatusUnavailable - Session Host is either turned off or has failed critical health checks which is causing service not
	// to be able to route connections to this session host. Note this replaces previous 'NoHeartBeat' status.
	StatusUnavailable Status = "Unavailable"
	// StatusUpgradeFailed - Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, etc.)
	// failed.
	StatusUpgradeFailed Status = "UpgradeFailed"
	// StatusUpgrading - Session Host is unavailable because currently an upgrade of RDAgent/side-by-side stack is in progress.
	// Note: this state will be removed once the upgrade completes and the host is able to accept connections.
	StatusUpgrading Status = "Upgrading"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type StopHostsWhen

type StopHostsWhen string

StopHostsWhen - Specifies when to stop hosts during ramp down period.

const (
	StopHostsWhenZeroActiveSessions StopHostsWhen = "ZeroActiveSessions"
	StopHostsWhenZeroSessions       StopHostsWhen = "ZeroSessions"
)

func PossibleStopHostsWhenValues

func PossibleStopHostsWhenValues() []StopHostsWhen

PossibleStopHostsWhenValues returns the possible values for the StopHostsWhen const type.

type UpdateState

type UpdateState string

UpdateState - Update state of a SessionHost.

const (
	UpdateStateFailed    UpdateState = "Failed"
	UpdateStateInitial   UpdateState = "Initial"
	UpdateStatePending   UpdateState = "Pending"
	UpdateStateStarted   UpdateState = "Started"
	UpdateStateSucceeded UpdateState = "Succeeded"
)

func PossibleUpdateStateValues

func PossibleUpdateStateValues() []UpdateState

PossibleUpdateStateValues returns the possible values for the UpdateState const type.

type UserSession

type UserSession struct {
	// Detailed properties for UserSession
	Properties *UserSessionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

UserSession - Represents a UserSession definition.

type UserSessionList

type UserSessionList struct {
	// List of UserSession definitions.
	Value []*UserSession `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

UserSessionList - List of UserSession definitions.

type UserSessionProperties

type UserSessionProperties struct {
	// The active directory user name.
	ActiveDirectoryUserName *string `json:"activeDirectoryUserName,omitempty"`

	// Application type of application.
	ApplicationType *ApplicationType `json:"applicationType,omitempty"`

	// The timestamp of the user session create.
	CreateTime *time.Time `json:"createTime,omitempty"`

	// State of user session.
	SessionState *SessionState `json:"sessionState,omitempty"`

	// The user principal name.
	UserPrincipalName *string `json:"userPrincipalName,omitempty"`

	// READ-ONLY; ObjectId of user session. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`
}

UserSessionProperties - Schema for UserSession properties.

func (UserSessionProperties) MarshalJSON

func (u UserSessionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserSessionProperties.

func (*UserSessionProperties) UnmarshalJSON

func (u *UserSessionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserSessionProperties.

type UserSessionsClient

type UserSessionsClient struct {
	// contains filtered or unexported fields
}

UserSessionsClient contains the methods for the UserSessions group. Don't use this type directly, use NewUserSessionsClient() instead.

func NewUserSessionsClient

func NewUserSessionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserSessionsClient, error)

NewUserSessionsClient creates a new instance of UserSessionsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UserSessionsClient) Delete

func (client *UserSessionsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDeleteOptions) (UserSessionsClientDeleteResponse, error)

Delete - Remove a userSession. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool userSessionID - The name of the user session within the specified session host options - UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/UserSession_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewUserSessionsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		"1",
		&armdesktopvirtualization.UserSessionsClientDeleteOptions{Force: to.Ptr(true)})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*UserSessionsClient) Disconnect

func (client *UserSessionsClient) Disconnect(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDisconnectOptions) (UserSessionsClientDisconnectResponse, error)

Disconnect - Disconnect a userSession. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool userSessionID - The name of the user session within the specified session host options - UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/UserSession_Disconnect_Post.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewUserSessionsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Disconnect(ctx,
		"resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		"1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*UserSessionsClient) Get

func (client *UserSessionsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientGetOptions) (UserSessionsClientGetResponse, error)

Get - Get a userSession. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool userSessionID - The name of the user session within the specified session host options - UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/UserSession_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewUserSessionsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		"1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*UserSessionsClient) NewListByHostPoolPager added in v0.4.0

func (client *UserSessionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *UserSessionsClientListByHostPoolOptions) *runtime.Pager[UserSessionsClientListByHostPoolResponse]

NewListByHostPoolPager - List userSessions. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group options - UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.ListByHostPool method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/UserSession_ListByHostPool.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewUserSessionsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByHostPoolPager("resourceGroup1",
		"hostPool1",
		&armdesktopvirtualization.UserSessionsClientListByHostPoolOptions{Filter: to.Ptr("userPrincipalName eq 'user1@microsoft.com' and state eq 'active'")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*UserSessionsClient) NewListPager added in v0.4.0

func (client *UserSessionsClient) NewListPager(resourceGroupName string, hostPoolName string, sessionHostName string, options *UserSessionsClientListOptions) *runtime.Pager[UserSessionsClientListResponse]

NewListPager - List userSessions. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool options - UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/UserSession_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewUserSessionsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*UserSessionsClient) SendMessage

func (client *UserSessionsClient) SendMessage(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientSendMessageOptions) (UserSessionsClientSendMessageResponse, error)

SendMessage - Send a message to a user. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. hostPoolName - The name of the host pool within the specified resource group sessionHostName - The name of the session host within the specified host pool userSessionID - The name of the user session within the specified session host options - UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/UserSession_SendMessage_Post.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewUserSessionsClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.SendMessage(ctx,
		"resourceGroup1",
		"hostPool1",
		"sessionHost1.microsoft.com",
		"1",
		&armdesktopvirtualization.UserSessionsClientSendMessageOptions{SendMessage: &armdesktopvirtualization.SendMessage{
			MessageBody:  to.Ptr("body"),
			MessageTitle: to.Ptr("title"),
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type UserSessionsClientDeleteOptions added in v0.2.0

type UserSessionsClientDeleteOptions struct {
	// Force flag to login off userSession.
	Force *bool
}

UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method.

type UserSessionsClientDeleteResponse added in v0.2.0

type UserSessionsClientDeleteResponse struct {
}

UserSessionsClientDeleteResponse contains the response from method UserSessionsClient.Delete.

type UserSessionsClientDisconnectOptions added in v0.2.0

type UserSessionsClientDisconnectOptions struct {
}

UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method.

type UserSessionsClientDisconnectResponse added in v0.2.0

type UserSessionsClientDisconnectResponse struct {
}

UserSessionsClientDisconnectResponse contains the response from method UserSessionsClient.Disconnect.

type UserSessionsClientGetOptions added in v0.2.0

type UserSessionsClientGetOptions struct {
}

UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method.

type UserSessionsClientGetResponse added in v0.2.0

type UserSessionsClientGetResponse struct {
	UserSession
}

UserSessionsClientGetResponse contains the response from method UserSessionsClient.Get.

type UserSessionsClientListByHostPoolOptions added in v0.2.0

type UserSessionsClientListByHostPoolOptions struct {
	// OData filter expression. Valid properties for filtering are userprincipalname and sessionstate.
	Filter *string
}

UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.ListByHostPool method.

type UserSessionsClientListByHostPoolResponse added in v0.2.0

type UserSessionsClientListByHostPoolResponse struct {
	UserSessionList
}

UserSessionsClientListByHostPoolResponse contains the response from method UserSessionsClient.ListByHostPool.

type UserSessionsClientListOptions added in v0.2.0

type UserSessionsClientListOptions struct {
}

UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.List method.

type UserSessionsClientListResponse added in v0.2.0

type UserSessionsClientListResponse struct {
	UserSessionList
}

UserSessionsClientListResponse contains the response from method UserSessionsClient.List.

type UserSessionsClientSendMessageOptions added in v0.2.0

type UserSessionsClientSendMessageOptions struct {
	// Object containing message includes title and message body
	SendMessage *SendMessage
}

UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage method.

type UserSessionsClientSendMessageResponse added in v0.2.0

type UserSessionsClientSendMessageResponse struct {
}

UserSessionsClientSendMessageResponse contains the response from method UserSessionsClient.SendMessage.

type Workspace

type Workspace struct {
	Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"`

	// 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.
	Kind *string `json:"kind,omitempty"`

	// The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// 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.
	ManagedBy *string                                  `json:"managedBy,omitempty"`
	Plan      *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"`

	// Detailed properties for Workspace
	Properties *WorkspaceProperties                    `json:"properties,omitempty"`
	SKU        *ResourceModelWithAllowedPropertySetSKU `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; 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.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Workspace - Represents a Workspace definition.

func (Workspace) MarshalJSON

func (w Workspace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Workspace.

type WorkspaceList

type WorkspaceList struct {
	// List of Workspace definitions.
	Value []*Workspace `json:"value,omitempty"`

	// READ-ONLY; Link to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

WorkspaceList - List of Workspace definitions.

type WorkspacePatch

type WorkspacePatch struct {
	// Detailed properties for Workspace
	Properties *WorkspacePatchProperties `json:"properties,omitempty"`

	// tags to be updated
	Tags map[string]*string `json:"tags,omitempty"`
}

WorkspacePatch - Workspace properties that can be patched.

func (WorkspacePatch) MarshalJSON

func (w WorkspacePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspacePatch.

type WorkspacePatchProperties

type WorkspacePatchProperties struct {
	// List of applicationGroup links.
	ApplicationGroupReferences []*string `json:"applicationGroupReferences,omitempty"`

	// Description of Workspace.
	Description *string `json:"description,omitempty"`

	// Friendly name of Workspace.
	FriendlyName *string `json:"friendlyName,omitempty"`
}

WorkspacePatchProperties - Workspace properties that can be patched.

func (WorkspacePatchProperties) MarshalJSON

func (w WorkspacePatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspacePatchProperties.

type WorkspaceProperties

type WorkspaceProperties struct {
	// List of applicationGroup resource Ids.
	ApplicationGroupReferences []*string `json:"applicationGroupReferences,omitempty"`

	// Description of Workspace.
	Description *string `json:"description,omitempty"`

	// Friendly name of Workspace.
	FriendlyName *string `json:"friendlyName,omitempty"`

	// READ-ONLY; Is cloud pc resource.
	CloudPcResource *bool `json:"cloudPcResource,omitempty" azure:"ro"`

	// READ-ONLY; ObjectId of Workspace. (internal use)
	ObjectID *string `json:"objectId,omitempty" azure:"ro"`
}

WorkspaceProperties - Schema for Workspace properties.

func (WorkspaceProperties) MarshalJSON

func (w WorkspaceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties.

type WorkspacesClient

type WorkspacesClient struct {
	// contains filtered or unexported fields
}

WorkspacesClient contains the methods for the Workspaces group. Don't use this type directly, use NewWorkspacesClient() instead.

func NewWorkspacesClient

func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error)

NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*WorkspacesClient) CreateOrUpdate

func (client *WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientCreateOrUpdateOptions) (WorkspacesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a workspace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. workspaceName - The name of the workspace workspace - Object containing Workspace definitions. options - WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Workspace_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewWorkspacesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"resourceGroup1",
		"workspace1",
		armdesktopvirtualization.Workspace{
			Location: to.Ptr("centralus"),
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
			Properties: &armdesktopvirtualization.WorkspaceProperties{
				Description:  to.Ptr("des1"),
				FriendlyName: to.Ptr("friendly"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkspacesClient) Delete

func (client *WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientDeleteOptions) (WorkspacesClientDeleteResponse, error)

Delete - Remove a workspace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. workspaceName - The name of the workspace options - WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Workspace_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewWorkspacesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"resourceGroup1",
		"workspace1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WorkspacesClient) Get

func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error)

Get - Get a workspace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. workspaceName - The name of the workspace options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Workspace_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewWorkspacesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"resourceGroup1",
		"workspace1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkspacesClient) NewListByResourceGroupPager added in v0.4.0

func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse]

NewListByResourceGroupPager - List workspaces. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Workspace_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewWorkspacesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("resourceGroup1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*WorkspacesClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - List workspaces in subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Workspace_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewWorkspacesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*WorkspacesClient) Update

func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientUpdateOptions) (WorkspacesClientUpdateResponse, error)

Update - Update a workspace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-07-12 resourceGroupName - The name of the resource group. The name is case insensitive. workspaceName - The name of the workspace options - WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2021-07-12/examples/Workspace_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdesktopvirtualization.NewWorkspacesClient("daefabc0-95b4-48b3-b645-8a753a63c4fa", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"resourceGroup1",
		"workspace1",
		&armdesktopvirtualization.WorkspacesClientUpdateOptions{Workspace: &armdesktopvirtualization.WorkspacePatch{
			Properties: &armdesktopvirtualization.WorkspacePatchProperties{
				Description:  to.Ptr("des1"),
				FriendlyName: to.Ptr("friendly"),
			},
			Tags: map[string]*string{
				"tag1": to.Ptr("value1"),
				"tag2": to.Ptr("value2"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type WorkspacesClientCreateOrUpdateOptions added in v0.2.0

type WorkspacesClientCreateOrUpdateOptions struct {
}

WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate method.

type WorkspacesClientCreateOrUpdateResponse added in v0.2.0

type WorkspacesClientCreateOrUpdateResponse struct {
	Workspace
}

WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.CreateOrUpdate.

type WorkspacesClientDeleteOptions added in v0.2.0

type WorkspacesClientDeleteOptions struct {
}

WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method.

type WorkspacesClientDeleteResponse added in v0.2.0

type WorkspacesClientDeleteResponse struct {
}

WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete.

type WorkspacesClientGetOptions added in v0.2.0

type WorkspacesClientGetOptions struct {
}

WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.

type WorkspacesClientGetResponse added in v0.2.0

type WorkspacesClientGetResponse struct {
	Workspace
}

WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get.

type WorkspacesClientListByResourceGroupOptions added in v0.2.0

type WorkspacesClientListByResourceGroupOptions struct {
}

WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup method.

type WorkspacesClientListByResourceGroupResponse added in v0.2.0

type WorkspacesClientListByResourceGroupResponse struct {
	WorkspaceList
}

WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.ListByResourceGroup.

type WorkspacesClientListBySubscriptionOptions added in v0.2.0

type WorkspacesClientListBySubscriptionOptions struct {
}

WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription method.

type WorkspacesClientListBySubscriptionResponse added in v0.2.0

type WorkspacesClientListBySubscriptionResponse struct {
	WorkspaceList
}

WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.ListBySubscription.

type WorkspacesClientUpdateOptions added in v0.2.0

type WorkspacesClientUpdateOptions struct {
	// Object containing Workspace definitions.
	Workspace *WorkspacePatch
}

WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method.

type WorkspacesClientUpdateResponse added in v0.2.0

type WorkspacesClientUpdateResponse struct {
	Workspace
}

WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL