armdesktopvirtualization

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 16 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 := 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{
    Host: arm.AzureChina,
}
client := 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 {
	Resource
	// REQUIRED; Detailed properties for Application
	Properties *ApplicationProperties `json:"properties,omitempty"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`
}

Application - Schema for Application properties.

func (Application) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Application.

type ApplicationGroup

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,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.

func (ApplicationGroupList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ApplicationGroupList.

type ApplicationGroupPatch

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

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

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.

func (ApplicationGroupType) ToPtr

ToPtr returns a *ApplicationGroupType pointing to the current value.

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

NewApplicationGroupsClient creates a new instance of ApplicationGroupsClient with the specified values.

func (*ApplicationGroupsClient) CreateOrUpdate

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

CreateOrUpdate - Create or update an applicationGroup. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationGroupsClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		armdesktopvirtualization.ApplicationGroup{
			ResourceModelWithAllowedPropertySet: armdesktopvirtualization.ResourceModelWithAllowedPropertySet{
				Location: to.StringPtr("<location>"),
				Tags: map[string]*string{
					"tag1": to.StringPtr("value1"),
					"tag2": to.StringPtr("value2"),
				},
			},
			Properties: &armdesktopvirtualization.ApplicationGroupProperties{
				Description:          to.StringPtr("<description>"),
				ApplicationGroupType: armdesktopvirtualization.ApplicationGroupTypeRemoteApp.ToPtr(),
				FriendlyName:         to.StringPtr("<friendly-name>"),
				HostPoolArmPath:      to.StringPtr("<host-pool-arm-path>"),
				MigrationRequest: &armdesktopvirtualization.MigrationRequestProperties{
					MigrationPath: to.StringPtr("<migration-path>"),
					Operation:     armdesktopvirtualization.OperationStart.ToPtr(),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ApplicationGroup.ID: %s\n", *res.ID)
}
Output:

func (*ApplicationGroupsClient) Delete

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

Delete - Remove an applicationGroup. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationGroupsClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ApplicationGroupsClient) Get

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

Get - Get an application group. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationGroupsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ApplicationGroup.ID: %s\n", *res.ID)
}
Output:

func (*ApplicationGroupsClient) ListByResourceGroup

ListByResourceGroup - List applicationGroups. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationGroupsClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		&armdesktopvirtualization.ApplicationGroupsListByResourceGroupOptions{Filter: to.StringPtr("<filter>")})
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("ApplicationGroup.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*ApplicationGroupsClient) ListBySubscription

ListBySubscription - List applicationGroups in subscription. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationGroupsClient("<subscription-id>", cred, nil)
	pager := client.ListBySubscription(&armdesktopvirtualization.ApplicationGroupsListBySubscriptionOptions{Filter: to.StringPtr("<filter>")})
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("ApplicationGroup.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*ApplicationGroupsClient) Update

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

Update - Update an applicationGroup. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationGroupsClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		&armdesktopvirtualization.ApplicationGroupsUpdateOptions{ApplicationGroup: &armdesktopvirtualization.ApplicationGroupPatch{
			Properties: &armdesktopvirtualization.ApplicationGroupPatchProperties{
				Description:  to.StringPtr("<description>"),
				FriendlyName: to.StringPtr("<friendly-name>"),
			},
			Tags: map[string]*string{
				"tag1": to.StringPtr("value1"),
				"tag2": to.StringPtr("value2"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ApplicationGroup.ID: %s\n", *res.ID)
}
Output:

type ApplicationGroupsCreateOrUpdateOptions

type ApplicationGroupsCreateOrUpdateOptions struct {
}

ApplicationGroupsCreateOrUpdateOptions contains the optional parameters for the ApplicationGroups.CreateOrUpdate method.

type ApplicationGroupsCreateOrUpdateResponse

type ApplicationGroupsCreateOrUpdateResponse struct {
	ApplicationGroupsCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationGroupsCreateOrUpdateResponse contains the response from method ApplicationGroups.CreateOrUpdate.

type ApplicationGroupsCreateOrUpdateResult

type ApplicationGroupsCreateOrUpdateResult struct {
	ApplicationGroup
}

ApplicationGroupsCreateOrUpdateResult contains the result from method ApplicationGroups.CreateOrUpdate.

type ApplicationGroupsDeleteOptions

type ApplicationGroupsDeleteOptions struct {
}

ApplicationGroupsDeleteOptions contains the optional parameters for the ApplicationGroups.Delete method.

type ApplicationGroupsDeleteResponse

type ApplicationGroupsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationGroupsDeleteResponse contains the response from method ApplicationGroups.Delete.

type ApplicationGroupsGetOptions

type ApplicationGroupsGetOptions struct {
}

ApplicationGroupsGetOptions contains the optional parameters for the ApplicationGroups.Get method.

type ApplicationGroupsGetResponse

type ApplicationGroupsGetResponse struct {
	ApplicationGroupsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationGroupsGetResponse contains the response from method ApplicationGroups.Get.

type ApplicationGroupsGetResult

type ApplicationGroupsGetResult struct {
	ApplicationGroup
}

ApplicationGroupsGetResult contains the result from method ApplicationGroups.Get.

type ApplicationGroupsListByResourceGroupOptions

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

ApplicationGroupsListByResourceGroupOptions contains the optional parameters for the ApplicationGroups.ListByResourceGroup method.

type ApplicationGroupsListByResourceGroupPager

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

ApplicationGroupsListByResourceGroupPager provides operations for iterating over paged responses.

func (*ApplicationGroupsListByResourceGroupPager) Err

Err returns the last error encountered while paging.

func (*ApplicationGroupsListByResourceGroupPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ApplicationGroupsListByResourceGroupPager) PageResponse

PageResponse returns the current ApplicationGroupsListByResourceGroupResponse page.

type ApplicationGroupsListByResourceGroupResponse

type ApplicationGroupsListByResourceGroupResponse struct {
	ApplicationGroupsListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationGroupsListByResourceGroupResponse contains the response from method ApplicationGroups.ListByResourceGroup.

type ApplicationGroupsListByResourceGroupResult

type ApplicationGroupsListByResourceGroupResult struct {
	ApplicationGroupList
}

ApplicationGroupsListByResourceGroupResult contains the result from method ApplicationGroups.ListByResourceGroup.

type ApplicationGroupsListBySubscriptionOptions

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

ApplicationGroupsListBySubscriptionOptions contains the optional parameters for the ApplicationGroups.ListBySubscription method.

type ApplicationGroupsListBySubscriptionPager

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

ApplicationGroupsListBySubscriptionPager provides operations for iterating over paged responses.

func (*ApplicationGroupsListBySubscriptionPager) Err

Err returns the last error encountered while paging.

func (*ApplicationGroupsListBySubscriptionPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ApplicationGroupsListBySubscriptionPager) PageResponse

PageResponse returns the current ApplicationGroupsListBySubscriptionResponse page.

type ApplicationGroupsListBySubscriptionResponse

type ApplicationGroupsListBySubscriptionResponse struct {
	ApplicationGroupsListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationGroupsListBySubscriptionResponse contains the response from method ApplicationGroups.ListBySubscription.

type ApplicationGroupsListBySubscriptionResult

type ApplicationGroupsListBySubscriptionResult struct {
	ApplicationGroupList
}

ApplicationGroupsListBySubscriptionResult contains the result from method ApplicationGroups.ListBySubscription.

type ApplicationGroupsUpdateOptions

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

ApplicationGroupsUpdateOptions contains the optional parameters for the ApplicationGroups.Update method.

type ApplicationGroupsUpdateResponse

type ApplicationGroupsUpdateResponse struct {
	ApplicationGroupsUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationGroupsUpdateResponse contains the response from method ApplicationGroups.Update.

type ApplicationGroupsUpdateResult

type ApplicationGroupsUpdateResult struct {
	ApplicationGroup
}

ApplicationGroupsUpdateResult contains the result from method ApplicationGroups.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.

func (ApplicationList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ApplicationList.

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.

func (ApplicationType) ToPtr

func (c ApplicationType) ToPtr() *ApplicationType

ToPtr returns a *ApplicationType pointing to the current value.

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

NewApplicationsClient creates a new instance of ApplicationsClient with the specified values.

func (*ApplicationsClient) CreateOrUpdate

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

CreateOrUpdate - Create or update an application. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationsClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		"<application-name>",
		armdesktopvirtualization.Application{
			Properties: &armdesktopvirtualization.ApplicationProperties{
				Description:          to.StringPtr("<description>"),
				CommandLineArguments: to.StringPtr("<command-line-arguments>"),
				CommandLineSetting:   armdesktopvirtualization.CommandLineSettingAllow.ToPtr(),
				FilePath:             to.StringPtr("<file-path>"),
				FriendlyName:         to.StringPtr("<friendly-name>"),
				IconIndex:            to.Int32Ptr(1),
				IconPath:             to.StringPtr("<icon-path>"),
				ShowInPortal:         to.BoolPtr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Application.ID: %s\n", *res.ID)
}
Output:

func (*ApplicationsClient) Delete

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

Delete - Remove an application. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationsClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		"<application-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ApplicationsClient) Get

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

Get - Get an application. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		"<application-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Application.ID: %s\n", *res.ID)
}
Output:

func (*ApplicationsClient) List

func (client *ApplicationsClient) List(resourceGroupName string, applicationGroupName string, options *ApplicationsListOptions) *ApplicationsListPager

List - List applications. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationsClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<application-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Application.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*ApplicationsClient) Update

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

Update - Update an application. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewApplicationsClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		"<application-name>",
		&armdesktopvirtualization.ApplicationsUpdateOptions{Application: &armdesktopvirtualization.ApplicationPatch{
			Properties: &armdesktopvirtualization.ApplicationPatchProperties{
				Description:              to.StringPtr("<description>"),
				ApplicationType:          armdesktopvirtualization.RemoteApplicationTypeInBuilt.ToPtr(),
				CommandLineArguments:     to.StringPtr("<command-line-arguments>"),
				CommandLineSetting:       armdesktopvirtualization.CommandLineSettingAllow.ToPtr(),
				FilePath:                 to.StringPtr("<file-path>"),
				FriendlyName:             to.StringPtr("<friendly-name>"),
				IconIndex:                to.Int32Ptr(1),
				IconPath:                 to.StringPtr("<icon-path>"),
				MsixPackageApplicationID: to.StringPtr("<msix-package-application-id>"),
				MsixPackageFamilyName:    to.StringPtr("<msix-package-family-name>"),
				ShowInPortal:             to.BoolPtr(true),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Application.ID: %s\n", *res.ID)
}
Output:

type ApplicationsCreateOrUpdateOptions

type ApplicationsCreateOrUpdateOptions struct {
}

ApplicationsCreateOrUpdateOptions contains the optional parameters for the Applications.CreateOrUpdate method.

type ApplicationsCreateOrUpdateResponse

type ApplicationsCreateOrUpdateResponse struct {
	ApplicationsCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationsCreateOrUpdateResponse contains the response from method Applications.CreateOrUpdate.

type ApplicationsCreateOrUpdateResult

type ApplicationsCreateOrUpdateResult struct {
	Application
}

ApplicationsCreateOrUpdateResult contains the result from method Applications.CreateOrUpdate.

type ApplicationsDeleteOptions

type ApplicationsDeleteOptions struct {
}

ApplicationsDeleteOptions contains the optional parameters for the Applications.Delete method.

type ApplicationsDeleteResponse

type ApplicationsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationsDeleteResponse contains the response from method Applications.Delete.

type ApplicationsGetOptions

type ApplicationsGetOptions struct {
}

ApplicationsGetOptions contains the optional parameters for the Applications.Get method.

type ApplicationsGetResponse

type ApplicationsGetResponse struct {
	ApplicationsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationsGetResponse contains the response from method Applications.Get.

type ApplicationsGetResult

type ApplicationsGetResult struct {
	Application
}

ApplicationsGetResult contains the result from method Applications.Get.

type ApplicationsListOptions

type ApplicationsListOptions struct {
}

ApplicationsListOptions contains the optional parameters for the Applications.List method.

type ApplicationsListPager

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

ApplicationsListPager provides operations for iterating over paged responses.

func (*ApplicationsListPager) Err

func (p *ApplicationsListPager) Err() error

Err returns the last error encountered while paging.

func (*ApplicationsListPager) NextPage

func (p *ApplicationsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ApplicationsListPager) PageResponse

PageResponse returns the current ApplicationsListResponse page.

type ApplicationsListResponse

type ApplicationsListResponse struct {
	ApplicationsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationsListResponse contains the response from method Applications.List.

type ApplicationsListResult

type ApplicationsListResult struct {
	ApplicationList
}

ApplicationsListResult contains the result from method Applications.List.

type ApplicationsUpdateOptions

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

ApplicationsUpdateOptions contains the optional parameters for the Applications.Update method.

type ApplicationsUpdateResponse

type ApplicationsUpdateResponse struct {
	ApplicationsUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ApplicationsUpdateResponse contains the response from method Applications.Update.

type ApplicationsUpdateResult

type ApplicationsUpdateResult struct {
	Application
}

ApplicationsUpdateResult contains the result from method Applications.Update.

type CloudError

type CloudError struct {

	// Cloud error object properties.
	InnerError *CloudErrorProperties `json:"error,omitempty"`
	// contains filtered or unexported fields
}

CloudError - Cloud error object. Implements the error and azcore.HTTPResponse interfaces.

func (CloudError) Error

func (e CloudError) Error() string

Error implements the error interface for type CloudError. The contents of the error text are not contractual and subject to change.

type CloudErrorProperties

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

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

CloudErrorProperties - Cloud error object properties.

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.

func (CommandLineSetting) ToPtr

ToPtr returns a *CommandLineSetting pointing to the current value.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

func (CreatedByType) ToPtr

func (c CreatedByType) ToPtr() *CreatedByType

ToPtr returns a *CreatedByType pointing to the current value.

type Desktop

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`
}

Desktop - Schema for Desktop properties.

func (Desktop) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Desktop.

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.

func (DesktopList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DesktopList.

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

NewDesktopsClient creates a new instance of DesktopsClient with the specified values.

func (*DesktopsClient) Get

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

Get - Get a desktop. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewDesktopsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		"<desktop-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Desktop.ID: %s\n", *res.ID)
}
Output:

func (*DesktopsClient) List

func (client *DesktopsClient) List(resourceGroupName string, applicationGroupName string, options *DesktopsListOptions) *DesktopsListPager

List - List desktops. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewDesktopsClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<application-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Desktop.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*DesktopsClient) Update

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

Update - Update a desktop. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewDesktopsClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<application-group-name>",
		"<desktop-name>",
		&armdesktopvirtualization.DesktopsUpdateOptions{Desktop: &armdesktopvirtualization.DesktopPatch{
			Properties: &armdesktopvirtualization.DesktopPatchProperties{
				Description:  to.StringPtr("<description>"),
				FriendlyName: to.StringPtr("<friendly-name>"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Desktop.ID: %s\n", *res.ID)
}
Output:

type DesktopsGetOptions

type DesktopsGetOptions struct {
}

DesktopsGetOptions contains the optional parameters for the Desktops.Get method.

type DesktopsGetResponse

type DesktopsGetResponse struct {
	DesktopsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DesktopsGetResponse contains the response from method Desktops.Get.

type DesktopsGetResult

type DesktopsGetResult struct {
	Desktop
}

DesktopsGetResult contains the result from method Desktops.Get.

type DesktopsListOptions

type DesktopsListOptions struct {
}

DesktopsListOptions contains the optional parameters for the Desktops.List method.

type DesktopsListPager

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

DesktopsListPager provides operations for iterating over paged responses.

func (*DesktopsListPager) Err

func (p *DesktopsListPager) Err() error

Err returns the last error encountered while paging.

func (*DesktopsListPager) NextPage

func (p *DesktopsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*DesktopsListPager) PageResponse

func (p *DesktopsListPager) PageResponse() DesktopsListResponse

PageResponse returns the current DesktopsListResponse page.

type DesktopsListResponse

type DesktopsListResponse struct {
	DesktopsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DesktopsListResponse contains the response from method Desktops.List.

type DesktopsListResult

type DesktopsListResult struct {
	DesktopList
}

DesktopsListResult contains the result from method Desktops.List.

type DesktopsUpdateOptions

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

DesktopsUpdateOptions contains the optional parameters for the Desktops.Update method.

type DesktopsUpdateResponse

type DesktopsUpdateResponse struct {
	DesktopsUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DesktopsUpdateResponse contains the response from method Desktops.Update.

type DesktopsUpdateResult

type DesktopsUpdateResult struct {
	Desktop
}

DesktopsUpdateResult contains the result from method Desktops.Update.

type ExpandMsixImage

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

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

func (ExpandMsixImage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ExpandMsixImage.

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.

func (ExpandMsixImageList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ExpandMsixImageList.

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.

func (HealthCheckName) ToPtr

func (c HealthCheckName) ToPtr() *HealthCheckName

ToPtr returns a *HealthCheckName pointing to the current value.

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.

func (HealthCheckResult) ToPtr

ToPtr returns a *HealthCheckResult pointing to the current value.

type HostPool

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,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.

func (HostPoolList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HostPoolList.

type HostPoolPatch

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

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

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"`

	// Enabled to allow this resource to be access from the public network
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,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"`

	// Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,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.

func (HostPoolType) ToPtr

func (c HostPoolType) ToPtr() *HostPoolType

ToPtr returns a *HostPoolType pointing to the current value.

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

NewHostPoolsClient creates a new instance of HostPoolsClient with the specified values.

func (*HostPoolsClient) CreateOrUpdate

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

CreateOrUpdate - Create or update a host pool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewHostPoolsClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		armdesktopvirtualization.HostPool{
			ResourceModelWithAllowedPropertySet: armdesktopvirtualization.ResourceModelWithAllowedPropertySet{
				Location: to.StringPtr("<location>"),
				Tags: map[string]*string{
					"tag1": to.StringPtr("value1"),
					"tag2": to.StringPtr("value2"),
				},
			},
			Properties: &armdesktopvirtualization.HostPoolProperties{
				Description:       to.StringPtr("<description>"),
				CustomRdpProperty: to.StringPtr("<custom-rdp-property>"),
				FriendlyName:      to.StringPtr("<friendly-name>"),
				HostPoolType:      armdesktopvirtualization.HostPoolTypePooled.ToPtr(),
				LoadBalancerType:  armdesktopvirtualization.LoadBalancerTypeBreadthFirst.ToPtr(),
				MaxSessionLimit:   to.Int32Ptr(999999),
				MigrationRequest: &armdesktopvirtualization.MigrationRequestProperties{
					MigrationPath: to.StringPtr("<migration-path>"),
					Operation:     armdesktopvirtualization.OperationStart.ToPtr(),
				},
				PersonalDesktopAssignmentType: armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic.ToPtr(),
				PreferredAppGroupType:         armdesktopvirtualization.PreferredAppGroupTypeDesktop.ToPtr(),
				PublicNetworkAccess:           armdesktopvirtualization.PublicNetworkAccessEnabled.ToPtr(),
				RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{
					ExpirationTime:             to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T14:01:54.9571247Z"); return t }()),
					RegistrationTokenOperation: armdesktopvirtualization.RegistrationTokenOperationUpdate.ToPtr(),
				},
				SsoClientID:                 to.StringPtr("<sso-client-id>"),
				SsoClientSecretKeyVaultPath: to.StringPtr("<sso-client-secret-key-vault-path>"),
				SsoSecretType:               armdesktopvirtualization.SSOSecretTypeSharedKey.ToPtr(),
				SsoadfsAuthority:            to.StringPtr("<ssoadfs-authority>"),
				StartVMOnConnect:            to.BoolPtr(false),
				VMTemplate:                  to.StringPtr("<vmtemplate>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("HostPool.ID: %s\n", *res.ID)
}
Output:

func (*HostPoolsClient) Delete

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

Delete - Remove a host pool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewHostPoolsClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		&armdesktopvirtualization.HostPoolsDeleteOptions{Force: to.BoolPtr(true)})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*HostPoolsClient) Get

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

Get - Get a host pool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewHostPoolsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("HostPool.ID: %s\n", *res.ID)
}
Output:

func (*HostPoolsClient) List

List - List hostPools in subscription. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewHostPoolsClient("<subscription-id>", cred, nil)
	pager := client.List(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("HostPool.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*HostPoolsClient) ListByResourceGroup

func (client *HostPoolsClient) ListByResourceGroup(resourceGroupName string, options *HostPoolsListByResourceGroupOptions) *HostPoolsListByResourceGroupPager

ListByResourceGroup - List hostPools. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewHostPoolsClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("HostPool.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*HostPoolsClient) RetrieveRegistrationToken

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

RetrieveRegistrationToken - Registration token of the host pool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewHostPoolsClient("<subscription-id>", cred, nil)
	_, err = client.RetrieveRegistrationToken(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*HostPoolsClient) Update

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

Update - Update a host pool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewHostPoolsClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		&armdesktopvirtualization.HostPoolsUpdateOptions{HostPool: &armdesktopvirtualization.HostPoolPatch{
			Properties: &armdesktopvirtualization.HostPoolPatchProperties{
				Description:                   to.StringPtr("<description>"),
				CustomRdpProperty:             to.StringPtr("<custom-rdp-property>"),
				FriendlyName:                  to.StringPtr("<friendly-name>"),
				LoadBalancerType:              armdesktopvirtualization.LoadBalancerTypeBreadthFirst.ToPtr(),
				MaxSessionLimit:               to.Int32Ptr(999999),
				PersonalDesktopAssignmentType: armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic.ToPtr(),
				PublicNetworkAccess:           armdesktopvirtualization.PublicNetworkAccessEnabled.ToPtr(),
				RegistrationInfo: &armdesktopvirtualization.RegistrationInfoPatch{
					ExpirationTime:             to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T15:01:54.9571247Z"); return t }()),
					RegistrationTokenOperation: armdesktopvirtualization.RegistrationTokenOperationUpdate.ToPtr(),
				},
				SsoClientID:                 to.StringPtr("<sso-client-id>"),
				SsoClientSecretKeyVaultPath: to.StringPtr("<sso-client-secret-key-vault-path>"),
				SsoSecretType:               armdesktopvirtualization.SSOSecretTypeSharedKey.ToPtr(),
				SsoadfsAuthority:            to.StringPtr("<ssoadfs-authority>"),
				StartVMOnConnect:            to.BoolPtr(false),
				VMTemplate:                  to.StringPtr("<vmtemplate>"),
			},
			Tags: map[string]*string{
				"tag1": to.StringPtr("value1"),
				"tag2": to.StringPtr("value2"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("HostPool.ID: %s\n", *res.ID)
}
Output:

type HostPoolsCreateOrUpdateOptions

type HostPoolsCreateOrUpdateOptions struct {
}

HostPoolsCreateOrUpdateOptions contains the optional parameters for the HostPools.CreateOrUpdate method.

type HostPoolsCreateOrUpdateResponse

type HostPoolsCreateOrUpdateResponse struct {
	HostPoolsCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

HostPoolsCreateOrUpdateResponse contains the response from method HostPools.CreateOrUpdate.

type HostPoolsCreateOrUpdateResult

type HostPoolsCreateOrUpdateResult struct {
	HostPool
}

HostPoolsCreateOrUpdateResult contains the result from method HostPools.CreateOrUpdate.

type HostPoolsDeleteOptions

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

HostPoolsDeleteOptions contains the optional parameters for the HostPools.Delete method.

type HostPoolsDeleteResponse

type HostPoolsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

HostPoolsDeleteResponse contains the response from method HostPools.Delete.

type HostPoolsGetOptions

type HostPoolsGetOptions struct {
}

HostPoolsGetOptions contains the optional parameters for the HostPools.Get method.

type HostPoolsGetResponse

type HostPoolsGetResponse struct {
	HostPoolsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

HostPoolsGetResponse contains the response from method HostPools.Get.

type HostPoolsGetResult

type HostPoolsGetResult struct {
	HostPool
}

HostPoolsGetResult contains the result from method HostPools.Get.

type HostPoolsListByResourceGroupOptions

type HostPoolsListByResourceGroupOptions struct {
}

HostPoolsListByResourceGroupOptions contains the optional parameters for the HostPools.ListByResourceGroup method.

type HostPoolsListByResourceGroupPager

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

HostPoolsListByResourceGroupPager provides operations for iterating over paged responses.

func (*HostPoolsListByResourceGroupPager) Err

Err returns the last error encountered while paging.

func (*HostPoolsListByResourceGroupPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*HostPoolsListByResourceGroupPager) PageResponse

PageResponse returns the current HostPoolsListByResourceGroupResponse page.

type HostPoolsListByResourceGroupResponse

type HostPoolsListByResourceGroupResponse struct {
	HostPoolsListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

HostPoolsListByResourceGroupResponse contains the response from method HostPools.ListByResourceGroup.

type HostPoolsListByResourceGroupResult

type HostPoolsListByResourceGroupResult struct {
	HostPoolList
}

HostPoolsListByResourceGroupResult contains the result from method HostPools.ListByResourceGroup.

type HostPoolsListOptions

type HostPoolsListOptions struct {
}

HostPoolsListOptions contains the optional parameters for the HostPools.List method.

type HostPoolsListPager

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

HostPoolsListPager provides operations for iterating over paged responses.

func (*HostPoolsListPager) Err

func (p *HostPoolsListPager) Err() error

Err returns the last error encountered while paging.

func (*HostPoolsListPager) NextPage

func (p *HostPoolsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*HostPoolsListPager) PageResponse

func (p *HostPoolsListPager) PageResponse() HostPoolsListResponse

PageResponse returns the current HostPoolsListResponse page.

type HostPoolsListResponse

type HostPoolsListResponse struct {
	HostPoolsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

HostPoolsListResponse contains the response from method HostPools.List.

type HostPoolsListResult

type HostPoolsListResult struct {
	HostPoolList
}

HostPoolsListResult contains the result from method HostPools.List.

type HostPoolsRetrieveRegistrationTokenOptions

type HostPoolsRetrieveRegistrationTokenOptions struct {
}

HostPoolsRetrieveRegistrationTokenOptions contains the optional parameters for the HostPools.RetrieveRegistrationToken method.

type HostPoolsRetrieveRegistrationTokenResponse

type HostPoolsRetrieveRegistrationTokenResponse struct {
	HostPoolsRetrieveRegistrationTokenResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

HostPoolsRetrieveRegistrationTokenResponse contains the response from method HostPools.RetrieveRegistrationToken.

type HostPoolsRetrieveRegistrationTokenResult

type HostPoolsRetrieveRegistrationTokenResult struct {
	RegistrationInfo
}

HostPoolsRetrieveRegistrationTokenResult contains the result from method HostPools.RetrieveRegistrationToken.

type HostPoolsUpdateOptions

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

HostPoolsUpdateOptions contains the optional parameters for the HostPools.Update method.

type HostPoolsUpdateResponse

type HostPoolsUpdateResponse struct {
	HostPoolsUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

HostPoolsUpdateResponse contains the response from method HostPools.Update.

type HostPoolsUpdateResult

type HostPoolsUpdateResult struct {
	HostPool
}

HostPoolsUpdateResult contains the result from method HostPools.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.

func (LoadBalancerType) ToPtr

ToPtr returns a *LoadBalancerType pointing to the current value.

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 {
	Resource
	// REQUIRED; Detailed properties for MSIX Package
	Properties *MSIXPackageProperties `json:"properties,omitempty"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`
}

MSIXPackage - Schema for MSIX Package properties.

func (MSIXPackage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MSIXPackage.

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.

func (MSIXPackageList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MSIXPackageList.

type MSIXPackagePatch

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

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

NewMSIXPackagesClient creates a new instance of MSIXPackagesClient with the specified values.

func (*MSIXPackagesClient) CreateOrUpdate

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

CreateOrUpdate - Create or update a MSIX package. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewMSIXPackagesClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<msix-package-full-name>",
		armdesktopvirtualization.MSIXPackage{
			Properties: &armdesktopvirtualization.MSIXPackageProperties{
				DisplayName:           to.StringPtr("<display-name>"),
				ImagePath:             to.StringPtr("<image-path>"),
				IsActive:              to.BoolPtr(false),
				IsRegularRegistration: to.BoolPtr(false),
				LastUpdated:           to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.9571247Z"); return t }()),
				PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{
					{
						Description:    to.StringPtr("<description>"),
						AppID:          to.StringPtr("<app-id>"),
						AppUserModelID: to.StringPtr("<app-user-model-id>"),
						FriendlyName:   to.StringPtr("<friendly-name>"),
						IconImageName:  to.StringPtr("<icon-image-name>"),
						RawIcon:        []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"),
						RawPNG:         []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"),
					}},
				PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{
					{
						DependencyName: to.StringPtr("<dependency-name>"),
						MinVersion:     to.StringPtr("<min-version>"),
						Publisher:      to.StringPtr("<publisher>"),
					}},
				PackageFamilyName:   to.StringPtr("<package-family-name>"),
				PackageName:         to.StringPtr("<package-name>"),
				PackageRelativePath: to.StringPtr("<package-relative-path>"),
				Version:             to.StringPtr("<version>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("MSIXPackage.ID: %s\n", *res.ID)
}
Output:

func (*MSIXPackagesClient) Delete

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

Delete - Remove an MSIX Package. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewMSIXPackagesClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<msix-package-full-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*MSIXPackagesClient) Get

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

Get - Get a msixpackage. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewMSIXPackagesClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<msix-package-full-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("MSIXPackage.ID: %s\n", *res.ID)
}
Output:

func (*MSIXPackagesClient) List

func (client *MSIXPackagesClient) List(resourceGroupName string, hostPoolName string, options *MSIXPackagesListOptions) *MSIXPackagesListPager

List - List MSIX packages in hostpool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewMSIXPackagesClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<host-pool-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("MSIXPackage.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*MSIXPackagesClient) Update

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

Update - Update an MSIX Package. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewMSIXPackagesClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<msix-package-full-name>",
		&armdesktopvirtualization.MSIXPackagesUpdateOptions{MsixPackage: &armdesktopvirtualization.MSIXPackagePatch{
			Properties: &armdesktopvirtualization.MSIXPackagePatchProperties{
				DisplayName:           to.StringPtr("<display-name>"),
				IsActive:              to.BoolPtr(true),
				IsRegularRegistration: to.BoolPtr(false),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("MSIXPackage.ID: %s\n", *res.ID)
}
Output:

type MSIXPackagesCreateOrUpdateOptions

type MSIXPackagesCreateOrUpdateOptions struct {
}

MSIXPackagesCreateOrUpdateOptions contains the optional parameters for the MSIXPackages.CreateOrUpdate method.

type MSIXPackagesCreateOrUpdateResponse

type MSIXPackagesCreateOrUpdateResponse struct {
	MSIXPackagesCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MSIXPackagesCreateOrUpdateResponse contains the response from method MSIXPackages.CreateOrUpdate.

type MSIXPackagesCreateOrUpdateResult

type MSIXPackagesCreateOrUpdateResult struct {
	MSIXPackage
}

MSIXPackagesCreateOrUpdateResult contains the result from method MSIXPackages.CreateOrUpdate.

type MSIXPackagesDeleteOptions

type MSIXPackagesDeleteOptions struct {
}

MSIXPackagesDeleteOptions contains the optional parameters for the MSIXPackages.Delete method.

type MSIXPackagesDeleteResponse

type MSIXPackagesDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MSIXPackagesDeleteResponse contains the response from method MSIXPackages.Delete.

type MSIXPackagesGetOptions

type MSIXPackagesGetOptions struct {
}

MSIXPackagesGetOptions contains the optional parameters for the MSIXPackages.Get method.

type MSIXPackagesGetResponse

type MSIXPackagesGetResponse struct {
	MSIXPackagesGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MSIXPackagesGetResponse contains the response from method MSIXPackages.Get.

type MSIXPackagesGetResult

type MSIXPackagesGetResult struct {
	MSIXPackage
}

MSIXPackagesGetResult contains the result from method MSIXPackages.Get.

type MSIXPackagesListOptions

type MSIXPackagesListOptions struct {
}

MSIXPackagesListOptions contains the optional parameters for the MSIXPackages.List method.

type MSIXPackagesListPager

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

MSIXPackagesListPager provides operations for iterating over paged responses.

func (*MSIXPackagesListPager) Err

func (p *MSIXPackagesListPager) Err() error

Err returns the last error encountered while paging.

func (*MSIXPackagesListPager) NextPage

func (p *MSIXPackagesListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*MSIXPackagesListPager) PageResponse

PageResponse returns the current MSIXPackagesListResponse page.

type MSIXPackagesListResponse

type MSIXPackagesListResponse struct {
	MSIXPackagesListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MSIXPackagesListResponse contains the response from method MSIXPackages.List.

type MSIXPackagesListResult

type MSIXPackagesListResult struct {
	MSIXPackageList
}

MSIXPackagesListResult contains the result from method MSIXPackages.List.

type MSIXPackagesUpdateOptions

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

MSIXPackagesUpdateOptions contains the optional parameters for the MSIXPackages.Update method.

type MSIXPackagesUpdateResponse

type MSIXPackagesUpdateResponse struct {
	MSIXPackagesUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MSIXPackagesUpdateResponse contains the response from method MSIXPackages.Update.

type MSIXPackagesUpdateResult

type MSIXPackagesUpdateResult struct {
	MSIXPackage
}

MSIXPackagesUpdateResult contains the result from method MSIXPackages.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

NewMsixImagesClient creates a new instance of MsixImagesClient with the specified values.

func (*MsixImagesClient) Expand

func (client *MsixImagesClient) Expand(resourceGroupName string, hostPoolName string, msixImageURI MSIXImageURI, options *MsixImagesExpandOptions) *MsixImagesExpandPager

Expand - Expands and Lists MSIX packages in an Image, given the Image Path. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewMsixImagesClient("<subscription-id>", cred, nil)
	pager := client.Expand("<resource-group-name>",
		"<host-pool-name>",
		armdesktopvirtualization.MSIXImageURI{
			URI: to.StringPtr("<uri>"),
		},
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("ExpandMsixImage.ID: %s\n", *v.ID)
		}
	}
}
Output:

type MsixImagesExpandOptions

type MsixImagesExpandOptions struct {
}

MsixImagesExpandOptions contains the optional parameters for the MsixImages.Expand method.

type MsixImagesExpandPager

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

MsixImagesExpandPager provides operations for iterating over paged responses.

func (*MsixImagesExpandPager) Err

func (p *MsixImagesExpandPager) Err() error

Err returns the last error encountered while paging.

func (*MsixImagesExpandPager) NextPage

func (p *MsixImagesExpandPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*MsixImagesExpandPager) PageResponse

PageResponse returns the current MsixImagesExpandResponse page.

type MsixImagesExpandResponse

type MsixImagesExpandResponse struct {
	MsixImagesExpandResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MsixImagesExpandResponse contains the response from method MsixImages.Expand.

type MsixImagesExpandResult

type MsixImagesExpandResult struct {
	ExpandMsixImageList
}

MsixImagesExpandResult contains the result from method MsixImages.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.

func (Operation) ToPtr

func (c Operation) ToPtr() *Operation

ToPtr returns a *Operation pointing to the current value.

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

NewOperationsClient creates a new instance of OperationsClient with the specified values.

func (*OperationsClient) List

List - List all of the available operations the Desktop Virtualization resource provider supports. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewOperationsClient(cred, nil)
	pager := client.List(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
	}
}
Output:

type OperationsListOptions

type OperationsListOptions struct {
}

OperationsListOptions contains the optional parameters for the Operations.List method.

type OperationsListPager

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

OperationsListPager provides operations for iterating over paged responses.

func (*OperationsListPager) Err

func (p *OperationsListPager) Err() error

Err returns the last error encountered while paging.

func (*OperationsListPager) NextPage

func (p *OperationsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OperationsListPager) PageResponse

func (p *OperationsListPager) PageResponse() OperationsListResponse

PageResponse returns the current OperationsListResponse page.

type OperationsListResponse

type OperationsListResponse struct {
	OperationsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OperationsListResponse contains the response from method Operations.List.

type OperationsListResult

type OperationsListResult struct {
	ResourceProviderOperationList
}

OperationsListResult contains the result from method Operations.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.

func (PersonalDesktopAssignmentType) ToPtr

ToPtr returns a *PersonalDesktopAssignmentType pointing to the current value.

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.

func (PreferredAppGroupType) ToPtr

ToPtr returns a *PreferredAppGroupType pointing to the current value.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string `json:"id,omitempty" azure:"ro"`
}

PrivateEndpoint - The Private Endpoint resource.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	Resource
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResultWithSystemData

type PrivateEndpointConnectionListResultWithSystemData struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnectionWithSystemData `json:"value,omitempty"`

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

PrivateEndpointConnectionListResultWithSystemData - List of private endpoint connection associated with the specified storage account

func (PrivateEndpointConnectionListResultWithSystemData) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResultWithSystemData.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`

	// The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

func (PrivateEndpointConnectionProvisioningState) ToPtr

ToPtr returns a *PrivateEndpointConnectionProvisioningState pointing to the current value.

type PrivateEndpointConnectionWithSystemData

type PrivateEndpointConnectionWithSystemData struct {
	PrivateEndpointConnection
	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`
}

PrivateEndpointConnectionWithSystemData - The Private Endpoint Connection resource.

func (PrivateEndpointConnectionWithSystemData) MarshalJSON

func (p PrivateEndpointConnectionWithSystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionWithSystemData.

type PrivateEndpointConnectionsClient

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

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

func (*PrivateEndpointConnectionsClient) DeleteByHostPool

func (client *PrivateEndpointConnectionsClient) DeleteByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsDeleteByHostPoolOptions) (PrivateEndpointConnectionsDeleteByHostPoolResponse, error)

DeleteByHostPool - Remove a connection. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_DeleteByHostPool.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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	_, err = client.DeleteByHostPool(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) DeleteByWorkspace

func (client *PrivateEndpointConnectionsClient) DeleteByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsDeleteByWorkspaceOptions) (PrivateEndpointConnectionsDeleteByWorkspaceResponse, error)

DeleteByWorkspace - Remove a connection. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_DeleteByWorkspace.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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	_, err = client.DeleteByWorkspace(ctx,
		"<resource-group-name>",
		"<workspace-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) GetByHostPool

func (client *PrivateEndpointConnectionsClient) GetByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsGetByHostPoolOptions) (PrivateEndpointConnectionsGetByHostPoolResponse, error)

GetByHostPool - Get a private endpoint connection. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_GetByHostPool.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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	res, err := client.GetByHostPool(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("PrivateEndpointConnectionWithSystemData.ID: %s\n", *res.ID)
}
Output:

func (*PrivateEndpointConnectionsClient) GetByWorkspace

func (client *PrivateEndpointConnectionsClient) GetByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsGetByWorkspaceOptions) (PrivateEndpointConnectionsGetByWorkspaceResponse, error)

GetByWorkspace - Get a private endpoint connection. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_GetByWorkspace.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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	res, err := client.GetByWorkspace(ctx,
		"<resource-group-name>",
		"<workspace-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("PrivateEndpointConnectionWithSystemData.ID: %s\n", *res.ID)
}
Output:

func (*PrivateEndpointConnectionsClient) ListByHostPool

ListByHostPool - List private endpoint connections associated with hostpool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	pager := client.ListByHostPool("<resource-group-name>",
		"<host-pool-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("PrivateEndpointConnectionWithSystemData.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*PrivateEndpointConnectionsClient) ListByWorkspace

ListByWorkspace - List private endpoint connections. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_ListByWorkspace.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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	pager := client.ListByWorkspace("<resource-group-name>",
		"<workspace-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("PrivateEndpointConnectionWithSystemData.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*PrivateEndpointConnectionsClient) UpdateByHostPool

func (client *PrivateEndpointConnectionsClient) UpdateByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsUpdateByHostPoolOptions) (PrivateEndpointConnectionsUpdateByHostPoolResponse, error)

UpdateByHostPool - Approve or reject a private endpoint connection. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_UpdateByHostPool.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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	res, err := client.UpdateByHostPool(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<private-endpoint-connection-name>",
		armdesktopvirtualization.PrivateEndpointConnection{
			Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{
				PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{
					Description:     to.StringPtr("<description>"),
					ActionsRequired: to.StringPtr("<actions-required>"),
					Status:          armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved.ToPtr(),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("PrivateEndpointConnectionWithSystemData.ID: %s\n", *res.ID)
}
Output:

func (*PrivateEndpointConnectionsClient) UpdateByWorkspace

func (client *PrivateEndpointConnectionsClient) UpdateByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsUpdateByWorkspaceOptions) (PrivateEndpointConnectionsUpdateByWorkspaceResponse, error)

UpdateByWorkspace - Approve or reject a private endpoint connection. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.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 := armdesktopvirtualization.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
	res, err := client.UpdateByWorkspace(ctx,
		"<resource-group-name>",
		"<workspace-name>",
		"<private-endpoint-connection-name>",
		armdesktopvirtualization.PrivateEndpointConnection{
			Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{
				PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{
					Description:     to.StringPtr("<description>"),
					ActionsRequired: to.StringPtr("<actions-required>"),
					Status:          armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved.ToPtr(),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("PrivateEndpointConnectionWithSystemData.ID: %s\n", *res.ID)
}
Output:

type PrivateEndpointConnectionsDeleteByHostPoolOptions

type PrivateEndpointConnectionsDeleteByHostPoolOptions struct {
}

PrivateEndpointConnectionsDeleteByHostPoolOptions contains the optional parameters for the PrivateEndpointConnections.DeleteByHostPool method.

type PrivateEndpointConnectionsDeleteByHostPoolResponse

type PrivateEndpointConnectionsDeleteByHostPoolResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsDeleteByHostPoolResponse contains the response from method PrivateEndpointConnections.DeleteByHostPool.

type PrivateEndpointConnectionsDeleteByWorkspaceOptions

type PrivateEndpointConnectionsDeleteByWorkspaceOptions struct {
}

PrivateEndpointConnectionsDeleteByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnections.DeleteByWorkspace method.

type PrivateEndpointConnectionsDeleteByWorkspaceResponse

type PrivateEndpointConnectionsDeleteByWorkspaceResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsDeleteByWorkspaceResponse contains the response from method PrivateEndpointConnections.DeleteByWorkspace.

type PrivateEndpointConnectionsGetByHostPoolOptions

type PrivateEndpointConnectionsGetByHostPoolOptions struct {
}

PrivateEndpointConnectionsGetByHostPoolOptions contains the optional parameters for the PrivateEndpointConnections.GetByHostPool method.

type PrivateEndpointConnectionsGetByHostPoolResponse

type PrivateEndpointConnectionsGetByHostPoolResponse struct {
	PrivateEndpointConnectionsGetByHostPoolResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsGetByHostPoolResponse contains the response from method PrivateEndpointConnections.GetByHostPool.

type PrivateEndpointConnectionsGetByHostPoolResult

type PrivateEndpointConnectionsGetByHostPoolResult struct {
	PrivateEndpointConnectionWithSystemData
}

PrivateEndpointConnectionsGetByHostPoolResult contains the result from method PrivateEndpointConnections.GetByHostPool.

type PrivateEndpointConnectionsGetByWorkspaceOptions

type PrivateEndpointConnectionsGetByWorkspaceOptions struct {
}

PrivateEndpointConnectionsGetByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnections.GetByWorkspace method.

type PrivateEndpointConnectionsGetByWorkspaceResponse

type PrivateEndpointConnectionsGetByWorkspaceResponse struct {
	PrivateEndpointConnectionsGetByWorkspaceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsGetByWorkspaceResponse contains the response from method PrivateEndpointConnections.GetByWorkspace.

type PrivateEndpointConnectionsGetByWorkspaceResult

type PrivateEndpointConnectionsGetByWorkspaceResult struct {
	PrivateEndpointConnectionWithSystemData
}

PrivateEndpointConnectionsGetByWorkspaceResult contains the result from method PrivateEndpointConnections.GetByWorkspace.

type PrivateEndpointConnectionsListByHostPoolOptions

type PrivateEndpointConnectionsListByHostPoolOptions struct {
}

PrivateEndpointConnectionsListByHostPoolOptions contains the optional parameters for the PrivateEndpointConnections.ListByHostPool method.

type PrivateEndpointConnectionsListByHostPoolPager

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

PrivateEndpointConnectionsListByHostPoolPager provides operations for iterating over paged responses.

func (*PrivateEndpointConnectionsListByHostPoolPager) Err

Err returns the last error encountered while paging.

func (*PrivateEndpointConnectionsListByHostPoolPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*PrivateEndpointConnectionsListByHostPoolPager) PageResponse

PageResponse returns the current PrivateEndpointConnectionsListByHostPoolResponse page.

type PrivateEndpointConnectionsListByHostPoolResponse

type PrivateEndpointConnectionsListByHostPoolResponse struct {
	PrivateEndpointConnectionsListByHostPoolResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsListByHostPoolResponse contains the response from method PrivateEndpointConnections.ListByHostPool.

type PrivateEndpointConnectionsListByHostPoolResult

type PrivateEndpointConnectionsListByHostPoolResult struct {
	PrivateEndpointConnectionListResultWithSystemData
}

PrivateEndpointConnectionsListByHostPoolResult contains the result from method PrivateEndpointConnections.ListByHostPool.

type PrivateEndpointConnectionsListByWorkspaceOptions

type PrivateEndpointConnectionsListByWorkspaceOptions struct {
}

PrivateEndpointConnectionsListByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnections.ListByWorkspace method.

type PrivateEndpointConnectionsListByWorkspacePager

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

PrivateEndpointConnectionsListByWorkspacePager provides operations for iterating over paged responses.

func (*PrivateEndpointConnectionsListByWorkspacePager) Err

Err returns the last error encountered while paging.

func (*PrivateEndpointConnectionsListByWorkspacePager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*PrivateEndpointConnectionsListByWorkspacePager) PageResponse

PageResponse returns the current PrivateEndpointConnectionsListByWorkspaceResponse page.

type PrivateEndpointConnectionsListByWorkspaceResponse

type PrivateEndpointConnectionsListByWorkspaceResponse struct {
	PrivateEndpointConnectionsListByWorkspaceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsListByWorkspaceResponse contains the response from method PrivateEndpointConnections.ListByWorkspace.

type PrivateEndpointConnectionsListByWorkspaceResult

type PrivateEndpointConnectionsListByWorkspaceResult struct {
	PrivateEndpointConnectionListResultWithSystemData
}

PrivateEndpointConnectionsListByWorkspaceResult contains the result from method PrivateEndpointConnections.ListByWorkspace.

type PrivateEndpointConnectionsUpdateByHostPoolOptions

type PrivateEndpointConnectionsUpdateByHostPoolOptions struct {
}

PrivateEndpointConnectionsUpdateByHostPoolOptions contains the optional parameters for the PrivateEndpointConnections.UpdateByHostPool method.

type PrivateEndpointConnectionsUpdateByHostPoolResponse

type PrivateEndpointConnectionsUpdateByHostPoolResponse struct {
	PrivateEndpointConnectionsUpdateByHostPoolResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsUpdateByHostPoolResponse contains the response from method PrivateEndpointConnections.UpdateByHostPool.

type PrivateEndpointConnectionsUpdateByHostPoolResult

type PrivateEndpointConnectionsUpdateByHostPoolResult struct {
	PrivateEndpointConnectionWithSystemData
}

PrivateEndpointConnectionsUpdateByHostPoolResult contains the result from method PrivateEndpointConnections.UpdateByHostPool.

type PrivateEndpointConnectionsUpdateByWorkspaceOptions

type PrivateEndpointConnectionsUpdateByWorkspaceOptions struct {
}

PrivateEndpointConnectionsUpdateByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnections.UpdateByWorkspace method.

type PrivateEndpointConnectionsUpdateByWorkspaceResponse

type PrivateEndpointConnectionsUpdateByWorkspaceResponse struct {
	PrivateEndpointConnectionsUpdateByWorkspaceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionsUpdateByWorkspaceResponse contains the response from method PrivateEndpointConnections.UpdateByWorkspace.

type PrivateEndpointConnectionsUpdateByWorkspaceResult

type PrivateEndpointConnectionsUpdateByWorkspaceResult struct {
	PrivateEndpointConnectionWithSystemData
}

PrivateEndpointConnectionsUpdateByWorkspaceResult contains the result from method PrivateEndpointConnections.UpdateByWorkspace.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

func (PrivateEndpointServiceConnectionStatus) ToPtr

ToPtr returns a *PrivateEndpointServiceConnectionStatus pointing to the current value.

type PrivateLinkResource

type PrivateLinkResource struct {
	Resource
	// Resource properties.
	Properties *PrivateLinkResourceProperties `json:"properties,omitempty"`
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource `json:"value,omitempty"`

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

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"`

	// READ-ONLY; The private link resource group id.
	GroupID *string `json:"groupId,omitempty" azure:"ro"`

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"`
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

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

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

func (*PrivateLinkResourcesClient) ListByHostPool

func (client *PrivateLinkResourcesClient) ListByHostPool(resourceGroupName string, hostPoolName string, options *PrivateLinkResourcesListByHostPoolOptions) *PrivateLinkResourcesListByHostPoolPager

ListByHostPool - List the private link resources available for this hostpool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateLinkResources_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 := armdesktopvirtualization.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil)
	pager := client.ListByHostPool("<resource-group-name>",
		"<host-pool-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("PrivateLinkResource.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*PrivateLinkResourcesClient) ListByWorkspace

func (client *PrivateLinkResourcesClient) ListByWorkspace(resourceGroupName string, workspaceName string, options *PrivateLinkResourcesListByWorkspaceOptions) *PrivateLinkResourcesListByWorkspacePager

ListByWorkspace - List the private link resources available for this workspace. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateLinkResources_ListByWorkspace.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 := armdesktopvirtualization.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil)
	pager := client.ListByWorkspace("<resource-group-name>",
		"<workspace-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("PrivateLinkResource.ID: %s\n", *v.ID)
		}
	}
}
Output:

type PrivateLinkResourcesListByHostPoolOptions

type PrivateLinkResourcesListByHostPoolOptions struct {
}

PrivateLinkResourcesListByHostPoolOptions contains the optional parameters for the PrivateLinkResources.ListByHostPool method.

type PrivateLinkResourcesListByHostPoolPager

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

PrivateLinkResourcesListByHostPoolPager provides operations for iterating over paged responses.

func (*PrivateLinkResourcesListByHostPoolPager) Err

Err returns the last error encountered while paging.

func (*PrivateLinkResourcesListByHostPoolPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*PrivateLinkResourcesListByHostPoolPager) PageResponse

PageResponse returns the current PrivateLinkResourcesListByHostPoolResponse page.

type PrivateLinkResourcesListByHostPoolResponse

type PrivateLinkResourcesListByHostPoolResponse struct {
	PrivateLinkResourcesListByHostPoolResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateLinkResourcesListByHostPoolResponse contains the response from method PrivateLinkResources.ListByHostPool.

type PrivateLinkResourcesListByHostPoolResult

type PrivateLinkResourcesListByHostPoolResult struct {
	PrivateLinkResourceListResult
}

PrivateLinkResourcesListByHostPoolResult contains the result from method PrivateLinkResources.ListByHostPool.

type PrivateLinkResourcesListByWorkspaceOptions

type PrivateLinkResourcesListByWorkspaceOptions struct {
}

PrivateLinkResourcesListByWorkspaceOptions contains the optional parameters for the PrivateLinkResources.ListByWorkspace method.

type PrivateLinkResourcesListByWorkspacePager

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

PrivateLinkResourcesListByWorkspacePager provides operations for iterating over paged responses.

func (*PrivateLinkResourcesListByWorkspacePager) Err

Err returns the last error encountered while paging.

func (*PrivateLinkResourcesListByWorkspacePager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*PrivateLinkResourcesListByWorkspacePager) PageResponse

PageResponse returns the current PrivateLinkResourcesListByWorkspaceResponse page.

type PrivateLinkResourcesListByWorkspaceResponse

type PrivateLinkResourcesListByWorkspaceResponse struct {
	PrivateLinkResourcesListByWorkspaceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateLinkResourcesListByWorkspaceResponse contains the response from method PrivateLinkResources.ListByWorkspace.

type PrivateLinkResourcesListByWorkspaceResult

type PrivateLinkResourcesListByWorkspaceResult struct {
	PrivateLinkResourceListResult
}

PrivateLinkResourcesListByWorkspaceResult contains the result from method PrivateLinkResources.ListByWorkspace.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string `json:"actionsRequired,omitempty"`

	// The reason for approval/rejection of the connection.
	Description *string `json:"description,omitempty"`

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

func (PublicNetworkAccess) ToPtr

ToPtr returns a *PublicNetworkAccess pointing to the current value.

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.

func (RegistrationTokenOperation) ToPtr

ToPtr returns a *RegistrationTokenOperation pointing to the current value.

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.

func (RemoteApplicationType) ToPtr

ToPtr returns a *RemoteApplicationType pointing to the current value.

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

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

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 {
	Identity
}

type ResourceModelWithAllowedPropertySetPlan

type ResourceModelWithAllowedPropertySetPlan struct {
	Plan
}

type ResourceModelWithAllowedPropertySetSKU

type ResourceModelWithAllowedPropertySetSKU struct {
	SKU
}

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"`

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

ResourceProviderOperationList - Result of the request to list operations.

func (ResourceProviderOperationList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationList.

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.

func (SKUTier) ToPtr

func (c SKUTier) ToPtr() *SKUTier

ToPtr returns a *SKUTier pointing to the current value.

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.

func (SSOSecretType) ToPtr

func (c SSOSecretType) ToPtr() *SSOSecretType

ToPtr returns a *SSOSecretType pointing to the current value.

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 ScalingHostPoolType

type ScalingHostPoolType string

ScalingHostPoolType - HostPool type for desktop.

const (
	// ScalingHostPoolTypePooled - Users get a new (random) SessionHost every time it connects to the HostPool.
	ScalingHostPoolTypePooled ScalingHostPoolType = "Pooled"
)

func PossibleScalingHostPoolTypeValues

func PossibleScalingHostPoolTypeValues() []ScalingHostPoolType

PossibleScalingHostPoolTypeValues returns the possible values for the ScalingHostPoolType const type.

func (ScalingHostPoolType) ToPtr

ToPtr returns a *ScalingHostPoolType pointing to the current value.

type ScalingPlan

type ScalingPlan struct {
	ResourceModelWithAllowedPropertySet
	// Detailed properties for scaling plan.
	Properties *ScalingPlanProperties `json:"properties,omitempty"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,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.

func (ScalingPlanList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScalingPlanList.

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"`

	// 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 *ScalingHostPoolType `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

NewScalingPlansClient creates a new instance of ScalingPlansClient with the specified values.

func (*ScalingPlansClient) Create

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

Create - Create or update a scaling plan. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_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 := armdesktopvirtualization.NewScalingPlansClient("<subscription-id>", cred, nil)
	res, err := client.Create(ctx,
		"<resource-group-name>",
		"<scaling-plan-name>",
		armdesktopvirtualization.ScalingPlan{
			ResourceModelWithAllowedPropertySet: armdesktopvirtualization.ResourceModelWithAllowedPropertySet{
				Location: to.StringPtr("<location>"),
				Tags: map[string]*string{
					"tag1": to.StringPtr("value1"),
					"tag2": to.StringPtr("value2"),
				},
			},
			Properties: &armdesktopvirtualization.ScalingPlanProperties{
				Description:  to.StringPtr("<description>"),
				ExclusionTag: to.StringPtr("<exclusion-tag>"),
				FriendlyName: to.StringPtr("<friendly-name>"),
				HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{
					{
						HostPoolArmPath:    to.StringPtr("<host-pool-arm-path>"),
						ScalingPlanEnabled: to.BoolPtr(true),
					}},
				HostPoolType: armdesktopvirtualization.ScalingHostPoolTypePooled.ToPtr(),
				Schedules: []*armdesktopvirtualization.ScalingSchedule{
					{
						Name: to.StringPtr("<name>"),
						DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{
							armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday.ToPtr(),
							armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday.ToPtr(),
							armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday.ToPtr(),
							armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday.ToPtr(),
							armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday.ToPtr()},
						OffPeakLoadBalancingAlgorithm: armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst.ToPtr(),
						OffPeakStartTime: &armdesktopvirtualization.Time{
							Hour:   to.Int32Ptr(20),
							Minute: to.Int32Ptr(0),
						},
						PeakLoadBalancingAlgorithm: armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst.ToPtr(),
						PeakStartTime: &armdesktopvirtualization.Time{
							Hour:   to.Int32Ptr(8),
							Minute: to.Int32Ptr(0),
						},
						RampDownCapacityThresholdPct:   to.Int32Ptr(50),
						RampDownForceLogoffUsers:       to.BoolPtr(true),
						RampDownLoadBalancingAlgorithm: armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst.ToPtr(),
						RampDownMinimumHostsPct:        to.Int32Ptr(20),
						RampDownNotificationMessage:    to.StringPtr("<ramp-down-notification-message>"),
						RampDownStartTime: &armdesktopvirtualization.Time{
							Hour:   to.Int32Ptr(18),
							Minute: to.Int32Ptr(0),
						},
						RampDownWaitTimeMinutes:      to.Int32Ptr(30),
						RampUpCapacityThresholdPct:   to.Int32Ptr(80),
						RampUpLoadBalancingAlgorithm: armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst.ToPtr(),
						RampUpMinimumHostsPct:        to.Int32Ptr(20),
						RampUpStartTime: &armdesktopvirtualization.Time{
							Hour:   to.Int32Ptr(6),
							Minute: to.Int32Ptr(0),
						},
					}},
				TimeZone: to.StringPtr("<time-zone>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ScalingPlan.ID: %s\n", *res.ID)
}
Output:

func (*ScalingPlansClient) Delete

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

Delete - Remove a scaling plan. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewScalingPlansClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<scaling-plan-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ScalingPlansClient) Get

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

Get - Get a scaling plan. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewScalingPlansClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<scaling-plan-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ScalingPlan.ID: %s\n", *res.ID)
}
Output:

func (*ScalingPlansClient) ListByHostPool

func (client *ScalingPlansClient) ListByHostPool(resourceGroupName string, hostPoolName string, options *ScalingPlansListByHostPoolOptions) *ScalingPlansListByHostPoolPager

ListByHostPool - List scaling plan associated with hostpool. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewScalingPlansClient("<subscription-id>", cred, nil)
	pager := client.ListByHostPool("<resource-group-name>",
		"<host-pool-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("ScalingPlan.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*ScalingPlansClient) ListByResourceGroup

func (client *ScalingPlansClient) ListByResourceGroup(resourceGroupName string, options *ScalingPlansListByResourceGroupOptions) *ScalingPlansListByResourceGroupPager

ListByResourceGroup - List scaling plans. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewScalingPlansClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("ScalingPlan.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*ScalingPlansClient) ListBySubscription

ListBySubscription - List scaling plans in subscription. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewScalingPlansClient("<subscription-id>", cred, nil)
	pager := client.ListBySubscription(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("ScalingPlan.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*ScalingPlansClient) Update

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

Update - Update a scaling plan. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewScalingPlansClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<scaling-plan-name>",
		&armdesktopvirtualization.ScalingPlansUpdateOptions{ScalingPlan: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ScalingPlan.ID: %s\n", *res.ID)
}
Output:

type ScalingPlansCreateOptions

type ScalingPlansCreateOptions struct {
}

ScalingPlansCreateOptions contains the optional parameters for the ScalingPlans.Create method.

type ScalingPlansCreateResponse

type ScalingPlansCreateResponse struct {
	ScalingPlansCreateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ScalingPlansCreateResponse contains the response from method ScalingPlans.Create.

type ScalingPlansCreateResult

type ScalingPlansCreateResult struct {
	ScalingPlan
}

ScalingPlansCreateResult contains the result from method ScalingPlans.Create.

type ScalingPlansDeleteOptions

type ScalingPlansDeleteOptions struct {
}

ScalingPlansDeleteOptions contains the optional parameters for the ScalingPlans.Delete method.

type ScalingPlansDeleteResponse

type ScalingPlansDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ScalingPlansDeleteResponse contains the response from method ScalingPlans.Delete.

type ScalingPlansGetOptions

type ScalingPlansGetOptions struct {
}

ScalingPlansGetOptions contains the optional parameters for the ScalingPlans.Get method.

type ScalingPlansGetResponse

type ScalingPlansGetResponse struct {
	ScalingPlansGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ScalingPlansGetResponse contains the response from method ScalingPlans.Get.

type ScalingPlansGetResult

type ScalingPlansGetResult struct {
	ScalingPlan
}

ScalingPlansGetResult contains the result from method ScalingPlans.Get.

type ScalingPlansListByHostPoolOptions

type ScalingPlansListByHostPoolOptions struct {
}

ScalingPlansListByHostPoolOptions contains the optional parameters for the ScalingPlans.ListByHostPool method.

type ScalingPlansListByHostPoolPager

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

ScalingPlansListByHostPoolPager provides operations for iterating over paged responses.

func (*ScalingPlansListByHostPoolPager) Err

Err returns the last error encountered while paging.

func (*ScalingPlansListByHostPoolPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ScalingPlansListByHostPoolPager) PageResponse

PageResponse returns the current ScalingPlansListByHostPoolResponse page.

type ScalingPlansListByHostPoolResponse

type ScalingPlansListByHostPoolResponse struct {
	ScalingPlansListByHostPoolResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ScalingPlansListByHostPoolResponse contains the response from method ScalingPlans.ListByHostPool.

type ScalingPlansListByHostPoolResult

type ScalingPlansListByHostPoolResult struct {
	ScalingPlanList
}

ScalingPlansListByHostPoolResult contains the result from method ScalingPlans.ListByHostPool.

type ScalingPlansListByResourceGroupOptions

type ScalingPlansListByResourceGroupOptions struct {
}

ScalingPlansListByResourceGroupOptions contains the optional parameters for the ScalingPlans.ListByResourceGroup method.

type ScalingPlansListByResourceGroupPager

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

ScalingPlansListByResourceGroupPager provides operations for iterating over paged responses.

func (*ScalingPlansListByResourceGroupPager) Err

Err returns the last error encountered while paging.

func (*ScalingPlansListByResourceGroupPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ScalingPlansListByResourceGroupPager) PageResponse

PageResponse returns the current ScalingPlansListByResourceGroupResponse page.

type ScalingPlansListByResourceGroupResponse

type ScalingPlansListByResourceGroupResponse struct {
	ScalingPlansListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ScalingPlansListByResourceGroupResponse contains the response from method ScalingPlans.ListByResourceGroup.

type ScalingPlansListByResourceGroupResult

type ScalingPlansListByResourceGroupResult struct {
	ScalingPlanList
}

ScalingPlansListByResourceGroupResult contains the result from method ScalingPlans.ListByResourceGroup.

type ScalingPlansListBySubscriptionOptions

type ScalingPlansListBySubscriptionOptions struct {
}

ScalingPlansListBySubscriptionOptions contains the optional parameters for the ScalingPlans.ListBySubscription method.

type ScalingPlansListBySubscriptionPager

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

ScalingPlansListBySubscriptionPager provides operations for iterating over paged responses.

func (*ScalingPlansListBySubscriptionPager) Err

Err returns the last error encountered while paging.

func (*ScalingPlansListBySubscriptionPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ScalingPlansListBySubscriptionPager) PageResponse

PageResponse returns the current ScalingPlansListBySubscriptionResponse page.

type ScalingPlansListBySubscriptionResponse

type ScalingPlansListBySubscriptionResponse struct {
	ScalingPlansListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ScalingPlansListBySubscriptionResponse contains the response from method ScalingPlans.ListBySubscription.

type ScalingPlansListBySubscriptionResult

type ScalingPlansListBySubscriptionResult struct {
	ScalingPlanList
}

ScalingPlansListBySubscriptionResult contains the result from method ScalingPlans.ListBySubscription.

type ScalingPlansUpdateOptions

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

ScalingPlansUpdateOptions contains the optional parameters for the ScalingPlans.Update method.

type ScalingPlansUpdateResponse

type ScalingPlansUpdateResponse struct {
	ScalingPlansUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ScalingPlansUpdateResponse contains the response from method ScalingPlans.Update.

type ScalingPlansUpdateResult

type ScalingPlansUpdateResult struct {
	ScalingPlan
}

ScalingPlansUpdateResult contains the result from method ScalingPlans.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 `json:"offPeakStartTime,omitempty"`

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

	// Starting time for peak period.
	PeakStartTime *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 `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 `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.

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.

func (ScalingScheduleDaysOfWeekItem) ToPtr

ToPtr returns a *ScalingScheduleDaysOfWeekItem pointing to the current value.

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

func (ServiceSpecification) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.

type SessionHost

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`
}

SessionHost - Represents a SessionHost definition.

func (SessionHost) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SessionHost.

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.

func (SessionHostList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SessionHostList.

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.

func (SessionHostLoadBalancingAlgorithm) ToPtr

ToPtr returns a *SessionHostLoadBalancingAlgorithm pointing to the current value.

type SessionHostPatch

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

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

NewSessionHostsClient creates a new instance of SessionHostsClient with the specified values.

func (*SessionHostsClient) Delete

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

Delete - Remove a SessionHost. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewSessionHostsClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		&armdesktopvirtualization.SessionHostsDeleteOptions{Force: to.BoolPtr(true)})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*SessionHostsClient) Get

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

Get - Get a session host. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewSessionHostsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("SessionHost.ID: %s\n", *res.ID)
}
Output:

func (*SessionHostsClient) List

func (client *SessionHostsClient) List(resourceGroupName string, hostPoolName string, options *SessionHostsListOptions) *SessionHostsListPager

List - List sessionHosts. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewSessionHostsClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<host-pool-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("SessionHost.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*SessionHostsClient) Update

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

Update - Update a session host. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewSessionHostsClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		&armdesktopvirtualization.SessionHostsUpdateOptions{Force: to.BoolPtr(true),
			SessionHost: &armdesktopvirtualization.SessionHostPatch{
				Properties: &armdesktopvirtualization.SessionHostPatchProperties{
					AllowNewSession: to.BoolPtr(true),
					AssignedUser:    to.StringPtr("<assigned-user>"),
				},
			},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("SessionHost.ID: %s\n", *res.ID)
}
Output:

type SessionHostsDeleteOptions

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

SessionHostsDeleteOptions contains the optional parameters for the SessionHosts.Delete method.

type SessionHostsDeleteResponse

type SessionHostsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SessionHostsDeleteResponse contains the response from method SessionHosts.Delete.

type SessionHostsGetOptions

type SessionHostsGetOptions struct {
}

SessionHostsGetOptions contains the optional parameters for the SessionHosts.Get method.

type SessionHostsGetResponse

type SessionHostsGetResponse struct {
	SessionHostsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SessionHostsGetResponse contains the response from method SessionHosts.Get.

type SessionHostsGetResult

type SessionHostsGetResult struct {
	SessionHost
}

SessionHostsGetResult contains the result from method SessionHosts.Get.

type SessionHostsListOptions

type SessionHostsListOptions struct {
}

SessionHostsListOptions contains the optional parameters for the SessionHosts.List method.

type SessionHostsListPager

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

SessionHostsListPager provides operations for iterating over paged responses.

func (*SessionHostsListPager) Err

func (p *SessionHostsListPager) Err() error

Err returns the last error encountered while paging.

func (*SessionHostsListPager) NextPage

func (p *SessionHostsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*SessionHostsListPager) PageResponse

PageResponse returns the current SessionHostsListResponse page.

type SessionHostsListResponse

type SessionHostsListResponse struct {
	SessionHostsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SessionHostsListResponse contains the response from method SessionHosts.List.

type SessionHostsListResult

type SessionHostsListResult struct {
	SessionHostList
}

SessionHostsListResult contains the result from method SessionHosts.List.

type SessionHostsUpdateOptions

type SessionHostsUpdateOptions struct {
	// Force flag to update assign, unassign or reassign personal desktop.
	Force *bool
	// Object containing SessionHost definitions.
	SessionHost *SessionHostPatch
}

SessionHostsUpdateOptions contains the optional parameters for the SessionHosts.Update method.

type SessionHostsUpdateResponse

type SessionHostsUpdateResponse struct {
	SessionHostsUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SessionHostsUpdateResponse contains the response from method SessionHosts.Update.

type SessionHostsUpdateResult

type SessionHostsUpdateResult struct {
	SessionHost
}

SessionHostsUpdateResult contains the result from method SessionHosts.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.

func (SessionState) ToPtr

func (c SessionState) ToPtr() *SessionState

ToPtr returns a *SessionState pointing to the current value.

type StartMenuItem

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

StartMenuItem - Represents a StartMenuItem definition.

func (StartMenuItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StartMenuItem.

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.

func (StartMenuItemList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StartMenuItemList.

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

NewStartMenuItemsClient creates a new instance of StartMenuItemsClient with the specified values.

func (*StartMenuItemsClient) List

func (client *StartMenuItemsClient) List(resourceGroupName string, applicationGroupName string, options *StartMenuItemsListOptions) *StartMenuItemsListPager

List - List start menu items in the given application group. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewStartMenuItemsClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<application-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("StartMenuItem.ID: %s\n", *v.ID)
		}
	}
}
Output:

type StartMenuItemsListOptions

type StartMenuItemsListOptions struct {
}

StartMenuItemsListOptions contains the optional parameters for the StartMenuItems.List method.

type StartMenuItemsListPager

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

StartMenuItemsListPager provides operations for iterating over paged responses.

func (*StartMenuItemsListPager) Err

func (p *StartMenuItemsListPager) Err() error

Err returns the last error encountered while paging.

func (*StartMenuItemsListPager) NextPage

func (p *StartMenuItemsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*StartMenuItemsListPager) PageResponse

PageResponse returns the current StartMenuItemsListResponse page.

type StartMenuItemsListResponse

type StartMenuItemsListResponse struct {
	StartMenuItemsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

StartMenuItemsListResponse contains the response from method StartMenuItems.List.

type StartMenuItemsListResult

type StartMenuItemsListResult struct {
	StartMenuItemList
}

StartMenuItemsListResult contains the result from method StartMenuItems.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.

func (Status) ToPtr

func (c Status) ToPtr() *Status

ToPtr returns a *Status pointing to the current value.

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.

func (StopHostsWhen) ToPtr

func (c StopHostsWhen) ToPtr() *StopHostsWhen

ToPtr returns a *StopHostsWhen pointing to the current value.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type Time

type Time struct {
	// REQUIRED; The hour.
	Hour *int32 `json:"hour,omitempty"`

	// REQUIRED; The minute.
	Minute *int32 `json:"minute,omitempty"`
}

Time - The time for a scaling action to occur.

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.

func (UpdateState) ToPtr

func (c UpdateState) ToPtr() *UpdateState

ToPtr returns a *UpdateState pointing to the current value.

type UserSession

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`
}

UserSession - Represents a UserSession definition.

func (UserSession) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserSession.

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.

func (UserSessionList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserSessionList.

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

NewUserSessionsClient creates a new instance of UserSessionsClient with the specified values.

func (*UserSessionsClient) Delete

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

Delete - Remove a userSession. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewUserSessionsClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		"<user-session-id>",
		&armdesktopvirtualization.UserSessionsDeleteOptions{Force: to.BoolPtr(true)})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*UserSessionsClient) Disconnect

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

Disconnect - Disconnect a userSession. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewUserSessionsClient("<subscription-id>", cred, nil)
	_, err = client.Disconnect(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		"<user-session-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*UserSessionsClient) Get

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

Get - Get a userSession. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewUserSessionsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		"<user-session-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("UserSession.ID: %s\n", *res.ID)
}
Output:

func (*UserSessionsClient) List

func (client *UserSessionsClient) List(resourceGroupName string, hostPoolName string, sessionHostName string, options *UserSessionsListOptions) *UserSessionsListPager

List - List userSessions. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewUserSessionsClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("UserSession.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*UserSessionsClient) ListByHostPool

func (client *UserSessionsClient) ListByHostPool(resourceGroupName string, hostPoolName string, options *UserSessionsListByHostPoolOptions) *UserSessionsListByHostPoolPager

ListByHostPool - List userSessions. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewUserSessionsClient("<subscription-id>", cred, nil)
	pager := client.ListByHostPool("<resource-group-name>",
		"<host-pool-name>",
		&armdesktopvirtualization.UserSessionsListByHostPoolOptions{Filter: to.StringPtr("<filter>")})
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("UserSession.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*UserSessionsClient) SendMessage

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

SendMessage - Send a message to a user. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewUserSessionsClient("<subscription-id>", cred, nil)
	_, err = client.SendMessage(ctx,
		"<resource-group-name>",
		"<host-pool-name>",
		"<session-host-name>",
		"<user-session-id>",
		&armdesktopvirtualization.UserSessionsSendMessageOptions{SendMessage: &armdesktopvirtualization.SendMessage{
			MessageBody:  to.StringPtr("<message-body>"),
			MessageTitle: to.StringPtr("<message-title>"),
		},
		})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type UserSessionsDeleteOptions

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

UserSessionsDeleteOptions contains the optional parameters for the UserSessions.Delete method.

type UserSessionsDeleteResponse

type UserSessionsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSessionsDeleteResponse contains the response from method UserSessions.Delete.

type UserSessionsDisconnectOptions

type UserSessionsDisconnectOptions struct {
}

UserSessionsDisconnectOptions contains the optional parameters for the UserSessions.Disconnect method.

type UserSessionsDisconnectResponse

type UserSessionsDisconnectResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSessionsDisconnectResponse contains the response from method UserSessions.Disconnect.

type UserSessionsGetOptions

type UserSessionsGetOptions struct {
}

UserSessionsGetOptions contains the optional parameters for the UserSessions.Get method.

type UserSessionsGetResponse

type UserSessionsGetResponse struct {
	UserSessionsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSessionsGetResponse contains the response from method UserSessions.Get.

type UserSessionsGetResult

type UserSessionsGetResult struct {
	UserSession
}

UserSessionsGetResult contains the result from method UserSessions.Get.

type UserSessionsListByHostPoolOptions

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

UserSessionsListByHostPoolOptions contains the optional parameters for the UserSessions.ListByHostPool method.

type UserSessionsListByHostPoolPager

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

UserSessionsListByHostPoolPager provides operations for iterating over paged responses.

func (*UserSessionsListByHostPoolPager) Err

Err returns the last error encountered while paging.

func (*UserSessionsListByHostPoolPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*UserSessionsListByHostPoolPager) PageResponse

PageResponse returns the current UserSessionsListByHostPoolResponse page.

type UserSessionsListByHostPoolResponse

type UserSessionsListByHostPoolResponse struct {
	UserSessionsListByHostPoolResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSessionsListByHostPoolResponse contains the response from method UserSessions.ListByHostPool.

type UserSessionsListByHostPoolResult

type UserSessionsListByHostPoolResult struct {
	UserSessionList
}

UserSessionsListByHostPoolResult contains the result from method UserSessions.ListByHostPool.

type UserSessionsListOptions

type UserSessionsListOptions struct {
}

UserSessionsListOptions contains the optional parameters for the UserSessions.List method.

type UserSessionsListPager

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

UserSessionsListPager provides operations for iterating over paged responses.

func (*UserSessionsListPager) Err

func (p *UserSessionsListPager) Err() error

Err returns the last error encountered while paging.

func (*UserSessionsListPager) NextPage

func (p *UserSessionsListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*UserSessionsListPager) PageResponse

PageResponse returns the current UserSessionsListResponse page.

type UserSessionsListResponse

type UserSessionsListResponse struct {
	UserSessionsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSessionsListResponse contains the response from method UserSessions.List.

type UserSessionsListResult

type UserSessionsListResult struct {
	UserSessionList
}

UserSessionsListResult contains the result from method UserSessions.List.

type UserSessionsSendMessageOptions

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

UserSessionsSendMessageOptions contains the optional parameters for the UserSessions.SendMessage method.

type UserSessionsSendMessageResponse

type UserSessionsSendMessageResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSessionsSendMessageResponse contains the response from method UserSessions.SendMessage.

type Workspace

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,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.

func (WorkspaceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkspaceList.

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"`

	// Enabled to allow this resource to be access from the public network
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,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"`

	// Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only be accessed via private endpoints
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,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

NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values.

func (*WorkspacesClient) CreateOrUpdate

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

CreateOrUpdate - Create or update a workspace. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewWorkspacesClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<workspace-name>",
		armdesktopvirtualization.Workspace{
			ResourceModelWithAllowedPropertySet: armdesktopvirtualization.ResourceModelWithAllowedPropertySet{
				Location: to.StringPtr("<location>"),
				Tags: map[string]*string{
					"tag1": to.StringPtr("value1"),
					"tag2": to.StringPtr("value2"),
				},
			},
			Properties: &armdesktopvirtualization.WorkspaceProperties{
				Description:  to.StringPtr("<description>"),
				FriendlyName: to.StringPtr("<friendly-name>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Workspace.ID: %s\n", *res.ID)
}
Output:

func (*WorkspacesClient) Delete

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

Delete - Remove a workspace. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewWorkspacesClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<workspace-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*WorkspacesClient) Get

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

Get - Get a workspace. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewWorkspacesClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<workspace-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Workspace.ID: %s\n", *res.ID)
}
Output:

func (*WorkspacesClient) ListByResourceGroup

func (client *WorkspacesClient) ListByResourceGroup(resourceGroupName string, options *WorkspacesListByResourceGroupOptions) *WorkspacesListByResourceGroupPager

ListByResourceGroup - List workspaces. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewWorkspacesClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Workspace.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*WorkspacesClient) ListBySubscription

ListBySubscription - List workspaces in subscription. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewWorkspacesClient("<subscription-id>", cred, nil)
	pager := client.ListBySubscription(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Workspace.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*WorkspacesClient) Update

func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesUpdateOptions) (WorkspacesUpdateResponse, error)

Update - Update a workspace. If the operation fails it returns the *CloudError error type.

Example

x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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 := armdesktopvirtualization.NewWorkspacesClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<workspace-name>",
		&armdesktopvirtualization.WorkspacesUpdateOptions{Workspace: &armdesktopvirtualization.WorkspacePatch{
			Properties: &armdesktopvirtualization.WorkspacePatchProperties{
				Description:         to.StringPtr("<description>"),
				FriendlyName:        to.StringPtr("<friendly-name>"),
				PublicNetworkAccess: armdesktopvirtualization.PublicNetworkAccessEnabled.ToPtr(),
			},
			Tags: map[string]*string{
				"tag1": to.StringPtr("value1"),
				"tag2": to.StringPtr("value2"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Workspace.ID: %s\n", *res.ID)
}
Output:

type WorkspacesCreateOrUpdateOptions

type WorkspacesCreateOrUpdateOptions struct {
}

WorkspacesCreateOrUpdateOptions contains the optional parameters for the Workspaces.CreateOrUpdate method.

type WorkspacesCreateOrUpdateResponse

type WorkspacesCreateOrUpdateResponse struct {
	WorkspacesCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

WorkspacesCreateOrUpdateResponse contains the response from method Workspaces.CreateOrUpdate.

type WorkspacesCreateOrUpdateResult

type WorkspacesCreateOrUpdateResult struct {
	Workspace
}

WorkspacesCreateOrUpdateResult contains the result from method Workspaces.CreateOrUpdate.

type WorkspacesDeleteOptions

type WorkspacesDeleteOptions struct {
}

WorkspacesDeleteOptions contains the optional parameters for the Workspaces.Delete method.

type WorkspacesDeleteResponse

type WorkspacesDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

WorkspacesDeleteResponse contains the response from method Workspaces.Delete.

type WorkspacesGetOptions

type WorkspacesGetOptions struct {
}

WorkspacesGetOptions contains the optional parameters for the Workspaces.Get method.

type WorkspacesGetResponse

type WorkspacesGetResponse struct {
	WorkspacesGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

WorkspacesGetResponse contains the response from method Workspaces.Get.

type WorkspacesGetResult

type WorkspacesGetResult struct {
	Workspace
}

WorkspacesGetResult contains the result from method Workspaces.Get.

type WorkspacesListByResourceGroupOptions

type WorkspacesListByResourceGroupOptions struct {
}

WorkspacesListByResourceGroupOptions contains the optional parameters for the Workspaces.ListByResourceGroup method.

type WorkspacesListByResourceGroupPager

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

WorkspacesListByResourceGroupPager provides operations for iterating over paged responses.

func (*WorkspacesListByResourceGroupPager) Err

Err returns the last error encountered while paging.

func (*WorkspacesListByResourceGroupPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*WorkspacesListByResourceGroupPager) PageResponse

PageResponse returns the current WorkspacesListByResourceGroupResponse page.

type WorkspacesListByResourceGroupResponse

type WorkspacesListByResourceGroupResponse struct {
	WorkspacesListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

WorkspacesListByResourceGroupResponse contains the response from method Workspaces.ListByResourceGroup.

type WorkspacesListByResourceGroupResult

type WorkspacesListByResourceGroupResult struct {
	WorkspaceList
}

WorkspacesListByResourceGroupResult contains the result from method Workspaces.ListByResourceGroup.

type WorkspacesListBySubscriptionOptions

type WorkspacesListBySubscriptionOptions struct {
}

WorkspacesListBySubscriptionOptions contains the optional parameters for the Workspaces.ListBySubscription method.

type WorkspacesListBySubscriptionPager

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

WorkspacesListBySubscriptionPager provides operations for iterating over paged responses.

func (*WorkspacesListBySubscriptionPager) Err

Err returns the last error encountered while paging.

func (*WorkspacesListBySubscriptionPager) NextPage

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*WorkspacesListBySubscriptionPager) PageResponse

PageResponse returns the current WorkspacesListBySubscriptionResponse page.

type WorkspacesListBySubscriptionResponse

type WorkspacesListBySubscriptionResponse struct {
	WorkspacesListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

WorkspacesListBySubscriptionResponse contains the response from method Workspaces.ListBySubscription.

type WorkspacesListBySubscriptionResult

type WorkspacesListBySubscriptionResult struct {
	WorkspaceList
}

WorkspacesListBySubscriptionResult contains the result from method Workspaces.ListBySubscription.

type WorkspacesUpdateOptions

type WorkspacesUpdateOptions struct {
	// Object containing Workspace definitions.
	Workspace *WorkspacePatch
}

WorkspacesUpdateOptions contains the optional parameters for the Workspaces.Update method.

type WorkspacesUpdateResponse

type WorkspacesUpdateResponse struct {
	WorkspacesUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

WorkspacesUpdateResponse contains the response from method Workspaces.Update.

type WorkspacesUpdateResult

type WorkspacesUpdateResult struct {
	Workspace
}

WorkspacesUpdateResult contains the result from method Workspaces.Update.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL