Documentation ¶
Index ¶
- type AgentUpdatePatchProperties
- type AgentUpdateProperties
- type AppAttachPackage
- type AppAttachPackageArchitectures
- type AppAttachPackageClient
- func (client *AppAttachPackageClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, appAttachPackageName string, ...) (AppAttachPackageClientCreateOrUpdateResponse, error)
- func (client *AppAttachPackageClient) Delete(ctx context.Context, resourceGroupName string, appAttachPackageName string, ...) (AppAttachPackageClientDeleteResponse, error)
- func (client *AppAttachPackageClient) Get(ctx context.Context, resourceGroupName string, appAttachPackageName string, ...) (AppAttachPackageClientGetResponse, error)
- func (client *AppAttachPackageClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[AppAttachPackageClientListByResourceGroupResponse]
- func (client *AppAttachPackageClient) NewListBySubscriptionPager(options *AppAttachPackageClientListBySubscriptionOptions) *runtime.Pager[AppAttachPackageClientListBySubscriptionResponse]
- func (client *AppAttachPackageClient) Update(ctx context.Context, resourceGroupName string, appAttachPackageName string, ...) (AppAttachPackageClientUpdateResponse, error)
- type AppAttachPackageClientCreateOrUpdateOptions
- type AppAttachPackageClientCreateOrUpdateResponse
- type AppAttachPackageClientDeleteOptions
- type AppAttachPackageClientDeleteResponse
- type AppAttachPackageClientGetOptions
- type AppAttachPackageClientGetResponse
- type AppAttachPackageClientListByResourceGroupOptions
- type AppAttachPackageClientListByResourceGroupResponse
- type AppAttachPackageClientListBySubscriptionOptions
- type AppAttachPackageClientListBySubscriptionResponse
- type AppAttachPackageClientUpdateOptions
- type AppAttachPackageClientUpdateResponse
- type AppAttachPackageInfoClient
- type AppAttachPackageInfoClientImportOptions
- type AppAttachPackageInfoClientImportResponse
- type AppAttachPackageInfoProperties
- type AppAttachPackageList
- type AppAttachPackagePatch
- type AppAttachPackagePatchProperties
- type AppAttachPackageProperties
- type Application
- type ApplicationGroup
- type ApplicationGroupList
- type ApplicationGroupPatch
- type ApplicationGroupPatchProperties
- type ApplicationGroupProperties
- type ApplicationGroupType
- type ApplicationGroupsClient
- func (client *ApplicationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationGroupsClientCreateOrUpdateResponse, error)
- func (client *ApplicationGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationGroupsClientDeleteResponse, error)
- func (client *ApplicationGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationGroupsClientGetResponse, error)
- func (client *ApplicationGroupsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ApplicationGroupsClientListByResourceGroupResponse]
- func (client *ApplicationGroupsClient) NewListBySubscriptionPager(options *ApplicationGroupsClientListBySubscriptionOptions) *runtime.Pager[ApplicationGroupsClientListBySubscriptionResponse]
- func (client *ApplicationGroupsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationGroupsClientUpdateResponse, error)
- type ApplicationGroupsClientCreateOrUpdateOptions
- type ApplicationGroupsClientCreateOrUpdateResponse
- type ApplicationGroupsClientDeleteOptions
- type ApplicationGroupsClientDeleteResponse
- type ApplicationGroupsClientGetOptions
- type ApplicationGroupsClientGetResponse
- type ApplicationGroupsClientListByResourceGroupOptions
- type ApplicationGroupsClientListByResourceGroupResponse
- type ApplicationGroupsClientListBySubscriptionOptions
- type ApplicationGroupsClientListBySubscriptionResponse
- type ApplicationGroupsClientUpdateOptions
- type ApplicationGroupsClientUpdateResponse
- type ApplicationList
- type ApplicationPatch
- type ApplicationPatchProperties
- type ApplicationProperties
- type ApplicationType
- type ApplicationsClient
- func (client *ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationsClientCreateOrUpdateResponse, error)
- func (client *ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationsClientDeleteResponse, error)
- func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationsClientGetResponse, error)
- func (client *ApplicationsClient) NewListPager(resourceGroupName string, applicationGroupName string, ...) *runtime.Pager[ApplicationsClientListResponse]
- func (client *ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (ApplicationsClientUpdateResponse, error)
- type ApplicationsClientCreateOrUpdateOptions
- type ApplicationsClientCreateOrUpdateResponse
- type ApplicationsClientDeleteOptions
- type ApplicationsClientDeleteResponse
- type ApplicationsClientGetOptions
- type ApplicationsClientGetResponse
- type ApplicationsClientListOptions
- type ApplicationsClientListResponse
- type ApplicationsClientUpdateOptions
- type ApplicationsClientUpdateResponse
- type ClientFactory
- func (c *ClientFactory) NewAppAttachPackageClient() *AppAttachPackageClient
- func (c *ClientFactory) NewAppAttachPackageInfoClient() *AppAttachPackageInfoClient
- func (c *ClientFactory) NewApplicationGroupsClient() *ApplicationGroupsClient
- func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient
- func (c *ClientFactory) NewDesktopsClient() *DesktopsClient
- func (c *ClientFactory) NewHostPoolsClient() *HostPoolsClient
- func (c *ClientFactory) NewMSIXPackagesClient() *MSIXPackagesClient
- func (c *ClientFactory) NewMsixImagesClient() *MsixImagesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- func (c *ClientFactory) NewScalingPlanPersonalSchedulesClient() *ScalingPlanPersonalSchedulesClient
- func (c *ClientFactory) NewScalingPlanPooledSchedulesClient() *ScalingPlanPooledSchedulesClient
- func (c *ClientFactory) NewScalingPlansClient() *ScalingPlansClient
- func (c *ClientFactory) NewSessionHostsClient() *SessionHostsClient
- func (c *ClientFactory) NewStartMenuItemsClient() *StartMenuItemsClient
- func (c *ClientFactory) NewUserSessionsClient() *UserSessionsClient
- func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient
- type CommandLineSetting
- type CreatedByType
- type DayOfWeek
- type Desktop
- type DesktopList
- type DesktopPatch
- type DesktopPatchProperties
- type DesktopProperties
- type DesktopsClient
- func (client *DesktopsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (DesktopsClientGetResponse, error)
- func (client *DesktopsClient) NewListPager(resourceGroupName string, applicationGroupName string, ...) *runtime.Pager[DesktopsClientListResponse]
- func (client *DesktopsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, ...) (DesktopsClientUpdateResponse, error)
- type DesktopsClientGetOptions
- type DesktopsClientGetResponse
- type DesktopsClientListOptions
- type DesktopsClientListResponse
- type DesktopsClientUpdateOptions
- type DesktopsClientUpdateResponse
- type ExpandMsixImage
- type ExpandMsixImageList
- type ExpandMsixImageProperties
- type FailHealthCheckOnStagingFailure
- type HealthCheckName
- type HealthCheckResult
- type HostPool
- type HostPoolList
- type HostPoolPatch
- type HostPoolPatchProperties
- type HostPoolProperties
- type HostPoolType
- type HostPoolsClient
- func (client *HostPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (HostPoolsClientCreateOrUpdateResponse, error)
- func (client *HostPoolsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (HostPoolsClientDeleteResponse, error)
- func (client *HostPoolsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (HostPoolsClientGetResponse, error)
- func (client *HostPoolsClient) ListRegistrationTokens(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (HostPoolsClientListRegistrationTokensResponse, error)
- func (client *HostPoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostPoolsClientListByResourceGroupOptions) *runtime.Pager[HostPoolsClientListByResourceGroupResponse]
- func (client *HostPoolsClient) NewListPager(options *HostPoolsClientListOptions) *runtime.Pager[HostPoolsClientListResponse]
- func (client *HostPoolsClient) RetrieveRegistrationToken(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (HostPoolsClientRetrieveRegistrationTokenResponse, error)
- func (client *HostPoolsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (HostPoolsClientUpdateResponse, error)
- type HostPoolsClientCreateOrUpdateOptions
- type HostPoolsClientCreateOrUpdateResponse
- type HostPoolsClientDeleteOptions
- type HostPoolsClientDeleteResponse
- type HostPoolsClientGetOptions
- type HostPoolsClientGetResponse
- type HostPoolsClientListByResourceGroupOptions
- type HostPoolsClientListByResourceGroupResponse
- type HostPoolsClientListOptions
- type HostPoolsClientListRegistrationTokensOptions
- type HostPoolsClientListRegistrationTokensResponse
- type HostPoolsClientListResponse
- type HostPoolsClientRetrieveRegistrationTokenOptions
- type HostPoolsClientRetrieveRegistrationTokenResponse
- type HostPoolsClientUpdateOptions
- type HostPoolsClientUpdateResponse
- type HostpoolPublicNetworkAccess
- type ImportPackageInfoRequest
- type LoadBalancerType
- type LogSpecification
- type MSIXImageURI
- type MSIXPackage
- type MSIXPackageList
- type MSIXPackagePatch
- type MSIXPackagePatchProperties
- type MSIXPackageProperties
- type MSIXPackagesClient
- func (client *MSIXPackagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (MSIXPackagesClientCreateOrUpdateResponse, error)
- func (client *MSIXPackagesClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (MSIXPackagesClientDeleteResponse, error)
- func (client *MSIXPackagesClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (MSIXPackagesClientGetResponse, error)
- func (client *MSIXPackagesClient) NewListPager(resourceGroupName string, hostPoolName string, ...) *runtime.Pager[MSIXPackagesClientListResponse]
- func (client *MSIXPackagesClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (MSIXPackagesClientUpdateResponse, error)
- type MSIXPackagesClientCreateOrUpdateOptions
- type MSIXPackagesClientCreateOrUpdateResponse
- type MSIXPackagesClientDeleteOptions
- type MSIXPackagesClientDeleteResponse
- type MSIXPackagesClientGetOptions
- type MSIXPackagesClientGetResponse
- type MSIXPackagesClientListOptions
- type MSIXPackagesClientListResponse
- type MSIXPackagesClientUpdateOptions
- type MSIXPackagesClientUpdateResponse
- type MaintenanceWindowPatchProperties
- type MaintenanceWindowProperties
- type MsixImagesClient
- type MsixImagesClientExpandOptions
- type MsixImagesClientExpandResponse
- type MsixPackageApplications
- type MsixPackageDependencies
- type OperationProperties
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PackageTimestamped
- type PersonalDesktopAssignmentType
- type PreferredAppGroupType
- type PrivateEndpoint
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResultWithSystemData
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointConnectionWithSystemData
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) DeleteByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (PrivateEndpointConnectionsClientDeleteByHostPoolResponse, error)
- func (client *PrivateEndpointConnectionsClient) DeleteByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, ...) (PrivateEndpointConnectionsClientDeleteByWorkspaceResponse, error)
- func (client *PrivateEndpointConnectionsClient) GetByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (PrivateEndpointConnectionsClientGetByHostPoolResponse, error)
- func (client *PrivateEndpointConnectionsClient) GetByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, ...) (PrivateEndpointConnectionsClientGetByWorkspaceResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListByHostPoolResponse]
- func (client *PrivateEndpointConnectionsClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListByWorkspaceResponse]
- func (client *PrivateEndpointConnectionsClient) UpdateByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (PrivateEndpointConnectionsClientUpdateByHostPoolResponse, error)
- func (client *PrivateEndpointConnectionsClient) UpdateByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, ...) (PrivateEndpointConnectionsClientUpdateByWorkspaceResponse, error)
- type PrivateEndpointConnectionsClientDeleteByHostPoolOptions
- type PrivateEndpointConnectionsClientDeleteByHostPoolResponse
- type PrivateEndpointConnectionsClientDeleteByWorkspaceOptions
- type PrivateEndpointConnectionsClientDeleteByWorkspaceResponse
- type PrivateEndpointConnectionsClientGetByHostPoolOptions
- type PrivateEndpointConnectionsClientGetByHostPoolResponse
- type PrivateEndpointConnectionsClientGetByWorkspaceOptions
- type PrivateEndpointConnectionsClientGetByWorkspaceResponse
- type PrivateEndpointConnectionsClientListByHostPoolOptions
- type PrivateEndpointConnectionsClientListByHostPoolResponse
- type PrivateEndpointConnectionsClientListByWorkspaceOptions
- type PrivateEndpointConnectionsClientListByWorkspaceResponse
- type PrivateEndpointConnectionsClientUpdateByHostPoolOptions
- type PrivateEndpointConnectionsClientUpdateByHostPoolResponse
- type PrivateEndpointConnectionsClientUpdateByWorkspaceOptions
- type PrivateEndpointConnectionsClientUpdateByWorkspaceResponse
- type PrivateEndpointServiceConnectionStatus
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- func (client *PrivateLinkResourcesClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, ...) *runtime.Pager[PrivateLinkResourcesClientListByHostPoolResponse]
- func (client *PrivateLinkResourcesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, ...) *runtime.Pager[PrivateLinkResourcesClientListByWorkspaceResponse]
- type PrivateLinkResourcesClientListByHostPoolOptions
- type PrivateLinkResourcesClientListByHostPoolResponse
- type PrivateLinkResourcesClientListByWorkspaceOptions
- type PrivateLinkResourcesClientListByWorkspaceResponse
- type PrivateLinkServiceConnectionState
- type ProvisioningState
- type PublicNetworkAccess
- type RegistrationInfo
- type RegistrationInfoPatch
- type RegistrationTokenList
- type RegistrationTokenMinimal
- type RegistrationTokenOperation
- type RemoteApplicationType
- type ResourceModelWithAllowedPropertySetIdentity
- type ResourceModelWithAllowedPropertySetPlan
- type ResourceModelWithAllowedPropertySetSKU
- type ResourceProviderOperation
- type ResourceProviderOperationDisplay
- type ResourceProviderOperationList
- type SKUTier
- type SSOSecretType
- type ScalingHostPoolReference
- type ScalingHostPoolType
- type ScalingPlan
- type ScalingPlanList
- type ScalingPlanPatch
- type ScalingPlanPatchProperties
- type ScalingPlanPersonalSchedule
- type ScalingPlanPersonalScheduleList
- type ScalingPlanPersonalSchedulePatch
- type ScalingPlanPersonalScheduleProperties
- type ScalingPlanPersonalSchedulesClient
- func (client *ScalingPlanPersonalSchedulesClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPersonalSchedulesClientCreateResponse, error)
- func (client *ScalingPlanPersonalSchedulesClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPersonalSchedulesClientDeleteResponse, error)
- func (client *ScalingPlanPersonalSchedulesClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPersonalSchedulesClientGetResponse, error)
- func (client *ScalingPlanPersonalSchedulesClient) NewListPager(resourceGroupName string, scalingPlanName string, ...) *runtime.Pager[ScalingPlanPersonalSchedulesClientListResponse]
- func (client *ScalingPlanPersonalSchedulesClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPersonalSchedulesClientUpdateResponse, error)
- type ScalingPlanPersonalSchedulesClientCreateOptions
- type ScalingPlanPersonalSchedulesClientCreateResponse
- type ScalingPlanPersonalSchedulesClientDeleteOptions
- type ScalingPlanPersonalSchedulesClientDeleteResponse
- type ScalingPlanPersonalSchedulesClientGetOptions
- type ScalingPlanPersonalSchedulesClientGetResponse
- type ScalingPlanPersonalSchedulesClientListOptions
- type ScalingPlanPersonalSchedulesClientListResponse
- type ScalingPlanPersonalSchedulesClientUpdateOptions
- type ScalingPlanPersonalSchedulesClientUpdateResponse
- type ScalingPlanPooledSchedule
- type ScalingPlanPooledScheduleList
- type ScalingPlanPooledSchedulePatch
- type ScalingPlanPooledScheduleProperties
- type ScalingPlanPooledSchedulesClient
- func (client *ScalingPlanPooledSchedulesClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPooledSchedulesClientCreateResponse, error)
- func (client *ScalingPlanPooledSchedulesClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPooledSchedulesClientDeleteResponse, error)
- func (client *ScalingPlanPooledSchedulesClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPooledSchedulesClientGetResponse, error)
- func (client *ScalingPlanPooledSchedulesClient) NewListPager(resourceGroupName string, scalingPlanName string, ...) *runtime.Pager[ScalingPlanPooledSchedulesClientListResponse]
- func (client *ScalingPlanPooledSchedulesClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlanPooledSchedulesClientUpdateResponse, error)
- type ScalingPlanPooledSchedulesClientCreateOptions
- type ScalingPlanPooledSchedulesClientCreateResponse
- type ScalingPlanPooledSchedulesClientDeleteOptions
- type ScalingPlanPooledSchedulesClientDeleteResponse
- type ScalingPlanPooledSchedulesClientGetOptions
- type ScalingPlanPooledSchedulesClientGetResponse
- type ScalingPlanPooledSchedulesClientListOptions
- type ScalingPlanPooledSchedulesClientListResponse
- type ScalingPlanPooledSchedulesClientUpdateOptions
- type ScalingPlanPooledSchedulesClientUpdateResponse
- type ScalingPlanProperties
- type ScalingPlansClient
- func (client *ScalingPlansClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlansClientCreateResponse, error)
- func (client *ScalingPlansClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlansClientDeleteResponse, error)
- func (client *ScalingPlansClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlansClientGetResponse, error)
- func (client *ScalingPlansClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, ...) *runtime.Pager[ScalingPlansClientListByHostPoolResponse]
- func (client *ScalingPlansClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ScalingPlansClientListByResourceGroupResponse]
- func (client *ScalingPlansClient) NewListBySubscriptionPager(options *ScalingPlansClientListBySubscriptionOptions) *runtime.Pager[ScalingPlansClientListBySubscriptionResponse]
- func (client *ScalingPlansClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, ...) (ScalingPlansClientUpdateResponse, error)
- type ScalingPlansClientCreateOptions
- type ScalingPlansClientCreateResponse
- type ScalingPlansClientDeleteOptions
- type ScalingPlansClientDeleteResponse
- type ScalingPlansClientGetOptions
- type ScalingPlansClientGetResponse
- type ScalingPlansClientListByHostPoolOptions
- type ScalingPlansClientListByHostPoolResponse
- type ScalingPlansClientListByResourceGroupOptions
- type ScalingPlansClientListByResourceGroupResponse
- type ScalingPlansClientListBySubscriptionOptions
- type ScalingPlansClientListBySubscriptionResponse
- type ScalingPlansClientUpdateOptions
- type ScalingPlansClientUpdateResponse
- type ScalingSchedule
- type ScalingScheduleDaysOfWeekItem
- type SendMessage
- type ServiceSpecification
- type SessionHandlingOperation
- type SessionHost
- type SessionHostComponentUpdateType
- type SessionHostHealthCheckFailureDetails
- type SessionHostHealthCheckReport
- type SessionHostList
- type SessionHostLoadBalancingAlgorithm
- type SessionHostPatch
- type SessionHostPatchProperties
- type SessionHostProperties
- type SessionHostsClient
- func (client *SessionHostsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (SessionHostsClientDeleteResponse, error)
- func (client *SessionHostsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (SessionHostsClientGetResponse, error)
- func (client *SessionHostsClient) NewListPager(resourceGroupName string, hostPoolName string, ...) *runtime.Pager[SessionHostsClientListResponse]
- func (client *SessionHostsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (SessionHostsClientUpdateResponse, error)
- type SessionHostsClientDeleteOptions
- type SessionHostsClientDeleteResponse
- type SessionHostsClientGetOptions
- type SessionHostsClientGetResponse
- type SessionHostsClientListOptions
- type SessionHostsClientListResponse
- type SessionHostsClientUpdateOptions
- type SessionHostsClientUpdateResponse
- type SessionState
- type SetStartVMOnConnect
- type StartMenuItem
- type StartMenuItemList
- type StartMenuItemProperties
- type StartMenuItemsClient
- type StartMenuItemsClientListOptions
- type StartMenuItemsClientListResponse
- type StartupBehavior
- type Status
- type StopHostsWhen
- type SystemData
- type Time
- type UpdateState
- type UserSession
- type UserSessionList
- type UserSessionProperties
- type UserSessionsClient
- func (client *UserSessionsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (UserSessionsClientDeleteResponse, error)
- func (client *UserSessionsClient) Disconnect(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (UserSessionsClientDisconnectResponse, error)
- func (client *UserSessionsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (UserSessionsClientGetResponse, error)
- func (client *UserSessionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, ...) *runtime.Pager[UserSessionsClientListByHostPoolResponse]
- func (client *UserSessionsClient) NewListPager(resourceGroupName string, hostPoolName string, sessionHostName string, ...) *runtime.Pager[UserSessionsClientListResponse]
- func (client *UserSessionsClient) SendMessage(ctx context.Context, resourceGroupName string, hostPoolName string, ...) (UserSessionsClientSendMessageResponse, error)
- type UserSessionsClientDeleteOptions
- type UserSessionsClientDeleteResponse
- type UserSessionsClientDisconnectOptions
- type UserSessionsClientDisconnectResponse
- type UserSessionsClientGetOptions
- type UserSessionsClientGetResponse
- type UserSessionsClientListByHostPoolOptions
- type UserSessionsClientListByHostPoolResponse
- type UserSessionsClientListOptions
- type UserSessionsClientListResponse
- type UserSessionsClientSendMessageOptions
- type UserSessionsClientSendMessageResponse
- type Workspace
- type WorkspaceList
- type WorkspacePatch
- type WorkspacePatchProperties
- type WorkspaceProperties
- type WorkspacesClient
- func (client *WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ...) (WorkspacesClientCreateOrUpdateResponse, error)
- func (client *WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, ...) (WorkspacesClientDeleteResponse, error)
- func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ...) (WorkspacesClientGetResponse, error)
- func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse]
- func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse]
- func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, ...) (WorkspacesClientUpdateResponse, error)
- type WorkspacesClientCreateOrUpdateOptions
- type WorkspacesClientCreateOrUpdateResponse
- type WorkspacesClientDeleteOptions
- type WorkspacesClientDeleteResponse
- type WorkspacesClientGetOptions
- type WorkspacesClientGetResponse
- type WorkspacesClientListByResourceGroupOptions
- type WorkspacesClientListByResourceGroupResponse
- type WorkspacesClientListBySubscriptionOptions
- type WorkspacesClientListBySubscriptionResponse
- type WorkspacesClientUpdateOptions
- type WorkspacesClientUpdateResponse
Examples ¶
- AppAttachPackageClient.CreateOrUpdate
- AppAttachPackageClient.Delete
- AppAttachPackageClient.Get
- AppAttachPackageClient.NewListByResourceGroupPager
- AppAttachPackageClient.NewListBySubscriptionPager
- AppAttachPackageClient.Update
- AppAttachPackageInfoClient.NewImportPager
- ApplicationGroupsClient.CreateOrUpdate
- ApplicationGroupsClient.Delete
- ApplicationGroupsClient.Get
- ApplicationGroupsClient.NewListByResourceGroupPager
- ApplicationGroupsClient.NewListBySubscriptionPager
- ApplicationGroupsClient.Update
- ApplicationsClient.CreateOrUpdate
- ApplicationsClient.Delete
- ApplicationsClient.Get
- ApplicationsClient.NewListPager
- ApplicationsClient.Update
- DesktopsClient.Get
- DesktopsClient.NewListPager
- DesktopsClient.Update
- HostPoolsClient.CreateOrUpdate
- HostPoolsClient.Delete
- HostPoolsClient.Get
- HostPoolsClient.ListRegistrationTokens
- HostPoolsClient.NewListByResourceGroupPager
- HostPoolsClient.NewListPager
- HostPoolsClient.RetrieveRegistrationToken
- HostPoolsClient.Update
- MSIXPackagesClient.CreateOrUpdate
- MSIXPackagesClient.Delete
- MSIXPackagesClient.Get
- MSIXPackagesClient.NewListPager
- MSIXPackagesClient.Update
- MsixImagesClient.NewExpandPager
- OperationsClient.NewListPager
- PrivateEndpointConnectionsClient.DeleteByHostPool
- PrivateEndpointConnectionsClient.DeleteByWorkspace
- PrivateEndpointConnectionsClient.GetByHostPool
- PrivateEndpointConnectionsClient.GetByWorkspace
- PrivateEndpointConnectionsClient.NewListByHostPoolPager
- PrivateEndpointConnectionsClient.NewListByWorkspacePager
- PrivateEndpointConnectionsClient.UpdateByHostPool
- PrivateEndpointConnectionsClient.UpdateByWorkspace
- PrivateLinkResourcesClient.NewListByHostPoolPager
- PrivateLinkResourcesClient.NewListByWorkspacePager
- ScalingPlanPersonalSchedulesClient.Create
- ScalingPlanPersonalSchedulesClient.Delete
- ScalingPlanPersonalSchedulesClient.Get
- ScalingPlanPersonalSchedulesClient.NewListPager
- ScalingPlanPersonalSchedulesClient.Update
- ScalingPlanPooledSchedulesClient.Create
- ScalingPlanPooledSchedulesClient.Delete
- ScalingPlanPooledSchedulesClient.Get
- ScalingPlanPooledSchedulesClient.NewListPager
- ScalingPlanPooledSchedulesClient.Update
- ScalingPlansClient.Create
- ScalingPlansClient.Delete
- ScalingPlansClient.Get
- ScalingPlansClient.NewListByHostPoolPager
- ScalingPlansClient.NewListByResourceGroupPager
- ScalingPlansClient.NewListBySubscriptionPager
- ScalingPlansClient.Update
- SessionHostsClient.Delete
- SessionHostsClient.Get
- SessionHostsClient.NewListPager
- SessionHostsClient.Update
- StartMenuItemsClient.NewListPager
- UserSessionsClient.Delete
- UserSessionsClient.Disconnect
- UserSessionsClient.Get
- UserSessionsClient.NewListByHostPoolPager
- UserSessionsClient.NewListPager
- UserSessionsClient.SendMessage
- WorkspacesClient.CreateOrUpdate
- WorkspacesClient.Delete
- WorkspacesClient.Get
- WorkspacesClient.NewListByResourceGroupPager
- WorkspacesClient.NewListBySubscriptionPager
- WorkspacesClient.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentUpdatePatchProperties ¶
type AgentUpdatePatchProperties struct { // Time zone for maintenance as defined in https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. // Must be set if useLocalTime is true. MaintenanceWindowTimeZone *string // List of maintenance windows. Maintenance windows are 2 hours long. MaintenanceWindows []*MaintenanceWindowPatchProperties // The type of maintenance for session host components. Type *SessionHostComponentUpdateType // Whether to use localTime of the virtual machine. UseSessionHostLocalTime *bool }
AgentUpdatePatchProperties - The session host configuration for updating agent, monitoring agent, and stack component.
func (AgentUpdatePatchProperties) MarshalJSON ¶
func (a AgentUpdatePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentUpdatePatchProperties.
func (*AgentUpdatePatchProperties) UnmarshalJSON ¶
func (a *AgentUpdatePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdatePatchProperties.
type AgentUpdateProperties ¶
type AgentUpdateProperties struct { // Time zone for maintenance as defined in https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. // Must be set if useLocalTime is true. MaintenanceWindowTimeZone *string // List of maintenance windows. Maintenance windows are 2 hours long. MaintenanceWindows []*MaintenanceWindowProperties // The type of maintenance for session host components. Type *SessionHostComponentUpdateType // Whether to use localTime of the virtual machine. UseSessionHostLocalTime *bool }
AgentUpdateProperties - The session host configuration for updating agent, monitoring agent, and stack component.
func (AgentUpdateProperties) MarshalJSON ¶
func (a AgentUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentUpdateProperties.
func (*AgentUpdateProperties) UnmarshalJSON ¶
func (a *AgentUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateProperties.
type AppAttachPackage ¶ added in v2.3.0
type AppAttachPackage struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Detailed properties for App Attach Package Properties *AppAttachPackageProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
AppAttachPackage - Schema for App Attach Package properties.
func (AppAttachPackage) MarshalJSON ¶ added in v2.3.0
func (a AppAttachPackage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AppAttachPackage.
func (*AppAttachPackage) UnmarshalJSON ¶ added in v2.3.0
func (a *AppAttachPackage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackage.
type AppAttachPackageArchitectures ¶ added in v2.3.0
type AppAttachPackageArchitectures string
AppAttachPackageArchitectures - Possible device architectures that an app attach package can be configured for
const ( AppAttachPackageArchitecturesALL AppAttachPackageArchitectures = "ALL" AppAttachPackageArchitecturesARM AppAttachPackageArchitectures = "ARM" AppAttachPackageArchitecturesARM64 AppAttachPackageArchitectures = "ARM64" AppAttachPackageArchitecturesNeutral AppAttachPackageArchitectures = "Neutral" AppAttachPackageArchitecturesX64 AppAttachPackageArchitectures = "x64" AppAttachPackageArchitecturesX86 AppAttachPackageArchitectures = "x86" AppAttachPackageArchitecturesX86A64 AppAttachPackageArchitectures = "x86a64" )
func PossibleAppAttachPackageArchitecturesValues ¶ added in v2.3.0
func PossibleAppAttachPackageArchitecturesValues() []AppAttachPackageArchitectures
PossibleAppAttachPackageArchitecturesValues returns the possible values for the AppAttachPackageArchitectures const type.
type AppAttachPackageClient ¶ added in v2.3.0
type AppAttachPackageClient struct {
// contains filtered or unexported fields
}
AppAttachPackageClient contains the methods for the AppAttachPackage group. Don't use this type directly, use NewAppAttachPackageClient() instead.
func NewAppAttachPackageClient ¶ added in v2.3.0
func NewAppAttachPackageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppAttachPackageClient, error)
NewAppAttachPackageClient creates a new instance of AppAttachPackageClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AppAttachPackageClient) CreateOrUpdate ¶ added in v2.3.0
func (client *AppAttachPackageClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, appAttachPackageName string, appAttachPackage AppAttachPackage, options *AppAttachPackageClientCreateOrUpdateOptions) (AppAttachPackageClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update an App Attach package. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appAttachPackageName - The name of the App Attach package
- appAttachPackage - Object containing App Attach Package definitions.
- options - AppAttachPackageClientCreateOrUpdateOptions contains the optional parameters for the AppAttachPackageClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAppAttachPackageClient().CreateOrUpdate(ctx, "resourceGroup1", "msixpackagefullname", armdesktopvirtualization.AppAttachPackage{ Location: to.Ptr("southcentralus"), Properties: &armdesktopvirtualization.AppAttachPackageProperties{ FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), HostPoolReferences: []*string{}, Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t }()), CertificateName: to.Ptr("certName"), DisplayName: to.Ptr("displayname"), ImagePath: to.Ptr("imagepath"), IsActive: to.Ptr(false), IsRegularRegistration: to.Ptr(false), LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t }()), PackageAlias: to.Ptr("msixpackagealias"), PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ { Description: to.Ptr("PackageApplicationDescription"), AppID: to.Ptr("AppId"), AppUserModelID: to.Ptr("AppUserModelId"), FriendlyName: to.Ptr("FriendlyName"), IconImageName: to.Ptr("Iconimagename"), RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), }}, PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ { DependencyName: to.Ptr("MsixPackage_Dependency_Name"), MinVersion: to.Ptr("packageDep_version"), Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), }}, PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), PackageFullName: to.Ptr("MsixPackage_FullName"), PackageName: to.Ptr("MsixPackageName"), PackageRelativePath: to.Ptr("packagerelativepath"), Version: to.Ptr("packageversion"), }, KeyVaultURL: to.Ptr(""), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AppAttachPackage = armdesktopvirtualization.AppAttachPackage{ // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }
Output:
func (*AppAttachPackageClient) Delete ¶ added in v2.3.0
func (client *AppAttachPackageClient) Delete(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientDeleteOptions) (AppAttachPackageClientDeleteResponse, error)
Delete - Remove an App Attach Package. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appAttachPackageName - The name of the App Attach package
- options - AppAttachPackageClientDeleteOptions contains the optional parameters for the AppAttachPackageClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewAppAttachPackageClient().Delete(ctx, "resourceGroup1", "packagefullname", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*AppAttachPackageClient) Get ¶ added in v2.3.0
func (client *AppAttachPackageClient) Get(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientGetOptions) (AppAttachPackageClientGetResponse, error)
Get - Get an app attach package. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appAttachPackageName - The name of the App Attach package
- options - AppAttachPackageClientGetOptions contains the optional parameters for the AppAttachPackageClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAppAttachPackageClient().Get(ctx, "resourceGroup1", "packagefullname", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AppAttachPackage = armdesktopvirtualization.AppAttachPackage{ // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }
Output:
func (*AppAttachPackageClient) NewListByResourceGroupPager ¶ added in v2.3.0
func (client *AppAttachPackageClient) NewListByResourceGroupPager(resourceGroupName string, options *AppAttachPackageClientListByResourceGroupOptions) *runtime.Pager[AppAttachPackageClientListByResourceGroupResponse]
NewListByResourceGroupPager - List App Attach packages in resource group.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - AppAttachPackageClientListByResourceGroupOptions contains the optional parameters for the AppAttachPackageClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAppAttachPackageClient().NewListByResourceGroupPager("resourceGroup1", &armdesktopvirtualization.AppAttachPackageClientListByResourceGroupOptions{Filter: to.Ptr("HostPoolName eq 'hostpool1'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AppAttachPackageList = armdesktopvirtualization.AppAttachPackageList{ // Value: []*armdesktopvirtualization.AppAttachPackage{ // { // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }, // { // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }}, // } }
Output:
func (*AppAttachPackageClient) NewListBySubscriptionPager ¶ added in v2.3.0
func (client *AppAttachPackageClient) NewListBySubscriptionPager(options *AppAttachPackageClientListBySubscriptionOptions) *runtime.Pager[AppAttachPackageClientListBySubscriptionResponse]
NewListBySubscriptionPager - List App Attach packages in subscription.
Generated from API version 2024-04-03
- options - AppAttachPackageClientListBySubscriptionOptions contains the optional parameters for the AppAttachPackageClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_ListBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAppAttachPackageClient().NewListBySubscriptionPager(&armdesktopvirtualization.AppAttachPackageClientListBySubscriptionOptions{Filter: to.Ptr("HostPoolName eq 'hostpool1'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AppAttachPackageList = armdesktopvirtualization.AppAttachPackageList{ // Value: []*armdesktopvirtualization.AppAttachPackage{ // { // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }, // { // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }}, // } }
Output:
func (*AppAttachPackageClient) Update ¶ added in v2.3.0
func (client *AppAttachPackageClient) Update(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientUpdateOptions) (AppAttachPackageClientUpdateResponse, error)
Update - Update an App Attach Package If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- appAttachPackageName - The name of the App Attach package
- options - AppAttachPackageClientUpdateOptions contains the optional parameters for the AppAttachPackageClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAppAttachPackageClient().Update(ctx, "resourceGroup1", "msixpackagefullname", &armdesktopvirtualization.AppAttachPackageClientUpdateOptions{AppAttachPackagePatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AppAttachPackage = armdesktopvirtualization.AppAttachPackage{ // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }
Output:
type AppAttachPackageClientCreateOrUpdateOptions ¶ added in v2.3.0
type AppAttachPackageClientCreateOrUpdateOptions struct { }
AppAttachPackageClientCreateOrUpdateOptions contains the optional parameters for the AppAttachPackageClient.CreateOrUpdate method.
type AppAttachPackageClientCreateOrUpdateResponse ¶ added in v2.3.0
type AppAttachPackageClientCreateOrUpdateResponse struct { // Schema for App Attach Package properties. AppAttachPackage }
AppAttachPackageClientCreateOrUpdateResponse contains the response from method AppAttachPackageClient.CreateOrUpdate.
type AppAttachPackageClientDeleteOptions ¶ added in v2.3.0
type AppAttachPackageClientDeleteOptions struct { }
AppAttachPackageClientDeleteOptions contains the optional parameters for the AppAttachPackageClient.Delete method.
type AppAttachPackageClientDeleteResponse ¶ added in v2.3.0
type AppAttachPackageClientDeleteResponse struct { }
AppAttachPackageClientDeleteResponse contains the response from method AppAttachPackageClient.Delete.
type AppAttachPackageClientGetOptions ¶ added in v2.3.0
type AppAttachPackageClientGetOptions struct { }
AppAttachPackageClientGetOptions contains the optional parameters for the AppAttachPackageClient.Get method.
type AppAttachPackageClientGetResponse ¶ added in v2.3.0
type AppAttachPackageClientGetResponse struct { // Schema for App Attach Package properties. AppAttachPackage }
AppAttachPackageClientGetResponse contains the response from method AppAttachPackageClient.Get.
type AppAttachPackageClientListByResourceGroupOptions ¶ added in v2.3.0
type AppAttachPackageClientListByResourceGroupOptions struct { // OData filter expression. Valid properties for filtering are package name and host pool. Filter *string }
AppAttachPackageClientListByResourceGroupOptions contains the optional parameters for the AppAttachPackageClient.NewListByResourceGroupPager method.
type AppAttachPackageClientListByResourceGroupResponse ¶ added in v2.3.0
type AppAttachPackageClientListByResourceGroupResponse struct { // List of App Attach Package definitions. AppAttachPackageList }
AppAttachPackageClientListByResourceGroupResponse contains the response from method AppAttachPackageClient.NewListByResourceGroupPager.
type AppAttachPackageClientListBySubscriptionOptions ¶ added in v2.3.0
type AppAttachPackageClientListBySubscriptionOptions struct { // OData filter expression. Valid properties for filtering are package name, host pool, and resource group. Filter *string }
AppAttachPackageClientListBySubscriptionOptions contains the optional parameters for the AppAttachPackageClient.NewListBySubscriptionPager method.
type AppAttachPackageClientListBySubscriptionResponse ¶ added in v2.3.0
type AppAttachPackageClientListBySubscriptionResponse struct { // List of App Attach Package definitions. AppAttachPackageList }
AppAttachPackageClientListBySubscriptionResponse contains the response from method AppAttachPackageClient.NewListBySubscriptionPager.
type AppAttachPackageClientUpdateOptions ¶ added in v2.3.0
type AppAttachPackageClientUpdateOptions struct { // Object containing App Attach Package definition. AppAttachPackagePatch *AppAttachPackagePatch }
AppAttachPackageClientUpdateOptions contains the optional parameters for the AppAttachPackageClient.Update method.
type AppAttachPackageClientUpdateResponse ¶ added in v2.3.0
type AppAttachPackageClientUpdateResponse struct { // Schema for App Attach Package properties. AppAttachPackage }
AppAttachPackageClientUpdateResponse contains the response from method AppAttachPackageClient.Update.
type AppAttachPackageInfoClient ¶ added in v2.3.0
type AppAttachPackageInfoClient struct {
// contains filtered or unexported fields
}
AppAttachPackageInfoClient contains the methods for the AppAttachPackageInfo group. Don't use this type directly, use NewAppAttachPackageInfoClient() instead.
func NewAppAttachPackageInfoClient ¶ added in v2.3.0
func NewAppAttachPackageInfoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppAttachPackageInfoClient, error)
NewAppAttachPackageInfoClient creates a new instance of AppAttachPackageInfoClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AppAttachPackageInfoClient) NewImportPager ¶ added in v2.3.0
func (client *AppAttachPackageInfoClient) NewImportPager(resourceGroupName string, hostPoolName string, importPackageInfoRequest ImportPackageInfoRequest, options *AppAttachPackageInfoClientImportOptions) *runtime.Pager[AppAttachPackageInfoClientImportResponse]
NewImportPager - Gets information from a package given the path to the package.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- importPackageInfoRequest - Object containing URI to package image and other optional properties
- options - AppAttachPackageInfoClientImportOptions contains the optional parameters for the AppAttachPackageInfoClient.NewImportPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackageInfo_Import_Post.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAppAttachPackageInfoClient().NewImportPager("resourceGroup1", "hostpool1", armdesktopvirtualization.ImportPackageInfoRequest{ Path: to.Ptr("imagepath"), PackageArchitecture: to.Ptr(armdesktopvirtualization.AppAttachPackageArchitecturesX64), }, nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AppAttachPackageList = armdesktopvirtualization.AppAttachPackageList{ // Value: []*armdesktopvirtualization.AppAttachPackage{ // { // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }, // { // Name: to.Ptr("packageName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/appattachpackages"), // ID: to.Ptr("/subscriptions/d15725f7-6577-4a8c-95f1-3da903b42364/resourcegroups/charlesk-southcentralus/providers/Microsoft.DesktopVirtualization/appattachpackages/ModifierPackage"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-28T23:44:56.130Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-09T01:43:31.070Z"); return t}()), // LastModifiedBy: to.Ptr("user1"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("southcentralus"), // Tags: map[string]*string{ // }, // Properties: &armdesktopvirtualization.AppAttachPackageProperties{ // FailHealthCheckOnStagingFailure: to.Ptr(armdesktopvirtualization.FailHealthCheckOnStagingFailureNeedsAssistance), // HostPoolReferences: []*string{ // }, // Image: &armdesktopvirtualization.AppAttachPackageInfoProperties{ // CertificateExpiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-02T17:18:19.123Z"); return t}()), // CertificateName: to.Ptr("certName"), // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // KeyVaultURL: to.Ptr(""), // }, // }}, // } }
Output:
type AppAttachPackageInfoClientImportOptions ¶ added in v2.3.0
type AppAttachPackageInfoClientImportOptions struct { }
AppAttachPackageInfoClientImportOptions contains the optional parameters for the AppAttachPackageInfoClient.NewImportPager method.
type AppAttachPackageInfoClientImportResponse ¶ added in v2.3.0
type AppAttachPackageInfoClientImportResponse struct { // List of App Attach Package definitions. AppAttachPackageList }
AppAttachPackageInfoClientImportResponse contains the response from method AppAttachPackageInfoClient.NewImportPager.
type AppAttachPackageInfoProperties ¶ added in v2.3.0
type AppAttachPackageInfoProperties struct { // Date certificate expires, found in the appxmanifest.xml. CertificateExpiry *time.Time // Certificate name found in the appxmanifest.xml. CertificateName *string // User friendly Name to be displayed in the portal. DisplayName *string // VHD/CIM image path on Network Share. ImagePath *string // Make this version of the package the active one across the hostpool. IsActive *bool // Is package timestamped so it can ignore the certificate expiry date IsPackageTimestamped *PackageTimestamped // Specifies how to register Package in feed. IsRegularRegistration *bool // Date Package was last updated, found in the appxmanifest.xml. LastUpdated *time.Time // Alias of App Attach Package. Assigned at import time PackageAlias *string // List of package applications. PackageApplications []*MsixPackageApplications // List of package dependencies. PackageDependencies []*MsixPackageDependencies // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. PackageFamilyName *string // Package Full Name from appxmanifest.xml. PackageFullName *string // Package Name from appxmanifest.xml. PackageName *string // Relative Path to the package inside the image. PackageRelativePath *string // Package version found in the appxmanifest.xml. Version *string }
AppAttachPackageInfoProperties - Schema for Import Package Information properties.
func (AppAttachPackageInfoProperties) MarshalJSON ¶ added in v2.3.0
func (a AppAttachPackageInfoProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AppAttachPackageInfoProperties.
func (*AppAttachPackageInfoProperties) UnmarshalJSON ¶ added in v2.3.0
func (a *AppAttachPackageInfoProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackageInfoProperties.
type AppAttachPackageList ¶ added in v2.3.0
type AppAttachPackageList struct { // List of App Attach Package definitions. Value []*AppAttachPackage // READ-ONLY; Link to the next page of results. NextLink *string }
AppAttachPackageList - List of App Attach Package definitions.
func (AppAttachPackageList) MarshalJSON ¶ added in v2.3.0
func (a AppAttachPackageList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AppAttachPackageList.
func (*AppAttachPackageList) UnmarshalJSON ¶ added in v2.3.0
func (a *AppAttachPackageList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackageList.
type AppAttachPackagePatch ¶ added in v2.3.0
type AppAttachPackagePatch struct { // Detailed properties for App Attach Package Properties *AppAttachPackagePatchProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
AppAttachPackagePatch - Schema for updatable App Attach Package properties.
func (AppAttachPackagePatch) MarshalJSON ¶ added in v2.3.0
func (a AppAttachPackagePatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AppAttachPackagePatch.
func (*AppAttachPackagePatch) UnmarshalJSON ¶ added in v2.3.0
func (a *AppAttachPackagePatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackagePatch.
type AppAttachPackagePatchProperties ¶ added in v2.3.0
type AppAttachPackagePatchProperties struct { // Parameter indicating how the health check should behave if this package fails staging FailHealthCheckOnStagingFailure *FailHealthCheckOnStagingFailure // List of Hostpool resource Ids. HostPoolReferences []*string // Detailed properties for App Attach Package Image *AppAttachPackageInfoProperties // URL path to certificate name located in keyVault KeyVaultURL *string }
AppAttachPackagePatchProperties - Schema for patchable fields on an App Attach Package.
func (AppAttachPackagePatchProperties) MarshalJSON ¶ added in v2.3.0
func (a AppAttachPackagePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AppAttachPackagePatchProperties.
func (*AppAttachPackagePatchProperties) UnmarshalJSON ¶ added in v2.3.0
func (a *AppAttachPackagePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackagePatchProperties.
type AppAttachPackageProperties ¶ added in v2.3.0
type AppAttachPackageProperties struct { // Parameter indicating how the health check should behave if this package fails staging FailHealthCheckOnStagingFailure *FailHealthCheckOnStagingFailure // List of Hostpool resource Ids. HostPoolReferences []*string // Detailed properties for App Attach Package Image *AppAttachPackageInfoProperties // URL path to certificate name located in keyVault KeyVaultURL *string // READ-ONLY; The provisioning state of the App Attach Package. ProvisioningState *ProvisioningState }
AppAttachPackageProperties - Schema for App Attach Package properties.
func (AppAttachPackageProperties) MarshalJSON ¶ added in v2.3.0
func (a AppAttachPackageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AppAttachPackageProperties.
func (*AppAttachPackageProperties) UnmarshalJSON ¶ added in v2.3.0
func (a *AppAttachPackageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackageProperties.
type Application ¶
type Application struct { // REQUIRED; Detailed properties for Application Properties *ApplicationProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Application - Schema for Application properties.
func (Application) MarshalJSON ¶
func (a Application) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Application.
func (*Application) UnmarshalJSON ¶
func (a *Application) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Application.
type ApplicationGroup ¶
type ApplicationGroup struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Detailed properties for ApplicationGroup Properties *ApplicationGroupProperties Identity *ResourceModelWithAllowedPropertySetIdentity // 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 // 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 Plan *ResourceModelWithAllowedPropertySetPlan SKU *ResourceModelWithAllowedPropertySetSKU // Resource tags. Tags map[string]*string // 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 // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ApplicationGroup - Represents a ApplicationGroup definition.
func (ApplicationGroup) MarshalJSON ¶
func (a ApplicationGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationGroup.
func (*ApplicationGroup) UnmarshalJSON ¶
func (a *ApplicationGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroup.
type ApplicationGroupList ¶
type ApplicationGroupList struct { // List of ApplicationGroup definitions. Value []*ApplicationGroup // READ-ONLY; Link to the next page of results. NextLink *string }
ApplicationGroupList - List of ApplicationGroup definitions.
func (ApplicationGroupList) MarshalJSON ¶
func (a ApplicationGroupList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationGroupList.
func (*ApplicationGroupList) UnmarshalJSON ¶
func (a *ApplicationGroupList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupList.
type ApplicationGroupPatch ¶
type ApplicationGroupPatch struct { // ApplicationGroup properties that can be patched. Properties *ApplicationGroupPatchProperties // tags to be updated Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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.
func (*ApplicationGroupPatch) UnmarshalJSON ¶
func (a *ApplicationGroupPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupPatch.
type ApplicationGroupPatchProperties ¶
type ApplicationGroupPatchProperties struct { // Description of ApplicationGroup. Description *string // Friendly name of ApplicationGroup. FriendlyName *string // Boolean representing whether the applicationGroup is show in the feed. ShowInFeed *bool }
ApplicationGroupPatchProperties - ApplicationGroup properties that can be patched.
func (ApplicationGroupPatchProperties) MarshalJSON ¶
func (a ApplicationGroupPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationGroupPatchProperties.
func (*ApplicationGroupPatchProperties) UnmarshalJSON ¶
func (a *ApplicationGroupPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupPatchProperties.
type ApplicationGroupProperties ¶
type ApplicationGroupProperties struct { // REQUIRED; Resource Type of ApplicationGroup. ApplicationGroupType *ApplicationGroupType // REQUIRED; HostPool arm path of ApplicationGroup. HostPoolArmPath *string // Description of ApplicationGroup. Description *string // Friendly name of ApplicationGroup. FriendlyName *string // Boolean representing whether the applicationGroup is show in the feed. ShowInFeed *bool // READ-ONLY; Is cloud pc resource. CloudPcResource *bool // READ-ONLY; ObjectId of ApplicationGroup. (internal use) ObjectID *string // READ-ONLY; Workspace arm path of ApplicationGroup. WorkspaceArmPath *string }
ApplicationGroupProperties - Schema for ApplicationGroup properties.
func (ApplicationGroupProperties) MarshalJSON ¶
func (a ApplicationGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationGroupProperties.
func (*ApplicationGroupProperties) UnmarshalJSON ¶
func (a *ApplicationGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupProperties.
type ApplicationGroupType ¶
type ApplicationGroupType string
ApplicationGroupType - Resource Type of ApplicationGroup.
const ( ApplicationGroupTypeDesktop ApplicationGroupType = "Desktop" ApplicationGroupTypeRemoteApp ApplicationGroupType = "RemoteApp" )
func PossibleApplicationGroupTypeValues ¶
func PossibleApplicationGroupTypeValues() []ApplicationGroupType
PossibleApplicationGroupTypeValues returns the possible values for the ApplicationGroupType const type.
type ApplicationGroupsClient ¶
type ApplicationGroupsClient struct {
// contains filtered or unexported fields
}
ApplicationGroupsClient contains the methods for the ApplicationGroups group. Don't use this type directly, use NewApplicationGroupsClient() instead.
func NewApplicationGroupsClient ¶
func NewApplicationGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGroupsClient, error)
NewApplicationGroupsClient creates a new instance of ApplicationGroupsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ApplicationGroupsClient) CreateOrUpdate ¶
func (client *ApplicationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationGroup ApplicationGroup, options *ApplicationGroupsClientCreateOrUpdateOptions) (ApplicationGroupsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update an applicationGroup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- applicationGroup - Object containing ApplicationGroup definitions.
- options - ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationGroupsClient().CreateOrUpdate(ctx, "resourceGroup1", "applicationGroup1", armdesktopvirtualization.ApplicationGroup{ Location: to.Ptr("centralus"), Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, Properties: &armdesktopvirtualization.ApplicationGroupProperties{ Description: to.Ptr("des1"), ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), FriendlyName: to.Ptr("friendly"), HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), ShowInFeed: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ApplicationGroup = armdesktopvirtualization.ApplicationGroup{ // Name: to.Ptr("applicationGroup1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ApplicationGroupProperties{ // Description: to.Ptr("des1"), // ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInFeed: to.Ptr(true), // WorkspaceArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // }, // }
Output:
func (*ApplicationGroupsClient) Delete ¶
func (client *ApplicationGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientDeleteOptions) (ApplicationGroupsClientDeleteResponse, error)
Delete - Remove an applicationGroup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- options - ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewApplicationGroupsClient().Delete(ctx, "resourceGroup1", "applicationGroup1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ApplicationGroupsClient) Get ¶
func (client *ApplicationGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientGetOptions) (ApplicationGroupsClientGetResponse, error)
Get - Get an application group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- options - ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationGroupsClient().Get(ctx, "resourceGroup1", "applicationGroup1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ApplicationGroup = armdesktopvirtualization.ApplicationGroup{ // Name: to.Ptr("applicationGroup1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ApplicationGroupProperties{ // Description: to.Ptr("des1"), // ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInFeed: to.Ptr(true), // WorkspaceArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // }, // }
Output:
func (*ApplicationGroupsClient) NewListByResourceGroupPager ¶
func (client *ApplicationGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *ApplicationGroupsClientListByResourceGroupOptions) *runtime.Pager[ApplicationGroupsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List applicationGroups.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationGroupsClient().NewListByResourceGroupPager("resourceGroup1", &armdesktopvirtualization.ApplicationGroupsClientListByResourceGroupOptions{Filter: to.Ptr("applicationGroupType eq 'RailApplication'"), PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ApplicationGroupList = armdesktopvirtualization.ApplicationGroupList{ // Value: []*armdesktopvirtualization.ApplicationGroup{ // { // Name: to.Ptr("applicationGroup1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ApplicationGroupProperties{ // Description: to.Ptr("des1"), // ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInFeed: to.Ptr(true), // WorkspaceArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // }, // }, // { // Name: to.Ptr("applicationGroup2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ApplicationGroupProperties{ // Description: to.Ptr("des1"), // ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInFeed: to.Ptr(true), // WorkspaceArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // }, // }}, // } }
Output:
func (*ApplicationGroupsClient) NewListBySubscriptionPager ¶
func (client *ApplicationGroupsClient) NewListBySubscriptionPager(options *ApplicationGroupsClientListBySubscriptionOptions) *runtime.Pager[ApplicationGroupsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List applicationGroups in subscription.
Generated from API version 2024-04-03
- options - ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_ListBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationGroupsClient().NewListBySubscriptionPager(&armdesktopvirtualization.ApplicationGroupsClientListBySubscriptionOptions{Filter: to.Ptr("applicationGroupType eq 'RailApplication'")}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ApplicationGroupList = armdesktopvirtualization.ApplicationGroupList{ // Value: []*armdesktopvirtualization.ApplicationGroup{ // { // Name: to.Ptr("applicationGroup1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ApplicationGroupProperties{ // Description: to.Ptr("des1"), // ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInFeed: to.Ptr(true), // WorkspaceArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // }, // }, // { // Name: to.Ptr("applicationGroup2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ApplicationGroupProperties{ // Description: to.Ptr("des1"), // ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInFeed: to.Ptr(true), // WorkspaceArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // }, // }}, // } }
Output:
func (*ApplicationGroupsClient) Update ¶
func (client *ApplicationGroupsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientUpdateOptions) (ApplicationGroupsClientUpdateResponse, error)
Update - Update an applicationGroup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- options - ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationGroupsClient().Update(ctx, "resourceGroup1", "applicationGroup1", &armdesktopvirtualization.ApplicationGroupsClientUpdateOptions{ApplicationGroup: &armdesktopvirtualization.ApplicationGroupPatch{ Properties: &armdesktopvirtualization.ApplicationGroupPatchProperties{ Description: to.Ptr("des1"), FriendlyName: to.Ptr("friendly"), ShowInFeed: to.Ptr(true), }, Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ApplicationGroup = armdesktopvirtualization.ApplicationGroup{ // Name: to.Ptr("applicationGroup1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ApplicationGroupProperties{ // Description: to.Ptr("des1"), // ApplicationGroupType: to.Ptr(armdesktopvirtualization.ApplicationGroupTypeRemoteApp), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInFeed: to.Ptr(true), // WorkspaceArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // }, // }
Output:
type ApplicationGroupsClientCreateOrUpdateOptions ¶
type ApplicationGroupsClientCreateOrUpdateOptions struct { }
ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate method.
type ApplicationGroupsClientCreateOrUpdateResponse ¶
type ApplicationGroupsClientCreateOrUpdateResponse struct { // Represents a ApplicationGroup definition. ApplicationGroup }
ApplicationGroupsClientCreateOrUpdateResponse contains the response from method ApplicationGroupsClient.CreateOrUpdate.
type ApplicationGroupsClientDeleteOptions ¶
type ApplicationGroupsClientDeleteOptions struct { }
ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete method.
type ApplicationGroupsClientDeleteResponse ¶
type ApplicationGroupsClientDeleteResponse struct { }
ApplicationGroupsClientDeleteResponse contains the response from method ApplicationGroupsClient.Delete.
type ApplicationGroupsClientGetOptions ¶
type ApplicationGroupsClientGetOptions struct { }
ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method.
type ApplicationGroupsClientGetResponse ¶
type ApplicationGroupsClientGetResponse struct { // Represents a ApplicationGroup definition. ApplicationGroup }
ApplicationGroupsClientGetResponse contains the response from method ApplicationGroupsClient.Get.
type ApplicationGroupsClientListByResourceGroupOptions ¶
type ApplicationGroupsClientListByResourceGroupOptions struct { // OData filter expression. Valid properties for filtering are applicationGroupType. Filter *string // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.NewListByResourceGroupPager method.
type ApplicationGroupsClientListByResourceGroupResponse ¶
type ApplicationGroupsClientListByResourceGroupResponse struct { // List of ApplicationGroup definitions. ApplicationGroupList }
ApplicationGroupsClientListByResourceGroupResponse contains the response from method ApplicationGroupsClient.NewListByResourceGroupPager.
type ApplicationGroupsClientListBySubscriptionOptions ¶
type ApplicationGroupsClientListBySubscriptionOptions struct { // OData filter expression. Valid properties for filtering are applicationGroupType. Filter *string }
ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.NewListBySubscriptionPager method.
type ApplicationGroupsClientListBySubscriptionResponse ¶
type ApplicationGroupsClientListBySubscriptionResponse struct { // List of ApplicationGroup definitions. ApplicationGroupList }
ApplicationGroupsClientListBySubscriptionResponse contains the response from method ApplicationGroupsClient.NewListBySubscriptionPager.
type ApplicationGroupsClientUpdateOptions ¶
type ApplicationGroupsClientUpdateOptions struct { // Object containing ApplicationGroup definitions. ApplicationGroup *ApplicationGroupPatch }
ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update method.
type ApplicationGroupsClientUpdateResponse ¶
type ApplicationGroupsClientUpdateResponse struct { // Represents a ApplicationGroup definition. ApplicationGroup }
ApplicationGroupsClientUpdateResponse contains the response from method ApplicationGroupsClient.Update.
type ApplicationList ¶
type ApplicationList struct { // List of Application definitions. Value []*Application // READ-ONLY; Link to the next page of results. NextLink *string }
ApplicationList - List of Application definitions.
func (ApplicationList) MarshalJSON ¶
func (a ApplicationList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationList.
func (*ApplicationList) UnmarshalJSON ¶
func (a *ApplicationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationList.
type ApplicationPatch ¶
type ApplicationPatch struct { // Detailed properties for Application Properties *ApplicationPatchProperties // tags to be updated Tags map[string]*string }
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.
func (*ApplicationPatch) UnmarshalJSON ¶
func (a *ApplicationPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationPatch.
type ApplicationPatchProperties ¶
type ApplicationPatchProperties struct { // Resource Type of Application. ApplicationType *RemoteApplicationType // Command Line Arguments for Application. CommandLineArguments *string // 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 // Description of Application. Description *string // Specifies a path for the executable file for the application. FilePath *string // Friendly name of Application. FriendlyName *string // Index of the icon. IconIndex *int32 // Path to icon. IconPath *string // Specifies the package application Id for MSIX applications MsixPackageApplicationID *string // Specifies the package family name for MSIX applications MsixPackageFamilyName *string // Specifies whether to show the RemoteApp program in the RD Web Access server. ShowInPortal *bool }
ApplicationPatchProperties - Application properties that can be patched.
func (ApplicationPatchProperties) MarshalJSON ¶
func (a ApplicationPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationPatchProperties.
func (*ApplicationPatchProperties) UnmarshalJSON ¶
func (a *ApplicationPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationPatchProperties.
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 // Resource Type of Application. ApplicationType *RemoteApplicationType // Command Line Arguments for Application. CommandLineArguments *string // Description of Application. Description *string // Specifies a path for the executable file for the application. FilePath *string // Friendly name of Application. FriendlyName *string // Index of the icon. IconIndex *int32 // Path to icon. IconPath *string // Specifies the package application Id for MSIX applications MsixPackageApplicationID *string // Specifies the package family name for MSIX applications MsixPackageFamilyName *string // Specifies whether to show the RemoteApp program in the RD Web Access server. ShowInPortal *bool // READ-ONLY; the icon a 64 bit string as a byte array. IconContent []byte // READ-ONLY; Hash of the icon. IconHash *string // READ-ONLY; ObjectId of Application. (internal use) ObjectID *string }
ApplicationProperties - Schema for Application properties.
func (ApplicationProperties) MarshalJSON ¶
func (a ApplicationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationProperties.
func (*ApplicationProperties) UnmarshalJSON ¶
func (a *ApplicationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties.
type ApplicationType ¶
type ApplicationType string
ApplicationType - Application type of application.
const ( ApplicationTypeDesktop ApplicationType = "Desktop" ApplicationTypeRemoteApp ApplicationType = "RemoteApp" )
func PossibleApplicationTypeValues ¶
func PossibleApplicationTypeValues() []ApplicationType
PossibleApplicationTypeValues returns the possible values for the ApplicationType const type.
type ApplicationsClient ¶
type ApplicationsClient struct {
// contains filtered or unexported fields
}
ApplicationsClient contains the methods for the Applications group. Don't use this type directly, use NewApplicationsClient() instead.
func NewApplicationsClient ¶
func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error)
NewApplicationsClient creates a new instance of ApplicationsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ApplicationsClient) CreateOrUpdate ¶
func (client *ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, application Application, options *ApplicationsClientCreateOrUpdateOptions) (ApplicationsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update an application. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- applicationName - The name of the application within the specified application group
- application - Object containing Application definitions.
- options - ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationsClient().CreateOrUpdate(ctx, "resourceGroup1", "applicationGroup1", "application1", armdesktopvirtualization.Application{ Properties: &armdesktopvirtualization.ApplicationProperties{ Description: to.Ptr("des1"), CommandLineArguments: to.Ptr("arguments"), CommandLineSetting: to.Ptr(armdesktopvirtualization.CommandLineSettingAllow), FilePath: to.Ptr("path"), FriendlyName: to.Ptr("friendly"), IconIndex: to.Ptr[int32](1), IconPath: to.Ptr("icon"), ShowInPortal: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Application = armdesktopvirtualization.Application{ // Name: to.Ptr("applicationGroup1/application1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/applications"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/applications/application1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ApplicationProperties{ // Description: to.Ptr("des1"), // ApplicationType: to.Ptr(armdesktopvirtualization.RemoteApplicationTypeInBuilt), // CommandLineArguments: to.Ptr("arguments"), // CommandLineSetting: to.Ptr(armdesktopvirtualization.CommandLineSettingAllow), // FilePath: to.Ptr("path"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // IconIndex: to.Ptr[int32](1), // IconPath: to.Ptr("icon"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInPortal: to.Ptr(true), // }, // }
Output:
func (*ApplicationsClient) Delete ¶
func (client *ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientDeleteOptions) (ApplicationsClientDeleteResponse, error)
Delete - Remove an application. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- applicationName - The name of the application within the specified application group
- options - ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewApplicationsClient().Delete(ctx, "resourceGroup1", "applicationGroup1", "application1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ApplicationsClient) Get ¶
func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientGetOptions) (ApplicationsClientGetResponse, error)
Get - Get an application. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- applicationName - The name of the application within the specified application group
- options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationsClient().Get(ctx, "resourceGroup1", "applicationGroup1", "application1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Application = armdesktopvirtualization.Application{ // Name: to.Ptr("applicationGroup1/application1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/applications"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/applications/application1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ApplicationProperties{ // Description: to.Ptr("des1"), // ApplicationType: to.Ptr(armdesktopvirtualization.RemoteApplicationTypeInBuilt), // CommandLineArguments: to.Ptr("arguments"), // CommandLineSetting: to.Ptr(armdesktopvirtualization.CommandLineSettingAllow), // FilePath: to.Ptr("path"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // IconIndex: to.Ptr[int32](1), // IconPath: to.Ptr("icon"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInPortal: to.Ptr(true), // }, // }
Output:
func (*ApplicationsClient) NewListPager ¶
func (client *ApplicationsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *ApplicationsClientListOptions) *runtime.Pager[ApplicationsClientListResponse]
NewListPager - List applications.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- options - ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewApplicationsClient().NewListPager("resourceGroup1", "applicationGroup1", &armdesktopvirtualization.ApplicationsClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ApplicationList = armdesktopvirtualization.ApplicationList{ // Value: []*armdesktopvirtualization.Application{ // { // Name: to.Ptr("applicationGroup1/application1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/applications"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/applications/application1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ApplicationProperties{ // Description: to.Ptr("des1"), // ApplicationType: to.Ptr(armdesktopvirtualization.RemoteApplicationTypeInBuilt), // CommandLineArguments: to.Ptr("arguments"), // CommandLineSetting: to.Ptr(armdesktopvirtualization.CommandLineSettingAllow), // FilePath: to.Ptr("path"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // IconIndex: to.Ptr[int32](1), // IconPath: to.Ptr("icon"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInPortal: to.Ptr(true), // }, // }, // { // Name: to.Ptr("applicationGroup1/application2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/applications"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/applications/application2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ApplicationProperties{ // Description: to.Ptr("des2"), // ApplicationType: to.Ptr(armdesktopvirtualization.RemoteApplicationTypeInBuilt), // CommandLineArguments: to.Ptr("arguments"), // CommandLineSetting: to.Ptr(armdesktopvirtualization.CommandLineSettingAllow), // FilePath: to.Ptr("path"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // IconIndex: to.Ptr[int32](1), // IconPath: to.Ptr("icon"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInPortal: to.Ptr(true), // }, // }}, // } }
Output:
func (*ApplicationsClient) Update ¶
func (client *ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientUpdateOptions) (ApplicationsClientUpdateResponse, error)
Update - Update an application. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- applicationName - The name of the application within the specified application group
- options - ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewApplicationsClient().Update(ctx, "resourceGroup1", "applicationGroup1", "application1", &armdesktopvirtualization.ApplicationsClientUpdateOptions{Application: &armdesktopvirtualization.ApplicationPatch{ Properties: &armdesktopvirtualization.ApplicationPatchProperties{ Description: to.Ptr("des1"), ApplicationType: to.Ptr(armdesktopvirtualization.RemoteApplicationTypeInBuilt), CommandLineArguments: to.Ptr("arguments"), CommandLineSetting: to.Ptr(armdesktopvirtualization.CommandLineSettingAllow), FilePath: to.Ptr("path"), FriendlyName: to.Ptr("friendly"), IconIndex: to.Ptr[int32](1), IconPath: to.Ptr("icon"), ShowInPortal: to.Ptr(true), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Application = armdesktopvirtualization.Application{ // Name: to.Ptr("applicationGroup1/application1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/applications"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/applications/application1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ApplicationProperties{ // Description: to.Ptr("des1"), // ApplicationType: to.Ptr(armdesktopvirtualization.RemoteApplicationTypeInBuilt), // CommandLineArguments: to.Ptr("arguments"), // CommandLineSetting: to.Ptr(armdesktopvirtualization.CommandLineSettingAllow), // FilePath: to.Ptr("path"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // IconIndex: to.Ptr[int32](1), // IconPath: to.Ptr("icon"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // ShowInPortal: to.Ptr(true), // }, // }
Output:
type ApplicationsClientCreateOrUpdateOptions ¶
type ApplicationsClientCreateOrUpdateOptions struct { }
ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate method.
type ApplicationsClientCreateOrUpdateResponse ¶
type ApplicationsClientCreateOrUpdateResponse struct { // Schema for Application properties. Application }
ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.CreateOrUpdate.
type ApplicationsClientDeleteOptions ¶
type ApplicationsClientDeleteOptions struct { }
ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method.
type ApplicationsClientDeleteResponse ¶
type ApplicationsClientDeleteResponse struct { }
ApplicationsClientDeleteResponse contains the response from method ApplicationsClient.Delete.
type ApplicationsClientGetOptions ¶
type ApplicationsClientGetOptions struct { }
ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method.
type ApplicationsClientGetResponse ¶
type ApplicationsClientGetResponse struct { // Schema for Application properties. Application }
ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get.
type ApplicationsClientListOptions ¶
type ApplicationsClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.NewListPager method.
type ApplicationsClientListResponse ¶
type ApplicationsClientListResponse struct { // List of Application definitions. ApplicationList }
ApplicationsClientListResponse contains the response from method ApplicationsClient.NewListPager.
type ApplicationsClientUpdateOptions ¶
type ApplicationsClientUpdateOptions struct { // Object containing Application definitions. Application *ApplicationPatch }
ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method.
type ApplicationsClientUpdateResponse ¶
type ApplicationsClientUpdateResponse struct { // Schema for Application properties. Application }
ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.Update.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAppAttachPackageClient ¶ added in v2.3.0
func (c *ClientFactory) NewAppAttachPackageClient() *AppAttachPackageClient
NewAppAttachPackageClient creates a new instance of AppAttachPackageClient.
func (*ClientFactory) NewAppAttachPackageInfoClient ¶ added in v2.3.0
func (c *ClientFactory) NewAppAttachPackageInfoClient() *AppAttachPackageInfoClient
NewAppAttachPackageInfoClient creates a new instance of AppAttachPackageInfoClient.
func (*ClientFactory) NewApplicationGroupsClient ¶
func (c *ClientFactory) NewApplicationGroupsClient() *ApplicationGroupsClient
NewApplicationGroupsClient creates a new instance of ApplicationGroupsClient.
func (*ClientFactory) NewApplicationsClient ¶
func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient
NewApplicationsClient creates a new instance of ApplicationsClient.
func (*ClientFactory) NewDesktopsClient ¶
func (c *ClientFactory) NewDesktopsClient() *DesktopsClient
NewDesktopsClient creates a new instance of DesktopsClient.
func (*ClientFactory) NewHostPoolsClient ¶
func (c *ClientFactory) NewHostPoolsClient() *HostPoolsClient
NewHostPoolsClient creates a new instance of HostPoolsClient.
func (*ClientFactory) NewMSIXPackagesClient ¶
func (c *ClientFactory) NewMSIXPackagesClient() *MSIXPackagesClient
NewMSIXPackagesClient creates a new instance of MSIXPackagesClient.
func (*ClientFactory) NewMsixImagesClient ¶
func (c *ClientFactory) NewMsixImagesClient() *MsixImagesClient
NewMsixImagesClient creates a new instance of MsixImagesClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶ added in v2.1.0
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶ added in v2.1.0
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewScalingPlanPersonalSchedulesClient ¶ added in v2.1.0
func (c *ClientFactory) NewScalingPlanPersonalSchedulesClient() *ScalingPlanPersonalSchedulesClient
NewScalingPlanPersonalSchedulesClient creates a new instance of ScalingPlanPersonalSchedulesClient.
func (*ClientFactory) NewScalingPlanPooledSchedulesClient ¶
func (c *ClientFactory) NewScalingPlanPooledSchedulesClient() *ScalingPlanPooledSchedulesClient
NewScalingPlanPooledSchedulesClient creates a new instance of ScalingPlanPooledSchedulesClient.
func (*ClientFactory) NewScalingPlansClient ¶
func (c *ClientFactory) NewScalingPlansClient() *ScalingPlansClient
NewScalingPlansClient creates a new instance of ScalingPlansClient.
func (*ClientFactory) NewSessionHostsClient ¶
func (c *ClientFactory) NewSessionHostsClient() *SessionHostsClient
NewSessionHostsClient creates a new instance of SessionHostsClient.
func (*ClientFactory) NewStartMenuItemsClient ¶
func (c *ClientFactory) NewStartMenuItemsClient() *StartMenuItemsClient
NewStartMenuItemsClient creates a new instance of StartMenuItemsClient.
func (*ClientFactory) NewUserSessionsClient ¶
func (c *ClientFactory) NewUserSessionsClient() *UserSessionsClient
NewUserSessionsClient creates a new instance of UserSessionsClient.
func (*ClientFactory) NewWorkspacesClient ¶
func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient
NewWorkspacesClient creates a new instance of WorkspacesClient.
type CommandLineSetting ¶
type CommandLineSetting string
CommandLineSetting - Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all.
const ( CommandLineSettingAllow CommandLineSetting = "Allow" CommandLineSettingDoNotAllow CommandLineSetting = "DoNotAllow" CommandLineSettingRequire CommandLineSetting = "Require" )
func PossibleCommandLineSettingValues ¶
func PossibleCommandLineSettingValues() []CommandLineSetting
PossibleCommandLineSettingValues returns the possible values for the CommandLineSetting const type.
type 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.
type DayOfWeek ¶
type DayOfWeek string
DayOfWeek - Day of the week.
func PossibleDayOfWeekValues ¶
func PossibleDayOfWeekValues() []DayOfWeek
PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type.
type Desktop ¶
type Desktop struct { // Detailed properties for Desktop Properties *DesktopProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Desktop - Schema for Desktop properties.
func (Desktop) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Desktop.
func (*Desktop) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Desktop.
type DesktopList ¶
type DesktopList struct { // List of Desktop definitions. Value []*Desktop // READ-ONLY; Link to the next page of results. NextLink *string }
DesktopList - List of Desktop definitions.
func (DesktopList) MarshalJSON ¶
func (d DesktopList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DesktopList.
func (*DesktopList) UnmarshalJSON ¶
func (d *DesktopList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DesktopList.
type DesktopPatch ¶
type DesktopPatch struct { // Detailed properties for Desktop Properties *DesktopPatchProperties // tags to be updated Tags map[string]*string }
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.
func (*DesktopPatch) UnmarshalJSON ¶
func (d *DesktopPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DesktopPatch.
type DesktopPatchProperties ¶
type DesktopPatchProperties struct { // Description of Desktop. Description *string // Friendly name of Desktop. FriendlyName *string }
DesktopPatchProperties - Desktop properties that can be patched.
func (DesktopPatchProperties) MarshalJSON ¶
func (d DesktopPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DesktopPatchProperties.
func (*DesktopPatchProperties) UnmarshalJSON ¶
func (d *DesktopPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DesktopPatchProperties.
type DesktopProperties ¶
type DesktopProperties struct { // Description of Desktop. Description *string // Friendly name of Desktop. FriendlyName *string // READ-ONLY; The icon a 64 bit string as a byte array. IconContent []byte // READ-ONLY; Hash of the icon. IconHash *string // READ-ONLY; ObjectId of Desktop. (internal use) ObjectID *string }
DesktopProperties - Schema for Desktop properties.
func (DesktopProperties) MarshalJSON ¶
func (d DesktopProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DesktopProperties.
func (*DesktopProperties) UnmarshalJSON ¶
func (d *DesktopProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DesktopProperties.
type DesktopsClient ¶
type DesktopsClient struct {
// contains filtered or unexported fields
}
DesktopsClient contains the methods for the Desktops group. Don't use this type directly, use NewDesktopsClient() instead.
func NewDesktopsClient ¶
func NewDesktopsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DesktopsClient, error)
NewDesktopsClient creates a new instance of DesktopsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DesktopsClient) Get ¶
func (client *DesktopsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientGetOptions) (DesktopsClientGetResponse, error)
Get - Get a desktop. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- desktopName - The name of the desktop within the specified desktop group
- options - DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDesktopsClient().Get(ctx, "resourceGroup1", "applicationGroup1", "SessionDesktop", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Desktop = armdesktopvirtualization.Desktop{ // Name: to.Ptr("applicationGroup1/SessionDesktop"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/desktops"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/applications/SessionDesktop"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.DesktopProperties{ // Description: to.Ptr("des1"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }
Output:
func (*DesktopsClient) NewListPager ¶
func (client *DesktopsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *DesktopsClientListOptions) *runtime.Pager[DesktopsClientListResponse]
NewListPager - List desktops.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- options - DesktopsClientListOptions contains the optional parameters for the DesktopsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDesktopsClient().NewListPager("resourceGroup1", "applicationGroup1", &armdesktopvirtualization.DesktopsClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DesktopList = armdesktopvirtualization.DesktopList{ // Value: []*armdesktopvirtualization.Desktop{ // { // Name: to.Ptr("applicationGroup1/SessionDesktop"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/desktops"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/applications/SessionDesktop"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.DesktopProperties{ // Description: to.Ptr("des1"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }}, // } }
Output:
func (*DesktopsClient) Update ¶
func (client *DesktopsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientUpdateOptions) (DesktopsClientUpdateResponse, error)
Update - Update a desktop. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- desktopName - The name of the desktop within the specified desktop group
- options - DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDesktopsClient().Update(ctx, "resourceGroup1", "applicationGroup1", "SessionDesktop", &armdesktopvirtualization.DesktopsClientUpdateOptions{Desktop: &armdesktopvirtualization.DesktopPatch{ Properties: &armdesktopvirtualization.DesktopPatchProperties{ Description: to.Ptr("des1"), FriendlyName: to.Ptr("friendly"), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Desktop = armdesktopvirtualization.Desktop{ // Name: to.Ptr("applicationGroup1/SessionDesktop"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/desktops"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/desktops/SessionDesktop"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.DesktopProperties{ // Description: to.Ptr("des1"), // FriendlyName: to.Ptr("friendly"), // IconContent: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // IconHash: to.Ptr("bEQ1n2HysrGxCDvgt4bfOtkET8ydzh5SXGM0KGTBPVc"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }
Output:
type DesktopsClientGetOptions ¶
type DesktopsClientGetOptions struct { }
DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method.
type DesktopsClientGetResponse ¶
type DesktopsClientGetResponse struct { // Schema for Desktop properties. Desktop }
DesktopsClientGetResponse contains the response from method DesktopsClient.Get.
type DesktopsClientListOptions ¶
type DesktopsClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
DesktopsClientListOptions contains the optional parameters for the DesktopsClient.NewListPager method.
type DesktopsClientListResponse ¶
type DesktopsClientListResponse struct { // List of Desktop definitions. DesktopList }
DesktopsClientListResponse contains the response from method DesktopsClient.NewListPager.
type DesktopsClientUpdateOptions ¶
type DesktopsClientUpdateOptions struct { // Object containing Desktop definitions. Desktop *DesktopPatch }
DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method.
type DesktopsClientUpdateResponse ¶
type DesktopsClientUpdateResponse struct { // Schema for Desktop properties. Desktop }
DesktopsClientUpdateResponse contains the response from method DesktopsClient.Update.
type ExpandMsixImage ¶
type ExpandMsixImage struct { // Detailed properties for ExpandMsixImage Properties *ExpandMsixImageProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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.
func (*ExpandMsixImage) UnmarshalJSON ¶
func (e *ExpandMsixImage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExpandMsixImage.
type ExpandMsixImageList ¶
type ExpandMsixImageList struct { // List of MSIX package properties from give MSIX Image. Value []*ExpandMsixImage // READ-ONLY; Link to the next page of results. NextLink *string }
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.
func (*ExpandMsixImageList) UnmarshalJSON ¶
func (e *ExpandMsixImageList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExpandMsixImageList.
type ExpandMsixImageProperties ¶
type ExpandMsixImageProperties struct { // Date certificate expires, found in the appxmanifest.xml. CertificateExpiry *time.Time // Certificate name found in the appxmanifest.xml. CertificateName *string // User friendly Name to be displayed in the portal. DisplayName *string // VHD/CIM image path on Network Share. ImagePath *string // Make this version of the package the active one across the hostpool. IsActive *bool // Specifies how to register Package in feed. IsRegularRegistration *bool // Date Package was last updated, found in the appxmanifest.xml. LastUpdated *time.Time // Alias of MSIX Package. PackageAlias *string // List of package applications. PackageApplications []*MsixPackageApplications // List of package dependencies. PackageDependencies []*MsixPackageDependencies // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. PackageFamilyName *string // Package Full Name from appxmanifest.xml. PackageFullName *string // Package Name from appxmanifest.xml. PackageName *string // Relative Path to the package inside the image. PackageRelativePath *string // Package version found in the appxmanifest.xml. Version *string }
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 FailHealthCheckOnStagingFailure ¶ added in v2.3.0
type FailHealthCheckOnStagingFailure string
FailHealthCheckOnStagingFailure - Parameter indicating how the health check should behave if this package fails staging
const ( FailHealthCheckOnStagingFailureDoNotFail FailHealthCheckOnStagingFailure = "DoNotFail" FailHealthCheckOnStagingFailureNeedsAssistance FailHealthCheckOnStagingFailure = "NeedsAssistance" FailHealthCheckOnStagingFailureUnhealthy FailHealthCheckOnStagingFailure = "Unhealthy" )
func PossibleFailHealthCheckOnStagingFailureValues ¶ added in v2.3.0
func PossibleFailHealthCheckOnStagingFailureValues() []FailHealthCheckOnStagingFailure
PossibleFailHealthCheckOnStagingFailureValues returns the possible values for the FailHealthCheckOnStagingFailure const type.
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. (Currently // Enabled) 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. (Currently Enabled) 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. (Currently Disabled) 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. (Currently Enabled) 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. (Currently Disabled) HealthCheckNameFSLogixHealthCheck HealthCheckName = "FSLogixHealthCheck" // HealthCheckNameMetaDataServiceCheck - Verifies the metadata service is accessible and return compute properties. (Currently // Enabled) 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. (Currently Enabled) 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. (Currently Disabled) 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. (Currently Enabled) 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 ...). (Currently Disabled) 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. (Currently Disabled) HealthCheckNameWebRTCRedirectorCheck HealthCheckName = "WebRTCRedirectorCheck" )
func PossibleHealthCheckNameValues ¶
func PossibleHealthCheckNameValues() []HealthCheckName
PossibleHealthCheckNameValues returns the possible values for the HealthCheckName const type.
type HealthCheckResult ¶
type HealthCheckResult string
HealthCheckResult - Represents the Health state of the health check we performed.
const ( // HealthCheckResultHealthCheckFailed - Health check failed. HealthCheckResultHealthCheckFailed HealthCheckResult = "HealthCheckFailed" // HealthCheckResultHealthCheckSucceeded - Health check passed. HealthCheckResultHealthCheckSucceeded HealthCheckResult = "HealthCheckSucceeded" // HealthCheckResultSessionHostShutdown - We received a Shutdown notification. HealthCheckResultSessionHostShutdown HealthCheckResult = "SessionHostShutdown" // HealthCheckResultUnknown - Health check result is not currently known. HealthCheckResultUnknown HealthCheckResult = "Unknown" )
func PossibleHealthCheckResultValues ¶
func PossibleHealthCheckResultValues() []HealthCheckResult
PossibleHealthCheckResultValues returns the possible values for the HealthCheckResult const type.
type HostPool ¶
type HostPool struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Detailed properties for HostPool Properties *HostPoolProperties Identity *ResourceModelWithAllowedPropertySetIdentity // 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 // 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 Plan *ResourceModelWithAllowedPropertySetPlan SKU *ResourceModelWithAllowedPropertySetSKU // Resource tags. Tags map[string]*string // 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 // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
HostPool - Represents a HostPool definition.
func (HostPool) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type HostPool.
func (*HostPool) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type HostPool.
type HostPoolList ¶
type HostPoolList struct { // List of HostPool definitions. Value []*HostPool // READ-ONLY; Link to the next page of results. NextLink *string }
HostPoolList - List of HostPool definitions.
func (HostPoolList) MarshalJSON ¶
func (h HostPoolList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HostPoolList.
func (*HostPoolList) UnmarshalJSON ¶
func (h *HostPoolList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolList.
type HostPoolPatch ¶
type HostPoolPatch struct { // HostPool properties that can be patched. Properties *HostPoolPatchProperties // tags to be updated Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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.
func (*HostPoolPatch) UnmarshalJSON ¶
func (h *HostPoolPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolPatch.
type HostPoolPatchProperties ¶
type HostPoolPatchProperties struct { // The session host configuration for updating agent, monitoring agent, and stack component. AgentUpdate *AgentUpdatePatchProperties // Custom rdp property of HostPool. CustomRdpProperty *string // Description of HostPool. Description *string // Friendly name of HostPool. FriendlyName *string // The type of the load balancer. LoadBalancerType *LoadBalancerType // The max session limit of HostPool. MaxSessionLimit *int32 // PersonalDesktopAssignment type for HostPool. PersonalDesktopAssignmentType *PersonalDesktopAssignmentType // The type of preferred application group type, default to Desktop Application Group PreferredAppGroupType *PreferredAppGroupType // Enabled to allow this resource to be access from the public network PublicNetworkAccess *HostpoolPublicNetworkAccess // The registration info of HostPool. RegistrationInfo *RegistrationInfoPatch // The ring number of HostPool. Ring *int32 // ClientId for the registered Relying Party used to issue WVD SSO certificates. SsoClientID *string // Path to Azure KeyVault storing the secret used for communication to ADFS. SsoClientSecretKeyVaultPath *string // The type of single sign on Secret Type. SsoSecretType *SSOSecretType // URL to customer ADFS server for signing WVD SSO certificates. SsoadfsAuthority *string // The flag to turn on/off StartVMOnConnect feature. StartVMOnConnect *bool // VM template for sessionhosts configuration within hostpool. VMTemplate *string // Is validation environment. ValidationEnvironment *bool }
HostPoolPatchProperties - Properties of HostPool.
func (HostPoolPatchProperties) MarshalJSON ¶
func (h HostPoolPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HostPoolPatchProperties.
func (*HostPoolPatchProperties) UnmarshalJSON ¶
func (h *HostPoolPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolPatchProperties.
type HostPoolProperties ¶
type HostPoolProperties struct { // REQUIRED; HostPool type for desktop. HostPoolType *HostPoolType // REQUIRED; The type of the load balancer. LoadBalancerType *LoadBalancerType // REQUIRED; The type of preferred application group type, default to Desktop Application Group PreferredAppGroupType *PreferredAppGroupType // The session host configuration for updating agent, monitoring agent, and stack component. AgentUpdate *AgentUpdateProperties // Custom rdp property of HostPool. CustomRdpProperty *string // Description of HostPool. Description *string // Friendly name of HostPool. FriendlyName *string // The max session limit of HostPool. MaxSessionLimit *int32 // PersonalDesktopAssignment type for HostPool. PersonalDesktopAssignmentType *PersonalDesktopAssignmentType // 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 *HostpoolPublicNetworkAccess // The registration info of HostPool. RegistrationInfo *RegistrationInfo // The ring number of HostPool. Ring *int32 // ClientId for the registered Relying Party used to issue WVD SSO certificates. SsoClientID *string // Path to Azure KeyVault storing the secret used for communication to ADFS. SsoClientSecretKeyVaultPath *string // The type of single sign on Secret Type. SsoSecretType *SSOSecretType // URL to customer ADFS server for signing WVD SSO certificates. SsoadfsAuthority *string // The flag to turn on/off StartVMOnConnect feature. StartVMOnConnect *bool // VM template for sessionhosts configuration within hostpool. VMTemplate *string // Is validation environment. ValidationEnvironment *bool // READ-ONLY; List of App Attach Package links. AppAttachPackageReferences []*string // READ-ONLY; List of applicationGroup links. ApplicationGroupReferences []*string // READ-ONLY; Is cloud pc resource. CloudPcResource *bool // READ-ONLY; ObjectId of HostPool. (internal use) ObjectID *string // READ-ONLY; List of private endpoint connection associated with the specified resource PrivateEndpointConnections []*PrivateEndpointConnection }
HostPoolProperties - Properties of HostPool.
func (HostPoolProperties) MarshalJSON ¶
func (h HostPoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HostPoolProperties.
func (*HostPoolProperties) UnmarshalJSON ¶
func (h *HostPoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolProperties.
type HostPoolType ¶
type HostPoolType string
HostPoolType - HostPool type for desktop.
const ( // HostPoolTypeBYODesktop - Users assign their own machines, load balancing logic remains the same as Personal. PersonalDesktopAssignmentType // must be Direct. HostPoolTypeBYODesktop HostPoolType = "BYODesktop" // HostPoolTypePersonal - Users will be assigned a SessionHost either by administrators (PersonalDesktopAssignmentType = Direct) // or upon connecting to the pool (PersonalDesktopAssignmentType = Automatic). They will always be redirected to their assigned // SessionHost. HostPoolTypePersonal HostPoolType = "Personal" // HostPoolTypePooled - Users get a new (random) SessionHost every time it connects to the HostPool. HostPoolTypePooled HostPoolType = "Pooled" )
func PossibleHostPoolTypeValues ¶
func PossibleHostPoolTypeValues() []HostPoolType
PossibleHostPoolTypeValues returns the possible values for the HostPoolType const type.
type HostPoolsClient ¶
type HostPoolsClient struct {
// contains filtered or unexported fields
}
HostPoolsClient contains the methods for the HostPools group. Don't use this type directly, use NewHostPoolsClient() instead.
func NewHostPoolsClient ¶
func NewHostPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HostPoolsClient, error)
NewHostPoolsClient creates a new instance of HostPoolsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*HostPoolsClient) CreateOrUpdate ¶
func (client *HostPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, hostPool HostPool, options *HostPoolsClientCreateOrUpdateOptions) (HostPoolsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a host pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- hostPool - Object containing HostPool definitions.
- options - HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewHostPoolsClient().CreateOrUpdate(ctx, "resourceGroup1", "hostPool1", armdesktopvirtualization.HostPool{ Location: to.Ptr("centralus"), Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, Properties: &armdesktopvirtualization.HostPoolProperties{ Description: to.Ptr("des1"), AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ { DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), Hour: to.Ptr[int32](7), }, { DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), Hour: to.Ptr[int32](8), }}, UseSessionHostLocalTime: to.Ptr(false), }, FriendlyName: to.Ptr("friendly"), HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), MaxSessionLimit: to.Ptr[int32](999999), PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T14:01:54.957Z"); return t }()), RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), }, SsoClientID: to.Ptr("client"), SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), SsoadfsAuthority: to.Ptr("https://adfs"), StartVMOnConnect: to.Ptr(false), VMTemplate: to.Ptr("{json:json}"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.HostPool = armdesktopvirtualization.HostPool{ // Name: to.Ptr("hostPool1"), // Type: to.Ptr("/Microsoft.DesktopVirtualization/hostPools"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.HostPoolProperties{ // Description: to.Ptr("des1"), // AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ // Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), // MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), // MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), // Hour: to.Ptr[int32](7), // }, // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // Hour: to.Ptr[int32](8), // }}, // UseSessionHostLocalTime: to.Ptr(false), // }, // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), // LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), // MaxSessionLimit: to.Ptr[int32](999999), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), // PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), // RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }, // SsoClientID: to.Ptr("client"), // SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), // SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), // SsoadfsAuthority: to.Ptr("https://adfs"), // StartVMOnConnect: to.Ptr(false), // VMTemplate: to.Ptr("{json:json}"), // }, // }
Output:
func (*HostPoolsClient) Delete ¶
func (client *HostPoolsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientDeleteOptions) (HostPoolsClientDeleteResponse, error)
Delete - Remove a host pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewHostPoolsClient().Delete(ctx, "resourceGroup1", "hostPool1", &armdesktopvirtualization.HostPoolsClientDeleteOptions{Force: to.Ptr(true)}) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*HostPoolsClient) Get ¶
func (client *HostPoolsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientGetOptions) (HostPoolsClientGetResponse, error)
Get - Get a host pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewHostPoolsClient().Get(ctx, "resourceGroup1", "hostPool1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.HostPool = armdesktopvirtualization.HostPool{ // Name: to.Ptr("hostPool1"), // Type: to.Ptr("/Microsoft.DesktopVirtualization/hostPools"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.HostPoolProperties{ // Description: to.Ptr("des1"), // AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ // Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), // MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), // MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), // Hour: to.Ptr[int32](7), // }, // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // Hour: to.Ptr[int32](8), // }}, // UseSessionHostLocalTime: to.Ptr(false), // }, // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), // LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), // MaxSessionLimit: to.Ptr[int32](999999), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), // PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), // RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }, // SsoClientID: to.Ptr("client"), // SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), // SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), // SsoadfsAuthority: to.Ptr("https://adfs"), // StartVMOnConnect: to.Ptr(false), // VMTemplate: to.Ptr("{json:json}"), // }, // }
Output:
func (*HostPoolsClient) ListRegistrationTokens ¶ added in v2.3.0
func (client *HostPoolsClient) ListRegistrationTokens(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientListRegistrationTokensOptions) (HostPoolsClientListRegistrationTokensResponse, error)
ListRegistrationTokens - Operation to list the RegistrationTokens associated with the HostPool If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - HostPoolsClientListRegistrationTokensOptions contains the optional parameters for the HostPoolsClient.ListRegistrationTokens method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPools_ListRegistrationToken_Post.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewHostPoolsClient().ListRegistrationTokens(ctx, "resourceGroup1", "hostPool1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RegistrationTokenList = armdesktopvirtualization.RegistrationTokenList{ // Value: []*armdesktopvirtualization.RegistrationTokenMinimal{ // { // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // Token: to.Ptr("token"), // }}, // }
Output:
func (*HostPoolsClient) NewListByResourceGroupPager ¶
func (client *HostPoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostPoolsClientListByResourceGroupOptions) *runtime.Pager[HostPoolsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List hostPools.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewHostPoolsClient().NewListByResourceGroupPager("resourceGroup1", &armdesktopvirtualization.HostPoolsClientListByResourceGroupOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.HostPoolList = armdesktopvirtualization.HostPoolList{ // Value: []*armdesktopvirtualization.HostPool{ // { // Name: to.Ptr("hostPool1"), // Type: to.Ptr("/Microsoft.DesktopVirtualization/hostPools"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.HostPoolProperties{ // Description: to.Ptr("des1"), // AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ // Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), // MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), // MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), // Hour: to.Ptr[int32](7), // }, // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // Hour: to.Ptr[int32](8), // }}, // UseSessionHostLocalTime: to.Ptr(false), // }, // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), // LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), // MaxSessionLimit: to.Ptr[int32](999999), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), // PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), // RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }, // SsoClientID: to.Ptr("client"), // SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), // SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), // SsoadfsAuthority: to.Ptr("https://adfs"), // StartVMOnConnect: to.Ptr(false), // VMTemplate: to.Ptr("{json:json}"), // }, // }, // { // Name: to.Ptr("hostPool2"), // Type: to.Ptr("/Microsoft.DesktopVirtualization/hostPools"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.HostPoolProperties{ // Description: to.Ptr("des1"), // AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ // Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), // MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), // MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), // Hour: to.Ptr[int32](7), // }, // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // Hour: to.Ptr[int32](8), // }}, // UseSessionHostLocalTime: to.Ptr(false), // }, // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), // LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), // MaxSessionLimit: to.Ptr[int32](999999), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), // PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), // RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }, // SsoClientID: to.Ptr("client"), // SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), // SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), // SsoadfsAuthority: to.Ptr("https://adfs"), // StartVMOnConnect: to.Ptr(false), // VMTemplate: to.Ptr("{json:json}"), // }, // }}, // } }
Output:
func (*HostPoolsClient) NewListPager ¶
func (client *HostPoolsClient) NewListPager(options *HostPoolsClientListOptions) *runtime.Pager[HostPoolsClientListResponse]
NewListPager - List hostPools in subscription.
Generated from API version 2024-04-03
- options - HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewHostPoolsClient().NewListPager(&armdesktopvirtualization.HostPoolsClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.HostPoolList = armdesktopvirtualization.HostPoolList{ // Value: []*armdesktopvirtualization.HostPool{ // { // Name: to.Ptr("hostPool1"), // Type: to.Ptr("/Microsoft.DesktopVirtualization/hostPools"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.HostPoolProperties{ // Description: to.Ptr("des1"), // AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ // Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), // MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), // MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), // Hour: to.Ptr[int32](7), // }, // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // Hour: to.Ptr[int32](8), // }}, // UseSessionHostLocalTime: to.Ptr(false), // }, // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), // LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), // MaxSessionLimit: to.Ptr[int32](999999), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), // PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), // RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }, // SsoClientID: to.Ptr("client"), // SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), // SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), // SsoadfsAuthority: to.Ptr("https://adfs"), // StartVMOnConnect: to.Ptr(false), // VMTemplate: to.Ptr("{json:json}"), // }, // }, // { // Name: to.Ptr("hostPool2"), // Type: to.Ptr("/Microsoft.DesktopVirtualization/hostPools"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.HostPoolProperties{ // Description: to.Ptr("des1"), // AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ // Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), // MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), // MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), // Hour: to.Ptr[int32](7), // }, // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // Hour: to.Ptr[int32](8), // }}, // UseSessionHostLocalTime: to.Ptr(false), // }, // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), // LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), // MaxSessionLimit: to.Ptr[int32](999999), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), // PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), // RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }, // SsoClientID: to.Ptr("client"), // SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), // SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), // SsoadfsAuthority: to.Ptr("https://adfs"), // StartVMOnConnect: to.Ptr(false), // VMTemplate: to.Ptr("{json:json}"), // }, // }}, // } }
Output:
func (*HostPoolsClient) RetrieveRegistrationToken ¶
func (client *HostPoolsClient) RetrieveRegistrationToken(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientRetrieveRegistrationTokenOptions) (HostPoolsClientRetrieveRegistrationTokenResponse, error)
RetrieveRegistrationToken - Registration token of the host pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPools_RetrieveRegistrationToken_Post.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewHostPoolsClient().RetrieveRegistrationToken(ctx, "resourceGroup1", "hostPool1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RegistrationInfo = armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }
Output:
func (*HostPoolsClient) Update ¶
func (client *HostPoolsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientUpdateOptions) (HostPoolsClientUpdateResponse, error)
Update - Update a host pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewHostPoolsClient().Update(ctx, "resourceGroup1", "hostPool1", &armdesktopvirtualization.HostPoolsClientUpdateOptions{HostPool: &armdesktopvirtualization.HostPoolPatch{ Properties: &armdesktopvirtualization.HostPoolPatchProperties{ Description: to.Ptr("des1"), AgentUpdate: &armdesktopvirtualization.AgentUpdatePatchProperties{ Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowPatchProperties{ { DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), Hour: to.Ptr[int32](7), }, { DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), Hour: to.Ptr[int32](8), }}, UseSessionHostLocalTime: to.Ptr(false), }, FriendlyName: to.Ptr("friendly"), LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), MaxSessionLimit: to.Ptr[int32](999999), PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), RegistrationInfo: &armdesktopvirtualization.RegistrationInfoPatch{ ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T15:01:54.957Z"); return t }()), RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), }, SsoClientID: to.Ptr("client"), SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), SsoadfsAuthority: to.Ptr("https://adfs"), StartVMOnConnect: to.Ptr(false), VMTemplate: to.Ptr("{json:json}"), }, Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.HostPool = armdesktopvirtualization.HostPool{ // Name: to.Ptr("hostPool1"), // Type: to.Ptr("/Microsoft.DesktopVirtualization/hostPools"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.HostPoolProperties{ // Description: to.Ptr("des1"), // AgentUpdate: &armdesktopvirtualization.AgentUpdateProperties{ // Type: to.Ptr(armdesktopvirtualization.SessionHostComponentUpdateTypeScheduled), // MaintenanceWindowTimeZone: to.Ptr("Alaskan Standard Time"), // MaintenanceWindows: []*armdesktopvirtualization.MaintenanceWindowProperties{ // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekFriday), // Hour: to.Ptr[int32](7), // }, // { // DayOfWeek: to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // Hour: to.Ptr[int32](8), // }}, // UseSessionHostLocalTime: to.Ptr(false), // }, // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // HostPoolType: to.Ptr(armdesktopvirtualization.HostPoolTypePooled), // LoadBalancerType: to.Ptr(armdesktopvirtualization.LoadBalancerTypeBreadthFirst), // MaxSessionLimit: to.Ptr[int32](999999), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // PersonalDesktopAssignmentType: to.Ptr(armdesktopvirtualization.PersonalDesktopAssignmentTypeAutomatic), // PreferredAppGroupType: to.Ptr(armdesktopvirtualization.PreferredAppGroupTypeDesktop), // RegistrationInfo: &armdesktopvirtualization.RegistrationInfo{ // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // RegistrationTokenOperation: to.Ptr(armdesktopvirtualization.RegistrationTokenOperationUpdate), // Token: to.Ptr("token"), // }, // SsoClientID: to.Ptr("client"), // SsoClientSecretKeyVaultPath: to.Ptr("https://keyvault/secret"), // SsoSecretType: to.Ptr(armdesktopvirtualization.SSOSecretTypeSharedKey), // SsoadfsAuthority: to.Ptr("https://adfs"), // StartVMOnConnect: to.Ptr(false), // VMTemplate: to.Ptr("{json:json}"), // }, // }
Output:
type HostPoolsClientCreateOrUpdateOptions ¶
type HostPoolsClientCreateOrUpdateOptions struct { }
HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate method.
type HostPoolsClientCreateOrUpdateResponse ¶
type HostPoolsClientCreateOrUpdateResponse struct { // Represents a HostPool definition. HostPool }
HostPoolsClientCreateOrUpdateResponse contains the response from method HostPoolsClient.CreateOrUpdate.
type HostPoolsClientDeleteOptions ¶
type HostPoolsClientDeleteOptions struct { // Force flag to delete sessionHost. Force *bool }
HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method.
type HostPoolsClientDeleteResponse ¶
type HostPoolsClientDeleteResponse struct { }
HostPoolsClientDeleteResponse contains the response from method HostPoolsClient.Delete.
type HostPoolsClientGetOptions ¶
type HostPoolsClientGetOptions struct { }
HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method.
type HostPoolsClientGetResponse ¶
type HostPoolsClientGetResponse struct { // Represents a HostPool definition. HostPool }
HostPoolsClientGetResponse contains the response from method HostPoolsClient.Get.
type HostPoolsClientListByResourceGroupOptions ¶
type HostPoolsClientListByResourceGroupOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.NewListByResourceGroupPager method.
type HostPoolsClientListByResourceGroupResponse ¶
type HostPoolsClientListByResourceGroupResponse struct { // List of HostPool definitions. HostPoolList }
HostPoolsClientListByResourceGroupResponse contains the response from method HostPoolsClient.NewListByResourceGroupPager.
type HostPoolsClientListOptions ¶
type HostPoolsClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.NewListPager method.
type HostPoolsClientListRegistrationTokensOptions ¶ added in v2.3.0
type HostPoolsClientListRegistrationTokensOptions struct { }
HostPoolsClientListRegistrationTokensOptions contains the optional parameters for the HostPoolsClient.ListRegistrationTokens method.
type HostPoolsClientListRegistrationTokensResponse ¶ added in v2.3.0
type HostPoolsClientListRegistrationTokensResponse struct { // List of RegistrationToken definitions. RegistrationTokenList }
HostPoolsClientListRegistrationTokensResponse contains the response from method HostPoolsClient.ListRegistrationTokens.
type HostPoolsClientListResponse ¶
type HostPoolsClientListResponse struct { // List of HostPool definitions. HostPoolList }
HostPoolsClientListResponse contains the response from method HostPoolsClient.NewListPager.
type HostPoolsClientRetrieveRegistrationTokenOptions ¶
type HostPoolsClientRetrieveRegistrationTokenOptions struct { }
HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken method.
type HostPoolsClientRetrieveRegistrationTokenResponse ¶
type HostPoolsClientRetrieveRegistrationTokenResponse struct { // Represents a RegistrationInfo definition. RegistrationInfo }
HostPoolsClientRetrieveRegistrationTokenResponse contains the response from method HostPoolsClient.RetrieveRegistrationToken.
type HostPoolsClientUpdateOptions ¶
type HostPoolsClientUpdateOptions struct { // Object containing HostPool definitions. HostPool *HostPoolPatch }
HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method.
type HostPoolsClientUpdateResponse ¶
type HostPoolsClientUpdateResponse struct { // Represents a HostPool definition. HostPool }
HostPoolsClientUpdateResponse contains the response from method HostPoolsClient.Update.
type HostpoolPublicNetworkAccess ¶ added in v2.1.0
type HostpoolPublicNetworkAccess string
HostpoolPublicNetworkAccess - 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 ( HostpoolPublicNetworkAccessDisabled HostpoolPublicNetworkAccess = "Disabled" HostpoolPublicNetworkAccessEnabled HostpoolPublicNetworkAccess = "Enabled" HostpoolPublicNetworkAccessEnabledForClientsOnly HostpoolPublicNetworkAccess = "EnabledForClientsOnly" HostpoolPublicNetworkAccessEnabledForSessionHostsOnly HostpoolPublicNetworkAccess = "EnabledForSessionHostsOnly" )
func PossibleHostpoolPublicNetworkAccessValues ¶ added in v2.1.0
func PossibleHostpoolPublicNetworkAccessValues() []HostpoolPublicNetworkAccess
PossibleHostpoolPublicNetworkAccessValues returns the possible values for the HostpoolPublicNetworkAccess const type.
type ImportPackageInfoRequest ¶ added in v2.3.0
type ImportPackageInfoRequest struct { // Possible device architectures that an app attach package can be configured for PackageArchitecture *AppAttachPackageArchitectures // URI to Image Path *string }
ImportPackageInfoRequest - Information to import app attach package
func (ImportPackageInfoRequest) MarshalJSON ¶ added in v2.3.0
func (i ImportPackageInfoRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportPackageInfoRequest.
func (*ImportPackageInfoRequest) UnmarshalJSON ¶ added in v2.3.0
func (i *ImportPackageInfoRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportPackageInfoRequest.
type LoadBalancerType ¶
type LoadBalancerType string
LoadBalancerType - The type of the load balancer.
const ( LoadBalancerTypeBreadthFirst LoadBalancerType = "BreadthFirst" LoadBalancerTypeDepthFirst LoadBalancerType = "DepthFirst" LoadBalancerTypePersistent LoadBalancerType = "Persistent" )
func PossibleLoadBalancerTypeValues ¶
func PossibleLoadBalancerTypeValues() []LoadBalancerType
PossibleLoadBalancerTypeValues returns the possible values for the LoadBalancerType const type.
type LogSpecification ¶
type LogSpecification struct { // Blob duration of the log BlobDuration *string // Localized friendly display name of the log DisplayName *string // Name of the log Name *string }
LogSpecification - Specifications of the Log for Azure Monitoring
func (LogSpecification) MarshalJSON ¶
func (l LogSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogSpecification.
func (*LogSpecification) UnmarshalJSON ¶
func (l *LogSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.
type MSIXImageURI ¶
type MSIXImageURI struct { // URI to Image URI *string }
MSIXImageURI - Represents URI referring to MSIX Image
func (MSIXImageURI) MarshalJSON ¶
func (m MSIXImageURI) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MSIXImageURI.
func (*MSIXImageURI) UnmarshalJSON ¶
func (m *MSIXImageURI) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MSIXImageURI.
type MSIXPackage ¶
type MSIXPackage struct { // REQUIRED; Detailed properties for MSIX Package Properties *MSIXPackageProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
MSIXPackage - Schema for MSIX Package properties.
func (MSIXPackage) MarshalJSON ¶
func (m MSIXPackage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MSIXPackage.
func (*MSIXPackage) UnmarshalJSON ¶
func (m *MSIXPackage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackage.
type MSIXPackageList ¶
type MSIXPackageList struct { // List of MSIX Package definitions. Value []*MSIXPackage // READ-ONLY; Link to the next page of results. NextLink *string }
MSIXPackageList - List of MSIX Package definitions.
func (MSIXPackageList) MarshalJSON ¶
func (m MSIXPackageList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MSIXPackageList.
func (*MSIXPackageList) UnmarshalJSON ¶
func (m *MSIXPackageList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackageList.
type MSIXPackagePatch ¶
type MSIXPackagePatch struct { // Detailed properties for MSIX Package Properties *MSIXPackagePatchProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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.
func (*MSIXPackagePatch) UnmarshalJSON ¶
func (m *MSIXPackagePatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackagePatch.
type MSIXPackagePatchProperties ¶
type MSIXPackagePatchProperties struct { // Display name for MSIX Package. DisplayName *string // Set a version of the package to be active across hostpool. IsActive *bool // Set Registration mode. Regular or Delayed. IsRegularRegistration *bool }
MSIXPackagePatchProperties - MSIX Package properties that can be patched.
func (MSIXPackagePatchProperties) MarshalJSON ¶
func (m MSIXPackagePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MSIXPackagePatchProperties.
func (*MSIXPackagePatchProperties) UnmarshalJSON ¶
func (m *MSIXPackagePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackagePatchProperties.
type MSIXPackageProperties ¶
type MSIXPackageProperties struct { // User friendly Name to be displayed in the portal. DisplayName *string // VHD/CIM image path on Network Share. ImagePath *string // Make this version of the package the active one across the hostpool. IsActive *bool // Specifies how to register Package in feed. IsRegularRegistration *bool // Date Package was last updated, found in the appxmanifest.xml. LastUpdated *time.Time // List of package applications. PackageApplications []*MsixPackageApplications // List of package dependencies. PackageDependencies []*MsixPackageDependencies // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. PackageFamilyName *string // Package Name from appxmanifest.xml. PackageName *string // Relative Path to the package inside the image. PackageRelativePath *string // Package version found in the appxmanifest.xml. Version *string }
MSIXPackageProperties - Schema for MSIX Package properties.
func (MSIXPackageProperties) MarshalJSON ¶
func (m MSIXPackageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MSIXPackageProperties.
func (*MSIXPackageProperties) UnmarshalJSON ¶
func (m *MSIXPackageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackageProperties.
type MSIXPackagesClient ¶
type MSIXPackagesClient struct {
// contains filtered or unexported fields
}
MSIXPackagesClient contains the methods for the MSIXPackages group. Don't use this type directly, use NewMSIXPackagesClient() instead.
func NewMSIXPackagesClient ¶
func NewMSIXPackagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MSIXPackagesClient, error)
NewMSIXPackagesClient creates a new instance of MSIXPackagesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MSIXPackagesClient) CreateOrUpdate ¶
func (client *MSIXPackagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, msixPackage MSIXPackage, options *MSIXPackagesClientCreateOrUpdateOptions) (MSIXPackagesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a MSIX package. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool
- msixPackage - Object containing MSIX Package definitions.
- options - MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMSIXPackagesClient().CreateOrUpdate(ctx, "resourceGroup1", "hostpool1", "msixpackagefullname", armdesktopvirtualization.MSIXPackage{ Properties: &armdesktopvirtualization.MSIXPackageProperties{ DisplayName: to.Ptr("displayname"), ImagePath: to.Ptr("imagepath"), IsActive: to.Ptr(false), IsRegularRegistration: to.Ptr(false), LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t }()), PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ { Description: to.Ptr("application-desc"), AppID: to.Ptr("ApplicationId"), AppUserModelID: to.Ptr("AppUserModelId"), FriendlyName: to.Ptr("friendlyname"), IconImageName: to.Ptr("Apptile"), RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), }}, PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ { DependencyName: to.Ptr("MsixTest_Dependency_Name"), MinVersion: to.Ptr("version"), Publisher: to.Ptr("PublishedName"), }}, PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), PackageName: to.Ptr("MsixPackage_name"), PackageRelativePath: to.Ptr("packagerelativepath"), Version: to.Ptr("version"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MSIXPackage = armdesktopvirtualization.MSIXPackage{ // Name: to.Ptr("hostpool1/MsixPackageFullName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/msixpackages"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourcegroups/resourcegroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostpool1/msixpackages/msixPackageFullName"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.MSIXPackageProperties{ // DisplayName: to.Ptr("dis"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("desc"), // AppID: to.Ptr("Application_Id"), // AppUserModelID: to.Ptr("Application_ModelID"), // FriendlyName: to.Ptr("fri"), // IconImageName: to.Ptr("Apptile"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageName: to.Ptr("MsixPackage_Name"), // PackageRelativePath: to.Ptr("MsixPackage_RelativePackageRoot"), // Version: to.Ptr("version"), // }, // }
Output:
func (*MSIXPackagesClient) Delete ¶
func (client *MSIXPackagesClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientDeleteOptions) (MSIXPackagesClientDeleteResponse, error)
Delete - Remove an MSIX Package. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool
- options - MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewMSIXPackagesClient().Delete(ctx, "resourceGroup1", "hostpool1", "packagefullname", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*MSIXPackagesClient) Get ¶
func (client *MSIXPackagesClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientGetOptions) (MSIXPackagesClientGetResponse, error)
Get - Get a msixpackage. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool
- options - MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMSIXPackagesClient().Get(ctx, "resourceGroup1", "hostpool1", "packagefullname", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MSIXPackage = armdesktopvirtualization.MSIXPackage{ // Name: to.Ptr("hostpool1/MsixPackageFullName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/msixpackages"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourcegroups/resourcegroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostpool1/msixpackages/msixPackageFullName"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.MSIXPackageProperties{ // DisplayName: to.Ptr("dis"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("desc"), // AppID: to.Ptr("Application_Id"), // AppUserModelID: to.Ptr("Application_ModelID"), // FriendlyName: to.Ptr("fri"), // IconImageName: to.Ptr("Apptile"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageName: to.Ptr("MsixPackage_Name"), // PackageRelativePath: to.Ptr("MsixPackage_RelativePackageRoot"), // Version: to.Ptr("version"), // }, // }
Output:
func (*MSIXPackagesClient) NewListPager ¶
func (client *MSIXPackagesClient) NewListPager(resourceGroupName string, hostPoolName string, options *MSIXPackagesClientListOptions) *runtime.Pager[MSIXPackagesClientListResponse]
NewListPager - List MSIX packages in hostpool.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMSIXPackagesClient().NewListPager("resourceGroup1", "hostpool1", &armdesktopvirtualization.MSIXPackagesClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MSIXPackageList = armdesktopvirtualization.MSIXPackageList{ // Value: []*armdesktopvirtualization.MSIXPackage{ // { // Name: to.Ptr("hostpool1/MsixPackageFullName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/msixpackages"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourcegroups/resourcegroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostpool1/msixpackages/msixPackageFullName"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.MSIXPackageProperties{ // DisplayName: to.Ptr("dis"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("desc"), // AppID: to.Ptr("Application_Id"), // AppUserModelID: to.Ptr("Application_ModelID"), // FriendlyName: to.Ptr("fri"), // IconImageName: to.Ptr("Apptile"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageName: to.Ptr("MsixPackage_Name"), // PackageRelativePath: to.Ptr("MsixPackage_RelativePackageRoot"), // Version: to.Ptr("version"), // }, // }, // { // Name: to.Ptr("hostpool1/MsixPackageFullName2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/msixpackages"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourcegroups/resourcegroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostpool1/msixpackages/msixPackageFullName2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.MSIXPackageProperties{ // DisplayName: to.Ptr("dis2"), // ImagePath: to.Ptr("imagepath2"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("desc2"), // AppID: to.Ptr("Application_Id2"), // AppUserModelID: to.Ptr("Application_ModelID2"), // FriendlyName: to.Ptr("fri2"), // IconImageName: to.Ptr("Apptile2"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name2"), // MinVersion: to.Ptr("packageDep_version2"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher2"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName2"), // PackageName: to.Ptr("MsixPackage_Name2"), // PackageRelativePath: to.Ptr("MsixPackage_RelativePackageRoot2"), // Version: to.Ptr("version2"), // }, // }}, // } }
Output:
func (*MSIXPackagesClient) Update ¶
func (client *MSIXPackagesClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientUpdateOptions) (MSIXPackagesClientUpdateResponse, error)
Update - Update an MSIX Package. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool
- options - MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMSIXPackagesClient().Update(ctx, "resourceGroup1", "hostpool1", "msixpackagefullname", &armdesktopvirtualization.MSIXPackagesClientUpdateOptions{MsixPackage: &armdesktopvirtualization.MSIXPackagePatch{ Properties: &armdesktopvirtualization.MSIXPackagePatchProperties{ DisplayName: to.Ptr("displayname"), IsActive: to.Ptr(true), IsRegularRegistration: to.Ptr(false), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MSIXPackage = armdesktopvirtualization.MSIXPackage{ // Name: to.Ptr("hostpool1/MsixPackageFullName"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/msixpackages"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourcegroups/resourcegroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostpool1/msixpackages/msixPackageFullName"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.MSIXPackageProperties{ // DisplayName: to.Ptr("dis"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(true), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("desc"), // AppID: to.Ptr("Application_Id"), // AppUserModelID: to.Ptr("Application_ModelID"), // FriendlyName: to.Ptr("fri"), // IconImageName: to.Ptr("Apptile"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackage_Dependency_Name"), // MinVersion: to.Ptr("packageDep_version"), // Publisher: to.Ptr("MsixPackage_Dependency_Publisher"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageName: to.Ptr("MsixPackage_Name"), // PackageRelativePath: to.Ptr("MsixPackage_RelativePackageRoot"), // Version: to.Ptr("version"), // }, // }
Output:
type MSIXPackagesClientCreateOrUpdateOptions ¶
type MSIXPackagesClientCreateOrUpdateOptions struct { }
MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate method.
type MSIXPackagesClientCreateOrUpdateResponse ¶
type MSIXPackagesClientCreateOrUpdateResponse struct { // Schema for MSIX Package properties. MSIXPackage }
MSIXPackagesClientCreateOrUpdateResponse contains the response from method MSIXPackagesClient.CreateOrUpdate.
type MSIXPackagesClientDeleteOptions ¶
type MSIXPackagesClientDeleteOptions struct { }
MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method.
type MSIXPackagesClientDeleteResponse ¶
type MSIXPackagesClientDeleteResponse struct { }
MSIXPackagesClientDeleteResponse contains the response from method MSIXPackagesClient.Delete.
type MSIXPackagesClientGetOptions ¶
type MSIXPackagesClientGetOptions struct { }
MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method.
type MSIXPackagesClientGetResponse ¶
type MSIXPackagesClientGetResponse struct { // Schema for MSIX Package properties. MSIXPackage }
MSIXPackagesClientGetResponse contains the response from method MSIXPackagesClient.Get.
type MSIXPackagesClientListOptions ¶
type MSIXPackagesClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.NewListPager method.
type MSIXPackagesClientListResponse ¶
type MSIXPackagesClientListResponse struct { // List of MSIX Package definitions. MSIXPackageList }
MSIXPackagesClientListResponse contains the response from method MSIXPackagesClient.NewListPager.
type MSIXPackagesClientUpdateOptions ¶
type MSIXPackagesClientUpdateOptions struct { // Object containing MSIX Package definitions. MsixPackage *MSIXPackagePatch }
MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method.
type MSIXPackagesClientUpdateResponse ¶
type MSIXPackagesClientUpdateResponse struct { // Schema for MSIX Package properties. MSIXPackage }
MSIXPackagesClientUpdateResponse contains the response from method MSIXPackagesClient.Update.
type MaintenanceWindowPatchProperties ¶
type MaintenanceWindowPatchProperties struct { // Day of the week. DayOfWeek *DayOfWeek // The update start hour of the day. (0 - 23) Hour *int32 }
MaintenanceWindowPatchProperties - Maintenance window starting hour and day of week.
func (MaintenanceWindowPatchProperties) MarshalJSON ¶
func (m MaintenanceWindowPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowPatchProperties.
func (*MaintenanceWindowPatchProperties) UnmarshalJSON ¶
func (m *MaintenanceWindowPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowPatchProperties.
type MaintenanceWindowProperties ¶
type MaintenanceWindowProperties struct { // Day of the week. DayOfWeek *DayOfWeek // The update start hour of the day. (0 - 23) Hour *int32 }
MaintenanceWindowProperties - Maintenance window starting hour and day of week.
func (MaintenanceWindowProperties) MarshalJSON ¶
func (m MaintenanceWindowProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowProperties.
func (*MaintenanceWindowProperties) UnmarshalJSON ¶
func (m *MaintenanceWindowProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowProperties.
type MsixImagesClient ¶
type MsixImagesClient struct {
// contains filtered or unexported fields
}
MsixImagesClient contains the methods for the MsixImages group. Don't use this type directly, use NewMsixImagesClient() instead.
func NewMsixImagesClient ¶
func NewMsixImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MsixImagesClient, error)
NewMsixImagesClient creates a new instance of MsixImagesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MsixImagesClient) NewExpandPager ¶
func (client *MsixImagesClient) NewExpandPager(resourceGroupName string, hostPoolName string, msixImageURI MSIXImageURI, options *MsixImagesClientExpandOptions) *runtime.Pager[MsixImagesClientExpandResponse]
NewExpandPager - Expands and Lists MSIX packages in an Image, given the Image Path.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- msixImageURI - Object containing URI to MSIX Image
- options - MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.NewExpandPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixImage_Expand_Post.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMsixImagesClient().NewExpandPager("resourceGroup1", "hostpool1", armdesktopvirtualization.MSIXImageURI{ URI: to.Ptr("imagepath"), }, nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ExpandMsixImageList = armdesktopvirtualization.ExpandMsixImageList{ // Value: []*armdesktopvirtualization.ExpandMsixImage{ // { // Name: to.Ptr("hostpool1/expandmsiximage"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/expandmsiximage"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourcegroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostpool1/expandMsixImage/msixImage"), // Properties: &armdesktopvirtualization.ExpandMsixImageProperties{ // DisplayName: to.Ptr("displayname"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription"), // AppID: to.Ptr("AppId"), // AppUserModelID: to.Ptr("AppUserModelId"), // FriendlyName: to.Ptr("FriendlyName"), // IconImageName: to.Ptr("Iconimagename"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // }, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName"), // PackageFullName: to.Ptr("MsixPackage_FullName"), // PackageName: to.Ptr("MsixPackageName"), // PackageRelativePath: to.Ptr("packagerelativepath"), // Version: to.Ptr("packageversion"), // }, // }, // { // Name: to.Ptr("hostpool1/expandmsiximage"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/expandmsiximage"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourcegroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostpool1/expandmsiximage/msixImageURI"), // Properties: &armdesktopvirtualization.ExpandMsixImageProperties{ // DisplayName: to.Ptr("displayname2"), // ImagePath: to.Ptr("imagepath"), // IsActive: to.Ptr(false), // IsRegularRegistration: to.Ptr(false), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // PackageAlias: to.Ptr("msixpackagealias2"), // PackageApplications: []*armdesktopvirtualization.MsixPackageApplications{ // { // Description: to.Ptr("PackageApplicationDescription1"), // AppID: to.Ptr("AppId1"), // AppUserModelID: to.Ptr("AppUserModelId1"), // FriendlyName: to.Ptr("FriendlyName1"), // IconImageName: to.Ptr("Iconimagename1"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }, // { // Description: to.Ptr("PackageApplicationDescription2"), // AppID: to.Ptr("AppId2"), // AppUserModelID: to.Ptr("AppUserModelId2"), // FriendlyName: to.Ptr("FriendlyName2"), // IconImageName: to.Ptr("Iconimagename2"), // RawIcon: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // RawPNG: []byte("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), // }}, // PackageDependencies: []*armdesktopvirtualization.MsixPackageDependencies{ // { // DependencyName: to.Ptr("MsixPackageDependency1"), // MinVersion: to.Ptr("ver1"), // Publisher: to.Ptr("PublisherName1"), // }, // { // DependencyName: to.Ptr("MsixPackageDependency2"), // MinVersion: to.Ptr("ver2"), // Publisher: to.Ptr("PublisherName2"), // }}, // PackageFamilyName: to.Ptr("MsixPackage_FamilyName2"), // PackageFullName: to.Ptr("MsixPackage_FullName2"), // PackageName: to.Ptr("MsixPackageName2"), // PackageRelativePath: to.Ptr("packagerelativepath2"), // Version: to.Ptr("packageversion"), // }, // }}, // } }
Output:
type MsixImagesClientExpandOptions ¶
type MsixImagesClientExpandOptions struct { }
MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.NewExpandPager method.
type MsixImagesClientExpandResponse ¶
type MsixImagesClientExpandResponse struct { // List of MSIX package properties retrieved from MSIX Image expansion. ExpandMsixImageList }
MsixImagesClientExpandResponse contains the response from method MsixImagesClient.NewExpandPager.
type MsixPackageApplications ¶
type MsixPackageApplications struct { // Package Application Id, found in appxmanifest.xml. AppID *string // Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml. AppUserModelID *string // Description of Package Application. Description *string // User friendly name. FriendlyName *string // User friendly name. IconImageName *string // the icon a 64 bit string as a byte array. RawIcon []byte // the icon a 64 bit string as a byte array. RawPNG []byte }
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 // Dependency version required. MinVersion *string // Name of dependency publisher. Publisher *string }
MsixPackageDependencies - Schema for MSIX Package Dependencies properties.
func (MsixPackageDependencies) MarshalJSON ¶
func (m MsixPackageDependencies) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MsixPackageDependencies.
func (*MsixPackageDependencies) UnmarshalJSON ¶
func (m *MsixPackageDependencies) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MsixPackageDependencies.
type OperationProperties ¶
type OperationProperties struct { // Service specification payload ServiceSpecification *ServiceSpecification }
OperationProperties - Properties of the operation
func (OperationProperties) MarshalJSON ¶
func (o OperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationProperties.
func (*OperationProperties) UnmarshalJSON ¶
func (o *OperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List all of the available operations the Desktop Virtualization resource provider supports.
Generated from API version 2024-04-03
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/OperationDescription_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ResourceProviderOperationList = armdesktopvirtualization.ResourceProviderOperationList{ // Value: []*armdesktopvirtualization.ResourceProviderOperation{ // { // Name: to.Ptr("Microsoft.DesktopVirtualization/hostpools/read"), // Display: &armdesktopvirtualization.ResourceProviderOperationDisplay{ // Description: to.Ptr("Read hostpool"), // Operation: to.Ptr("Read hostpool"), // Provider: to.Ptr("Microsoft.DesktopVirtualization"), // Resource: to.Ptr("hostpools"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.DesktopVirtualization/hostpools/write"), // Display: &armdesktopvirtualization.ResourceProviderOperationDisplay{ // Description: to.Ptr("Write hostpool"), // Operation: to.Ptr("Write hostpool"), // Provider: to.Ptr("Microsoft.DesktopVirtualization"), // Resource: to.Ptr("hostpools"), // }, // IsDataAction: to.Ptr(false), // Properties: &armdesktopvirtualization.OperationProperties{ // ServiceSpecification: &armdesktopvirtualization.ServiceSpecification{ // LogSpecifications: []*armdesktopvirtualization.LogSpecification{ // { // Name: to.Ptr(""), // DisplayName: to.Ptr(""), // }, // { // Name: to.Ptr(""), // DisplayName: to.Ptr(""), // }, // { // Name: to.Ptr(""), // DisplayName: to.Ptr(""), // }}, // }, // }, // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // Result of the request to list operations. ResourceProviderOperationList }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PackageTimestamped ¶ added in v2.3.0
type PackageTimestamped string
PackageTimestamped - Is package timestamped so it can ignore the certificate expiry date
const ( PackageTimestampedNotTimestamped PackageTimestamped = "NotTimestamped" PackageTimestampedTimestamped PackageTimestamped = "Timestamped" )
func PossiblePackageTimestampedValues ¶ added in v2.3.0
func PossiblePackageTimestampedValues() []PackageTimestamped
PossiblePackageTimestampedValues returns the possible values for the PackageTimestamped const type.
type PersonalDesktopAssignmentType ¶
type PersonalDesktopAssignmentType string
PersonalDesktopAssignmentType - PersonalDesktopAssignment type for HostPool.
const ( PersonalDesktopAssignmentTypeAutomatic PersonalDesktopAssignmentType = "Automatic" PersonalDesktopAssignmentTypeDirect PersonalDesktopAssignmentType = "Direct" )
func PossiblePersonalDesktopAssignmentTypeValues ¶
func PossiblePersonalDesktopAssignmentTypeValues() []PersonalDesktopAssignmentType
PossiblePersonalDesktopAssignmentTypeValues returns the possible values for the PersonalDesktopAssignmentType const type.
type PreferredAppGroupType ¶
type PreferredAppGroupType string
PreferredAppGroupType - The type of preferred application group type, default to Desktop Application Group
const ( PreferredAppGroupTypeDesktop PreferredAppGroupType = "Desktop" PreferredAppGroupTypeNone PreferredAppGroupType = "None" PreferredAppGroupTypeRailApplications PreferredAppGroupType = "RailApplications" )
func PossiblePreferredAppGroupTypeValues ¶
func PossiblePreferredAppGroupTypeValues() []PreferredAppGroupType
PossiblePreferredAppGroupTypeValues returns the possible values for the PreferredAppGroupType const type.
type PrivateEndpoint ¶ added in v2.1.0
type PrivateEndpoint struct { // READ-ONLY; The ARM identifier for private endpoint. ID *string }
PrivateEndpoint - The private endpoint resource.
func (PrivateEndpoint) MarshalJSON ¶ added in v2.1.0
func (p PrivateEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.
func (*PrivateEndpoint) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.
type PrivateEndpointConnection ¶ added in v2.1.0
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnection - The private endpoint connection resource.
func (PrivateEndpointConnection) MarshalJSON ¶ added in v2.1.0
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionListResultWithSystemData ¶ added in v2.1.0
type PrivateEndpointConnectionListResultWithSystemData struct { // Array of private endpoint connections Value []*PrivateEndpointConnectionWithSystemData // READ-ONLY; Link to the next page of results. NextLink *string }
PrivateEndpointConnectionListResultWithSystemData - List of private endpoint connection associated with the specified storage account
func (PrivateEndpointConnectionListResultWithSystemData) MarshalJSON ¶ added in v2.1.0
func (p PrivateEndpointConnectionListResultWithSystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResultWithSystemData.
func (*PrivateEndpointConnectionListResultWithSystemData) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateEndpointConnectionListResultWithSystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResultWithSystemData.
type PrivateEndpointConnectionProperties ¶ added in v2.1.0
type PrivateEndpointConnectionProperties struct { // REQUIRED; A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // The private endpoint resource. PrivateEndpoint *PrivateEndpoint // READ-ONLY; The group ids for the private endpoint resource. GroupIDs []*string // READ-ONLY; The provisioning state of the private endpoint connection resource. ProvisioningState *PrivateEndpointConnectionProvisioningState }
PrivateEndpointConnectionProperties - Properties of the private endpoint connection.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶ added in v2.1.0
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionProvisioningState ¶ added in v2.1.0
type PrivateEndpointConnectionProvisioningState string
PrivateEndpointConnectionProvisioningState - The current provisioning state.
const ( PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" )
func PossiblePrivateEndpointConnectionProvisioningStateValues ¶ added in v2.1.0
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState
PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.
type PrivateEndpointConnectionWithSystemData ¶ added in v2.1.0
type PrivateEndpointConnectionWithSystemData struct { // Resource properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnectionWithSystemData - The Private Endpoint Connection resource.
func (PrivateEndpointConnectionWithSystemData) MarshalJSON ¶ added in v2.1.0
func (p PrivateEndpointConnectionWithSystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionWithSystemData.
func (*PrivateEndpointConnectionWithSystemData) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateEndpointConnectionWithSystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionWithSystemData.
type PrivateEndpointConnectionsClient ¶ added in v2.1.0
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 ¶ added in v2.1.0
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) DeleteByHostPool ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) DeleteByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteByHostPoolOptions) (PrivateEndpointConnectionsClientDeleteByHostPoolResponse, error)
DeleteByHostPool - Remove a connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
- options - PrivateEndpointConnectionsClientDeleteByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByHostPool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_DeleteByHostPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewPrivateEndpointConnectionsClient().DeleteByHostPool(ctx, "resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*PrivateEndpointConnectionsClient) DeleteByWorkspace ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) DeleteByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteByWorkspaceOptions) (PrivateEndpointConnectionsClientDeleteByWorkspaceResponse, error)
DeleteByWorkspace - Remove a connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
- options - PrivateEndpointConnectionsClientDeleteByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByWorkspace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_DeleteByWorkspace.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewPrivateEndpointConnectionsClient().DeleteByWorkspace(ctx, "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*PrivateEndpointConnectionsClient) GetByHostPool ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) GetByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetByHostPoolOptions) (PrivateEndpointConnectionsClientGetByHostPoolResponse, error)
GetByHostPool - Get a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
- options - PrivateEndpointConnectionsClientGetByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByHostPool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_GetByHostPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().GetByHostPool(ctx, "resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnectionWithSystemData = armdesktopvirtualization.PrivateEndpointConnectionWithSystemData{ // Name: to.Ptr("hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostPool1/privateEndpointConnections/hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdesktopvirtualization.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup2/providers/Microsoft.Network/privateEndpoints/endpointName1"), // }, // PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armdesktopvirtualization.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }
Output:
func (*PrivateEndpointConnectionsClient) GetByWorkspace ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) GetByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetByWorkspaceOptions) (PrivateEndpointConnectionsClientGetByWorkspaceResponse, error)
GetByWorkspace - Get a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
- options - PrivateEndpointConnectionsClientGetByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByWorkspace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_GetByWorkspace.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().GetByWorkspace(ctx, "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnectionWithSystemData = armdesktopvirtualization.PrivateEndpointConnectionWithSystemData{ // Name: to.Ptr("workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1/privateEndpointConnections/workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdesktopvirtualization.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup2/providers/Microsoft.Network/privateEndpoints/endpointName1"), // }, // PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armdesktopvirtualization.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }
Output:
func (*PrivateEndpointConnectionsClient) NewListByHostPoolPager ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *PrivateEndpointConnectionsClientListByHostPoolOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByHostPoolResponse]
NewListByHostPoolPager - List private endpoint connections associated with hostpool.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - PrivateEndpointConnectionsClientListByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByHostPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_ListByHostPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByHostPoolPager("resourceGroup1", "hostPool1", &armdesktopvirtualization.PrivateEndpointConnectionsClientListByHostPoolOptions{PageSize: nil, IsDescending: nil, InitialSkip: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateEndpointConnectionListResultWithSystemData = armdesktopvirtualization.PrivateEndpointConnectionListResultWithSystemData{ // Value: []*armdesktopvirtualization.PrivateEndpointConnectionWithSystemData{ // { // Name: to.Ptr("hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostPool1/privateEndpointConnections/hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdesktopvirtualization.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup2/providers/Microsoft.Network/privateEndpoints/endpointName1"), // }, // PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armdesktopvirtualization.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }}, // } }
Output:
func (*PrivateEndpointConnectionsClient) NewListByWorkspacePager ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *PrivateEndpointConnectionsClientListByWorkspaceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByWorkspaceResponse]
NewListByWorkspacePager - List private endpoint connections.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- options - PrivateEndpointConnectionsClientListByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByWorkspacePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_ListByWorkspace.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByWorkspacePager("resourceGroup1", "workspace1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateEndpointConnectionListResultWithSystemData = armdesktopvirtualization.PrivateEndpointConnectionListResultWithSystemData{ // Value: []*armdesktopvirtualization.PrivateEndpointConnectionWithSystemData{ // { // Name: to.Ptr("workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1/privateEndpointConnections/workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdesktopvirtualization.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup2/providers/Microsoft.Network/privateEndpoints/endpointName1"), // }, // PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armdesktopvirtualization.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }}, // } }
Output:
func (*PrivateEndpointConnectionsClient) UpdateByHostPool ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) UpdateByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateByHostPoolOptions) (PrivateEndpointConnectionsClientUpdateByHostPoolResponse, error)
UpdateByHostPool - Approve or reject a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
- connection - Object containing the updated connection.
- options - PrivateEndpointConnectionsClientUpdateByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByHostPool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_UpdateByHostPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().UpdateByHostPool(ctx, "resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", armdesktopvirtualization.PrivateEndpointConnection{ Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ Description: to.Ptr("Approved by admin@consoto.com"), ActionsRequired: to.Ptr("None"), Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnectionWithSystemData = armdesktopvirtualization.PrivateEndpointConnectionWithSystemData{ // Name: to.Ptr("hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostPool1/privateEndpointConnections/hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdesktopvirtualization.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup2/providers/Microsoft.Network/privateEndpoints/endpointName1"), // }, // PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by admin@consoto.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armdesktopvirtualization.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }
Output:
func (*PrivateEndpointConnectionsClient) UpdateByWorkspace ¶ added in v2.1.0
func (client *PrivateEndpointConnectionsClient) UpdateByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateByWorkspaceOptions) (PrivateEndpointConnectionsClientUpdateByWorkspaceResponse, error)
UpdateByWorkspace - Approve or reject a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource.
- connection - Object containing the updated connection.
- options - PrivateEndpointConnectionsClientUpdateByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByWorkspace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_UpdateByWorkspace.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().UpdateByWorkspace(ctx, "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", armdesktopvirtualization.PrivateEndpointConnection{ Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ Description: to.Ptr("Approved by admin@consoto.com"), ActionsRequired: to.Ptr("None"), Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnectionWithSystemData = armdesktopvirtualization.PrivateEndpointConnectionWithSystemData{ // Name: to.Ptr("workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1/privateEndpointConnections/workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armdesktopvirtualization.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup2/providers/Microsoft.Network/privateEndpoints/endpointName1"), // }, // PrivateLinkServiceConnectionState: &armdesktopvirtualization.PrivateLinkServiceConnectionState{ // Description: to.Ptr("Approved by admin@consoto.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armdesktopvirtualization.PrivateEndpointServiceConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armdesktopvirtualization.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }
Output:
type PrivateEndpointConnectionsClientDeleteByHostPoolOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientDeleteByHostPoolOptions struct { }
PrivateEndpointConnectionsClientDeleteByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByHostPool method.
type PrivateEndpointConnectionsClientDeleteByHostPoolResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientDeleteByHostPoolResponse struct { }
PrivateEndpointConnectionsClientDeleteByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.DeleteByHostPool.
type PrivateEndpointConnectionsClientDeleteByWorkspaceOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientDeleteByWorkspaceOptions struct { }
PrivateEndpointConnectionsClientDeleteByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByWorkspace method.
type PrivateEndpointConnectionsClientDeleteByWorkspaceResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientDeleteByWorkspaceResponse struct { }
PrivateEndpointConnectionsClientDeleteByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.DeleteByWorkspace.
type PrivateEndpointConnectionsClientGetByHostPoolOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientGetByHostPoolOptions struct { }
PrivateEndpointConnectionsClientGetByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByHostPool method.
type PrivateEndpointConnectionsClientGetByHostPoolResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientGetByHostPoolResponse struct { // The Private Endpoint Connection resource. PrivateEndpointConnectionWithSystemData }
PrivateEndpointConnectionsClientGetByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.GetByHostPool.
type PrivateEndpointConnectionsClientGetByWorkspaceOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientGetByWorkspaceOptions struct { }
PrivateEndpointConnectionsClientGetByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByWorkspace method.
type PrivateEndpointConnectionsClientGetByWorkspaceResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientGetByWorkspaceResponse struct { // The Private Endpoint Connection resource. PrivateEndpointConnectionWithSystemData }
PrivateEndpointConnectionsClientGetByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.GetByWorkspace.
type PrivateEndpointConnectionsClientListByHostPoolOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientListByHostPoolOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
PrivateEndpointConnectionsClientListByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByHostPoolPager method.
type PrivateEndpointConnectionsClientListByHostPoolResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientListByHostPoolResponse struct { // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResultWithSystemData }
PrivateEndpointConnectionsClientListByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.NewListByHostPoolPager.
type PrivateEndpointConnectionsClientListByWorkspaceOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientListByWorkspaceOptions struct { }
PrivateEndpointConnectionsClientListByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByWorkspacePager method.
type PrivateEndpointConnectionsClientListByWorkspaceResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientListByWorkspaceResponse struct { // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResultWithSystemData }
PrivateEndpointConnectionsClientListByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByWorkspacePager.
type PrivateEndpointConnectionsClientUpdateByHostPoolOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientUpdateByHostPoolOptions struct { }
PrivateEndpointConnectionsClientUpdateByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByHostPool method.
type PrivateEndpointConnectionsClientUpdateByHostPoolResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientUpdateByHostPoolResponse struct { // The Private Endpoint Connection resource. PrivateEndpointConnectionWithSystemData }
PrivateEndpointConnectionsClientUpdateByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.UpdateByHostPool.
type PrivateEndpointConnectionsClientUpdateByWorkspaceOptions ¶ added in v2.1.0
type PrivateEndpointConnectionsClientUpdateByWorkspaceOptions struct { }
PrivateEndpointConnectionsClientUpdateByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByWorkspace method.
type PrivateEndpointConnectionsClientUpdateByWorkspaceResponse ¶ added in v2.1.0
type PrivateEndpointConnectionsClientUpdateByWorkspaceResponse struct { // The Private Endpoint Connection resource. PrivateEndpointConnectionWithSystemData }
PrivateEndpointConnectionsClientUpdateByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.UpdateByWorkspace.
type PrivateEndpointServiceConnectionStatus ¶ added in v2.1.0
type PrivateEndpointServiceConnectionStatus string
PrivateEndpointServiceConnectionStatus - The private endpoint connection status.
const ( PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" )
func PossiblePrivateEndpointServiceConnectionStatusValues ¶ added in v2.1.0
func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus
PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.
type PrivateLinkResource ¶ added in v2.1.0
type PrivateLinkResource struct { // Resource properties. Properties *PrivateLinkResourceProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateLinkResource - A private link resource
func (PrivateLinkResource) MarshalJSON ¶ added in v2.1.0
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶ added in v2.1.0
type PrivateLinkResourceListResult struct { // Array of private link resources Value []*PrivateLinkResource // READ-ONLY; Link to the next page of results. NextLink *string }
PrivateLinkResourceListResult - A list of private link resources
func (PrivateLinkResourceListResult) MarshalJSON ¶ added in v2.1.0
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶ added in v2.1.0
type PrivateLinkResourceProperties struct { // The private link resource Private link DNS zone name. RequiredZoneNames []*string // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string }
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶ added in v2.1.0
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkResourcesClient ¶ added in v2.1.0
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 ¶ added in v2.1.0
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateLinkResourcesClient) NewListByHostPoolPager ¶ added in v2.1.0
func (client *PrivateLinkResourcesClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *PrivateLinkResourcesClientListByHostPoolOptions) *runtime.Pager[PrivateLinkResourcesClientListByHostPoolResponse]
NewListByHostPoolPager - List the private link resources available for this hostpool.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - PrivateLinkResourcesClientListByHostPoolOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByHostPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateLinkResources_ListByHostPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateLinkResourcesClient().NewListByHostPoolPager("resourceGroup1", "hostPool1", &armdesktopvirtualization.PrivateLinkResourcesClientListByHostPoolOptions{PageSize: nil, IsDescending: nil, InitialSkip: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateLinkResourceListResult = armdesktopvirtualization.PrivateLinkResourceListResult{ // Value: []*armdesktopvirtualization.PrivateLinkResource{ // { // Name: to.Ptr("hostpool"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostpools/privateLinkResources"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostpools/hostPool1/privateLinkResources/hostpool"), // Properties: &armdesktopvirtualization.PrivateLinkResourceProperties{ // GroupID: to.Ptr("hostpool"), // RequiredMembers: []*string{ // to.Ptr("rdbroker"), // to.Ptr("rddiagnostics"), // to.Ptr("rdweb"), // to.Ptr("rdgateway")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.wvd.microsoft.com")}, // }, // }}, // } }
Output:
func (*PrivateLinkResourcesClient) NewListByWorkspacePager ¶ added in v2.1.0
func (client *PrivateLinkResourcesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *PrivateLinkResourcesClientListByWorkspaceOptions) *runtime.Pager[PrivateLinkResourcesClientListByWorkspaceResponse]
NewListByWorkspacePager - List the private link resources available for this workspace.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- options - PrivateLinkResourcesClientListByWorkspaceOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByWorkspacePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateLinkResources_ListByWorkspace.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateLinkResourcesClient().NewListByWorkspacePager("resourceGroup1", "workspace1", &armdesktopvirtualization.PrivateLinkResourcesClientListByWorkspaceOptions{PageSize: nil, IsDescending: nil, InitialSkip: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateLinkResourceListResult = armdesktopvirtualization.PrivateLinkResourceListResult{ // Value: []*armdesktopvirtualization.PrivateLinkResource{ // { // Name: to.Ptr("workspace"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces/privateLinkResources"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1/privateLinkResources/workspace"), // Properties: &armdesktopvirtualization.PrivateLinkResourceProperties{ // GroupID: to.Ptr("workspace"), // RequiredMembers: []*string{ // to.Ptr("rdbroker"), // to.Ptr("rddiagnostics"), // to.Ptr("rdweb"), // to.Ptr("rdgateway")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.wvd.microsoft.com")}, // }, // }}, // } }
Output:
type PrivateLinkResourcesClientListByHostPoolOptions ¶ added in v2.1.0
type PrivateLinkResourcesClientListByHostPoolOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
PrivateLinkResourcesClientListByHostPoolOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByHostPoolPager method.
type PrivateLinkResourcesClientListByHostPoolResponse ¶ added in v2.1.0
type PrivateLinkResourcesClientListByHostPoolResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByHostPoolResponse contains the response from method PrivateLinkResourcesClient.NewListByHostPoolPager.
type PrivateLinkResourcesClientListByWorkspaceOptions ¶ added in v2.1.0
type PrivateLinkResourcesClientListByWorkspaceOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
PrivateLinkResourcesClientListByWorkspaceOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByWorkspacePager method.
type PrivateLinkResourcesClientListByWorkspaceResponse ¶ added in v2.1.0
type PrivateLinkResourcesClientListByWorkspaceResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByWorkspaceResponse contains the response from method PrivateLinkResourcesClient.NewListByWorkspacePager.
type PrivateLinkServiceConnectionState ¶ added in v2.1.0
type PrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. ActionsRequired *string // The reason for approval/rejection of the connection. Description *string // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Status *PrivateEndpointServiceConnectionStatus }
PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
func (PrivateLinkServiceConnectionState) MarshalJSON ¶ added in v2.1.0
func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.
func (*PrivateLinkServiceConnectionState) UnmarshalJSON ¶ added in v2.1.0
func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.
type ProvisioningState ¶ added in v2.3.0
type ProvisioningState string
ProvisioningState - The current provisioning state.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateProvisioning ProvisioningState = "Provisioning" ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶ added in v2.3.0
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type PublicNetworkAccess ¶ added in v2.1.0
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 ¶ added in v2.1.0
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess
PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
type RegistrationInfo ¶
type RegistrationInfo struct { // Expiration time of registration token. ExpirationTime *time.Time // The type of resetting the token. RegistrationTokenOperation *RegistrationTokenOperation // The registration token base64 encoded string. Token *string }
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 // The type of resetting the token. RegistrationTokenOperation *RegistrationTokenOperation }
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 RegistrationTokenList ¶ added in v2.3.0
type RegistrationTokenList struct { // List of RegistrationToken definitions. Value []*RegistrationTokenMinimal // READ-ONLY; Link to the next page of results. NextLink *string }
RegistrationTokenList - List of RegistrationToken definitions.
func (RegistrationTokenList) MarshalJSON ¶ added in v2.3.0
func (r RegistrationTokenList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistrationTokenList.
func (*RegistrationTokenList) UnmarshalJSON ¶ added in v2.3.0
func (r *RegistrationTokenList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationTokenList.
type RegistrationTokenMinimal ¶ added in v2.3.0
type RegistrationTokenMinimal struct { // Expiration time of registration token. ExpirationTime *time.Time // The registration token base64 encoded string. Token *string }
RegistrationTokenMinimal - Represents a Minimal set of properties for RegistrationToken definition.
func (RegistrationTokenMinimal) MarshalJSON ¶ added in v2.3.0
func (r RegistrationTokenMinimal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistrationTokenMinimal.
func (*RegistrationTokenMinimal) UnmarshalJSON ¶ added in v2.3.0
func (r *RegistrationTokenMinimal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationTokenMinimal.
type RegistrationTokenOperation ¶
type RegistrationTokenOperation string
RegistrationTokenOperation - The type of resetting the token.
const ( RegistrationTokenOperationDelete RegistrationTokenOperation = "Delete" RegistrationTokenOperationNone RegistrationTokenOperation = "None" RegistrationTokenOperationUpdate RegistrationTokenOperation = "Update" )
func PossibleRegistrationTokenOperationValues ¶
func PossibleRegistrationTokenOperationValues() []RegistrationTokenOperation
PossibleRegistrationTokenOperationValues returns the possible values for the RegistrationTokenOperation const type.
type RemoteApplicationType ¶
type RemoteApplicationType string
RemoteApplicationType - Resource Type of Application.
const ( RemoteApplicationTypeInBuilt RemoteApplicationType = "InBuilt" RemoteApplicationTypeMsixApplication RemoteApplicationType = "MsixApplication" )
func PossibleRemoteApplicationTypeValues ¶
func PossibleRemoteApplicationTypeValues() []RemoteApplicationType
PossibleRemoteApplicationTypeValues returns the possible values for the RemoteApplicationType const type.
type ResourceModelWithAllowedPropertySetIdentity ¶
type ResourceModelWithAllowedPropertySetIdentity struct { // The identity type. Type *string // READ-ONLY; The principal ID of resource identity. The value must be an UUID. PrincipalID *string // READ-ONLY; The tenant ID of resource. The value must be an UUID. TenantID *string }
func (ResourceModelWithAllowedPropertySetIdentity) MarshalJSON ¶
func (r ResourceModelWithAllowedPropertySetIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySetIdentity.
func (*ResourceModelWithAllowedPropertySetIdentity) UnmarshalJSON ¶
func (r *ResourceModelWithAllowedPropertySetIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceModelWithAllowedPropertySetIdentity.
type ResourceModelWithAllowedPropertySetPlan ¶
type ResourceModelWithAllowedPropertySetPlan struct { // REQUIRED; A user defined name of the 3rd Party Artifact that is being procured. Name *string // 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 // REQUIRED; The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic Publisher *string // A publisher provided promotion code as provisioned in Data Market for the said product/artifact. PromotionCode *string // The version of the desired product/artifact. Version *string }
func (ResourceModelWithAllowedPropertySetPlan) MarshalJSON ¶
func (r ResourceModelWithAllowedPropertySetPlan) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySetPlan.
func (*ResourceModelWithAllowedPropertySetPlan) UnmarshalJSON ¶
func (r *ResourceModelWithAllowedPropertySetPlan) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceModelWithAllowedPropertySetPlan.
type ResourceModelWithAllowedPropertySetSKU ¶
type ResourceModelWithAllowedPropertySetSKU struct { // REQUIRED; The name of the SKU. E.g. P3. It is typically a letter+number code Name *string // 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 // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. Size *string // 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 }
func (ResourceModelWithAllowedPropertySetSKU) MarshalJSON ¶
func (r ResourceModelWithAllowedPropertySetSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySetSKU.
func (*ResourceModelWithAllowedPropertySetSKU) UnmarshalJSON ¶
func (r *ResourceModelWithAllowedPropertySetSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceModelWithAllowedPropertySetSKU.
type ResourceProviderOperation ¶
type ResourceProviderOperation struct { // Display metadata associated with the operation. Display *ResourceProviderOperationDisplay // Is a data action. IsDataAction *bool // Operation name, in format of {provider}/{resource}/{operation} Name *string // Properties of the operation Properties *OperationProperties }
ResourceProviderOperation - Supported operation of this resource provider.
func (ResourceProviderOperation) MarshalJSON ¶
func (r ResourceProviderOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperation.
func (*ResourceProviderOperation) UnmarshalJSON ¶
func (r *ResourceProviderOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperation.
type ResourceProviderOperationDisplay ¶
type ResourceProviderOperationDisplay struct { // Description of this operation. Description *string // Type of operation: get, read, delete, etc. Operation *string // Resource provider: Microsoft Desktop Virtualization. Provider *string // Resource on which the operation is performed. Resource *string }
ResourceProviderOperationDisplay - Display metadata associated with the operation.
func (ResourceProviderOperationDisplay) MarshalJSON ¶
func (r ResourceProviderOperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationDisplay.
func (*ResourceProviderOperationDisplay) UnmarshalJSON ¶
func (r *ResourceProviderOperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationDisplay.
type ResourceProviderOperationList ¶
type ResourceProviderOperationList struct { // List of operations supported by this resource provider. Value []*ResourceProviderOperation // READ-ONLY; Link to the next page of results. NextLink *string }
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.
func (*ResourceProviderOperationList) UnmarshalJSON ¶
func (r *ResourceProviderOperationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationList.
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.
func PossibleSKUTierValues ¶
func PossibleSKUTierValues() []SKUTier
PossibleSKUTierValues returns the possible values for the SKUTier const type.
type SSOSecretType ¶
type SSOSecretType string
SSOSecretType - The type of single sign on Secret Type.
const ( SSOSecretTypeCertificate SSOSecretType = "Certificate" SSOSecretTypeCertificateInKeyVault SSOSecretType = "CertificateInKeyVault" )
func PossibleSSOSecretTypeValues ¶
func PossibleSSOSecretTypeValues() []SSOSecretType
PossibleSSOSecretTypeValues returns the possible values for the SSOSecretType const type.
type ScalingHostPoolReference ¶
type ScalingHostPoolReference struct { // Arm path of referenced hostpool. HostPoolArmPath *string // Is the scaling plan enabled for this hostpool. ScalingPlanEnabled *bool }
ScalingHostPoolReference - Scaling plan reference to hostpool.
func (ScalingHostPoolReference) MarshalJSON ¶
func (s ScalingHostPoolReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingHostPoolReference.
func (*ScalingHostPoolReference) UnmarshalJSON ¶
func (s *ScalingHostPoolReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingHostPoolReference.
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.
type ScalingPlan ¶
type ScalingPlan struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Detailed properties for scaling plan. Properties *ScalingPlanProperties Identity *ResourceModelWithAllowedPropertySetIdentity // 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 // 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 Plan *ResourceModelWithAllowedPropertySetPlan SKU *ResourceModelWithAllowedPropertySetSKU // Resource tags. Tags map[string]*string // 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 // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ScalingPlan - Represents a scaling plan definition.
func (ScalingPlan) MarshalJSON ¶
func (s ScalingPlan) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlan.
func (*ScalingPlan) UnmarshalJSON ¶
func (s *ScalingPlan) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlan.
type ScalingPlanList ¶
type ScalingPlanList struct { // List of scaling plan definitions. Value []*ScalingPlan // READ-ONLY; Link to the next page of results. NextLink *string }
ScalingPlanList - List of scaling plan definitions.
func (ScalingPlanList) MarshalJSON ¶
func (s ScalingPlanList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanList.
func (*ScalingPlanList) UnmarshalJSON ¶
func (s *ScalingPlanList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanList.
type ScalingPlanPatch ¶
type ScalingPlanPatch struct { // Detailed properties for scaling plan Properties *ScalingPlanPatchProperties // tags to be updated Tags map[string]*string }
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.
func (*ScalingPlanPatch) UnmarshalJSON ¶
func (s *ScalingPlanPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPatch.
type ScalingPlanPatchProperties ¶
type ScalingPlanPatchProperties struct { // Description of scaling plan. Description *string // Exclusion tag for scaling plan. ExclusionTag *string // User friendly name of scaling plan. FriendlyName *string // List of ScalingHostPoolReference definitions. HostPoolReferences []*ScalingHostPoolReference // List of ScalingSchedule definitions. Schedules []*ScalingSchedule // Timezone of the scaling plan. TimeZone *string }
ScalingPlanPatchProperties - Scaling plan properties.
func (ScalingPlanPatchProperties) MarshalJSON ¶
func (s ScalingPlanPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPatchProperties.
func (*ScalingPlanPatchProperties) UnmarshalJSON ¶
func (s *ScalingPlanPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPatchProperties.
type ScalingPlanPersonalSchedule ¶ added in v2.1.0
type ScalingPlanPersonalSchedule struct { // REQUIRED; Detailed properties for ScalingPlanPersonalSchedule Properties *ScalingPlanPersonalScheduleProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ScalingPlanPersonalSchedule - Represents a ScalingPlanPersonalSchedule definition.
func (ScalingPlanPersonalSchedule) MarshalJSON ¶ added in v2.1.0
func (s ScalingPlanPersonalSchedule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalSchedule.
func (*ScalingPlanPersonalSchedule) UnmarshalJSON ¶ added in v2.1.0
func (s *ScalingPlanPersonalSchedule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalSchedule.
type ScalingPlanPersonalScheduleList ¶ added in v2.1.0
type ScalingPlanPersonalScheduleList struct { // List of ScalingPlanPersonalSchedule definitions. Value []*ScalingPlanPersonalSchedule // READ-ONLY; Link to the next page of results. NextLink *string }
ScalingPlanPersonalScheduleList - List of ScalingPlanPersonalSchedule definitions.
func (ScalingPlanPersonalScheduleList) MarshalJSON ¶ added in v2.1.0
func (s ScalingPlanPersonalScheduleList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalScheduleList.
func (*ScalingPlanPersonalScheduleList) UnmarshalJSON ¶ added in v2.1.0
func (s *ScalingPlanPersonalScheduleList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalScheduleList.
type ScalingPlanPersonalSchedulePatch ¶ added in v2.1.0
type ScalingPlanPersonalSchedulePatch struct { // Detailed properties for ScalingPlanPersonalSchedule Properties *ScalingPlanPersonalScheduleProperties }
ScalingPlanPersonalSchedulePatch - ScalingPlanPersonalSchedule properties that can be patched.
func (ScalingPlanPersonalSchedulePatch) MarshalJSON ¶ added in v2.1.0
func (s ScalingPlanPersonalSchedulePatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalSchedulePatch.
func (*ScalingPlanPersonalSchedulePatch) UnmarshalJSON ¶ added in v2.1.0
func (s *ScalingPlanPersonalSchedulePatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalSchedulePatch.
type ScalingPlanPersonalScheduleProperties ¶ added in v2.1.0
type ScalingPlanPersonalScheduleProperties struct { // Set of days of the week on which this schedule is active. DaysOfWeek []*DayOfWeek // Action to be taken after a user disconnect during the off-peak period. OffPeakActionOnDisconnect *SessionHandlingOperation // Action to be taken after a logoff during the off-peak period. OffPeakActionOnLogoff *SessionHandlingOperation // The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak // period. OffPeakMinutesToWaitOnDisconnect *int32 // The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak // period. OffPeakMinutesToWaitOnLogoff *int32 // Starting time for off-peak period. OffPeakStartTime *Time // The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. OffPeakStartVMOnConnect *SetStartVMOnConnect // Action to be taken after a user disconnect during the peak period. PeakActionOnDisconnect *SessionHandlingOperation // Action to be taken after a logoff during the peak period. PeakActionOnLogoff *SessionHandlingOperation // The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak // period. PeakMinutesToWaitOnDisconnect *int32 // The time in minutes to wait before performing the desired session handling action when a user logs off during the peak // period. PeakMinutesToWaitOnLogoff *int32 // Starting time for peak period. PeakStartTime *Time // The desired configuration of Start VM On Connect for the hostpool during the peak phase. PeakStartVMOnConnect *SetStartVMOnConnect // Action to be taken after a user disconnect during the ramp down period. RampDownActionOnDisconnect *SessionHandlingOperation // Action to be taken after a logoff during the ramp down period. RampDownActionOnLogoff *SessionHandlingOperation // The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp // down period. RampDownMinutesToWaitOnDisconnect *int32 // The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp // down period. RampDownMinutesToWaitOnLogoff *int32 // Starting time for ramp down period. RampDownStartTime *Time // The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. RampDownStartVMOnConnect *SetStartVMOnConnect // Action to be taken after a user disconnect during the ramp up period. RampUpActionOnDisconnect *SessionHandlingOperation // Action to be taken after a logoff during the ramp up period. RampUpActionOnLogoff *SessionHandlingOperation // The desired startup behavior during the ramp up period for personal vms in the hostpool. RampUpAutoStartHosts *StartupBehavior // The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp // up period. RampUpMinutesToWaitOnDisconnect *int32 // The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp // up period. RampUpMinutesToWaitOnLogoff *int32 // Starting time for ramp up period. RampUpStartTime *Time // The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session // hosts must be turned on using rampUpAutoStartHosts or by turning them on // manually. RampUpStartVMOnConnect *SetStartVMOnConnect }
ScalingPlanPersonalScheduleProperties - A ScalingPlanPersonalSchedule.
func (ScalingPlanPersonalScheduleProperties) MarshalJSON ¶ added in v2.1.0
func (s ScalingPlanPersonalScheduleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalScheduleProperties.
func (*ScalingPlanPersonalScheduleProperties) UnmarshalJSON ¶ added in v2.1.0
func (s *ScalingPlanPersonalScheduleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalScheduleProperties.
type ScalingPlanPersonalSchedulesClient ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClient struct {
// contains filtered or unexported fields
}
ScalingPlanPersonalSchedulesClient contains the methods for the ScalingPlanPersonalSchedules group. Don't use this type directly, use NewScalingPlanPersonalSchedulesClient() instead.
func NewScalingPlanPersonalSchedulesClient ¶ added in v2.1.0
func NewScalingPlanPersonalSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlanPersonalSchedulesClient, error)
NewScalingPlanPersonalSchedulesClient creates a new instance of ScalingPlanPersonalSchedulesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScalingPlanPersonalSchedulesClient) Create ¶ added in v2.1.0
func (client *ScalingPlanPersonalSchedulesClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, scalingPlanSchedule ScalingPlanPersonalSchedule, options *ScalingPlanPersonalSchedulesClientCreateOptions) (ScalingPlanPersonalSchedulesClientCreateResponse, error)
Create - Create or update a ScalingPlanPersonalSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- scalingPlanSchedule - Object containing ScalingPlanPersonalSchedule definitions.
- options - ScalingPlanPersonalSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlanPersonalSchedulesClient().Create(ctx, "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", armdesktopvirtualization.ScalingPlanPersonalSchedule{ Properties: &armdesktopvirtualization.ScalingPlanPersonalScheduleProperties{ DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ to.Ptr(armdesktopvirtualization.DayOfWeekMonday), to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), to.Ptr(armdesktopvirtualization.DayOfWeekThursday), to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, OffPeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), OffPeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), OffPeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), OffPeakMinutesToWaitOnLogoff: to.Ptr[int32](10), OffPeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](20), Minute: to.Ptr[int32](0), }, OffPeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), PeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), PeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), PeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), PeakMinutesToWaitOnLogoff: to.Ptr[int32](10), PeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](8), Minute: to.Ptr[int32](0), }, PeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), RampDownActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), RampDownActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), RampDownMinutesToWaitOnDisconnect: to.Ptr[int32](10), RampDownMinutesToWaitOnLogoff: to.Ptr[int32](10), RampDownStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](18), Minute: to.Ptr[int32](0), }, RampDownStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), RampUpActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), RampUpActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), RampUpAutoStartHosts: to.Ptr(armdesktopvirtualization.StartupBehaviorAll), RampUpMinutesToWaitOnDisconnect: to.Ptr[int32](10), RampUpMinutesToWaitOnLogoff: to.Ptr[int32](10), RampUpStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](6), Minute: to.Ptr[int32](0), }, RampUpStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlanPersonalSchedule = armdesktopvirtualization.ScalingPlanPersonalSchedule{ // Name: to.Ptr("scalingPlanScheduleWeekdays1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/personalSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/personalSchedules/scalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPersonalScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // OffPeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // OffPeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // OffPeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // OffPeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // PeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // PeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // PeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // PeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // PeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampDownActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampDownActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // RampDownMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampDownMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampUpActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpAutoStartHosts: to.Ptr(armdesktopvirtualization.StartupBehaviorAll), // RampUpMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampUpMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }, // }
Output:
func (*ScalingPlanPersonalSchedulesClient) Delete ¶ added in v2.1.0
func (client *ScalingPlanPersonalSchedulesClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientDeleteOptions) (ScalingPlanPersonalSchedulesClientDeleteResponse, error)
Delete - Remove a ScalingPlanPersonalSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- options - ScalingPlanPersonalSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewScalingPlanPersonalSchedulesClient().Delete(ctx, "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScalingPlanPersonalSchedulesClient) Get ¶ added in v2.1.0
func (client *ScalingPlanPersonalSchedulesClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientGetOptions) (ScalingPlanPersonalSchedulesClientGetResponse, error)
Get - Get a ScalingPlanPersonalSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- options - ScalingPlanPersonalSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlanPersonalSchedulesClient().Get(ctx, "resourceGroup1", "PersonalScalingPlan1", "PersonalScalingPlanSchedule", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlanPersonalSchedule = armdesktopvirtualization.ScalingPlanPersonalSchedule{ // Name: to.Ptr("PersonalScalingPlanSchedule"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/personalSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/personalSchedules/PersonalScalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPersonalScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // OffPeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // OffPeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // OffPeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // OffPeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // PeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // PeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // PeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // PeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // PeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampDownActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampDownActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // RampDownMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampDownMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampUpActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpAutoStartHosts: to.Ptr(armdesktopvirtualization.StartupBehaviorAll), // RampUpMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampUpMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // RampUpStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // }, // }
Output:
func (*ScalingPlanPersonalSchedulesClient) NewListPager ¶ added in v2.1.0
func (client *ScalingPlanPersonalSchedulesClient) NewListPager(resourceGroupName string, scalingPlanName string, options *ScalingPlanPersonalSchedulesClientListOptions) *runtime.Pager[ScalingPlanPersonalSchedulesClientListResponse]
NewListPager - List ScalingPlanPersonalSchedules.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- options - ScalingPlanPersonalSchedulesClientListOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScalingPlanPersonalSchedulesClient().NewListPager("resourceGroup1", "scalingPlan", &armdesktopvirtualization.ScalingPlanPersonalSchedulesClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ScalingPlanPersonalScheduleList = armdesktopvirtualization.ScalingPlanPersonalScheduleList{ // Value: []*armdesktopvirtualization.ScalingPlanPersonalSchedule{ // { // Name: to.Ptr("scalingPlanScheduleWeekday"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/personalSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/personalSchedules/scalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPersonalScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // OffPeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // OffPeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // OffPeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // OffPeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // PeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // PeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // PeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // PeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // PeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampDownActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampDownActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // RampDownMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampDownMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampUpActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpAutoStartHosts: to.Ptr(armdesktopvirtualization.StartupBehaviorAll), // RampUpMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampUpMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // RampUpStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // }, // }, // { // Name: to.Ptr("scalingPlanScheduleWeekend"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/personalSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/personalSchedules/scalingPlanScheduleWeekends1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPersonalScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // to.Ptr(armdesktopvirtualization.DayOfWeekSunday)}, // OffPeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // OffPeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // OffPeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // OffPeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](16), // Minute: to.Ptr[int32](0), // }, // OffPeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // PeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // PeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // PeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // PeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](10), // Minute: to.Ptr[int32](0), // }, // PeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampDownActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // RampDownActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // RampDownMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampDownMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](14), // Minute: to.Ptr[int32](0), // }, // RampDownStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampUpActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpAutoStartHosts: to.Ptr(armdesktopvirtualization.StartupBehaviorAll), // RampUpMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampUpMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // RampUpStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // }, // }}, // } }
Output:
func (*ScalingPlanPersonalSchedulesClient) Update ¶ added in v2.1.0
func (client *ScalingPlanPersonalSchedulesClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientUpdateOptions) (ScalingPlanPersonalSchedulesClientUpdateResponse, error)
Update - Update a ScalingPlanPersonalSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- options - ScalingPlanPersonalSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlanPersonalSchedulesClient().Update(ctx, "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", &armdesktopvirtualization.ScalingPlanPersonalSchedulesClientUpdateOptions{ScalingPlanSchedule: &armdesktopvirtualization.ScalingPlanPersonalSchedulePatch{ Properties: &armdesktopvirtualization.ScalingPlanPersonalScheduleProperties{ OffPeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), OffPeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), OffPeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), OffPeakMinutesToWaitOnLogoff: to.Ptr[int32](10), OffPeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](20), Minute: to.Ptr[int32](0), }, OffPeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectDisable), PeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), PeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), PeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), PeakMinutesToWaitOnLogoff: to.Ptr[int32](10), PeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](8), Minute: to.Ptr[int32](0), }, RampDownActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), RampDownActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), RampDownMinutesToWaitOnDisconnect: to.Ptr[int32](10), RampDownMinutesToWaitOnLogoff: to.Ptr[int32](10), RampDownStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](18), Minute: to.Ptr[int32](0), }, }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlanPersonalSchedule = armdesktopvirtualization.ScalingPlanPersonalSchedule{ // Name: to.Ptr("scalingPlanScheduleWeekdays1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/personalSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/personalSchedules/scalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPersonalScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // OffPeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // OffPeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // OffPeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // OffPeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectDisable), // PeakActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // PeakActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // PeakMinutesToWaitOnDisconnect: to.Ptr[int32](10), // PeakMinutesToWaitOnLogoff: to.Ptr[int32](10), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // PeakStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampDownActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampDownActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationDeallocate), // RampDownMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampDownMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // RampUpActionOnDisconnect: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpActionOnLogoff: to.Ptr(armdesktopvirtualization.SessionHandlingOperationNone), // RampUpAutoStartHosts: to.Ptr(armdesktopvirtualization.StartupBehaviorAll), // RampUpMinutesToWaitOnDisconnect: to.Ptr[int32](10), // RampUpMinutesToWaitOnLogoff: to.Ptr[int32](10), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // RampUpStartVMOnConnect: to.Ptr(armdesktopvirtualization.SetStartVMOnConnectEnable), // }, // }
Output:
type ScalingPlanPersonalSchedulesClientCreateOptions ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientCreateOptions struct { }
ScalingPlanPersonalSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Create method.
type ScalingPlanPersonalSchedulesClientCreateResponse ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientCreateResponse struct { // Represents a ScalingPlanPersonalSchedule definition. ScalingPlanPersonalSchedule }
ScalingPlanPersonalSchedulesClientCreateResponse contains the response from method ScalingPlanPersonalSchedulesClient.Create.
type ScalingPlanPersonalSchedulesClientDeleteOptions ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientDeleteOptions struct { }
ScalingPlanPersonalSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Delete method.
type ScalingPlanPersonalSchedulesClientDeleteResponse ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientDeleteResponse struct { }
ScalingPlanPersonalSchedulesClientDeleteResponse contains the response from method ScalingPlanPersonalSchedulesClient.Delete.
type ScalingPlanPersonalSchedulesClientGetOptions ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientGetOptions struct { }
ScalingPlanPersonalSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Get method.
type ScalingPlanPersonalSchedulesClientGetResponse ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientGetResponse struct { // Represents a ScalingPlanPersonalSchedule definition. ScalingPlanPersonalSchedule }
ScalingPlanPersonalSchedulesClientGetResponse contains the response from method ScalingPlanPersonalSchedulesClient.Get.
type ScalingPlanPersonalSchedulesClientListOptions ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
ScalingPlanPersonalSchedulesClientListOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.NewListPager method.
type ScalingPlanPersonalSchedulesClientListResponse ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientListResponse struct { // List of ScalingPlanPersonalSchedule definitions. ScalingPlanPersonalScheduleList }
ScalingPlanPersonalSchedulesClientListResponse contains the response from method ScalingPlanPersonalSchedulesClient.NewListPager.
type ScalingPlanPersonalSchedulesClientUpdateOptions ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientUpdateOptions struct { // Object containing ScalingPlanPersonalSchedule definitions. ScalingPlanSchedule *ScalingPlanPersonalSchedulePatch }
ScalingPlanPersonalSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Update method.
type ScalingPlanPersonalSchedulesClientUpdateResponse ¶ added in v2.1.0
type ScalingPlanPersonalSchedulesClientUpdateResponse struct { // Represents a ScalingPlanPersonalSchedule definition. ScalingPlanPersonalSchedule }
ScalingPlanPersonalSchedulesClientUpdateResponse contains the response from method ScalingPlanPersonalSchedulesClient.Update.
type ScalingPlanPooledSchedule ¶
type ScalingPlanPooledSchedule struct { // REQUIRED; Detailed properties for ScalingPlanPooledSchedule Properties *ScalingPlanPooledScheduleProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ScalingPlanPooledSchedule - Represents a ScalingPlanPooledSchedule definition.
func (ScalingPlanPooledSchedule) MarshalJSON ¶
func (s ScalingPlanPooledSchedule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledSchedule.
func (*ScalingPlanPooledSchedule) UnmarshalJSON ¶
func (s *ScalingPlanPooledSchedule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledSchedule.
type ScalingPlanPooledScheduleList ¶
type ScalingPlanPooledScheduleList struct { // List of ScalingPlanPooledSchedule definitions. Value []*ScalingPlanPooledSchedule // READ-ONLY; Link to the next page of results. NextLink *string }
ScalingPlanPooledScheduleList - List of ScalingPlanPooledSchedule definitions.
func (ScalingPlanPooledScheduleList) MarshalJSON ¶
func (s ScalingPlanPooledScheduleList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledScheduleList.
func (*ScalingPlanPooledScheduleList) UnmarshalJSON ¶
func (s *ScalingPlanPooledScheduleList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledScheduleList.
type ScalingPlanPooledSchedulePatch ¶
type ScalingPlanPooledSchedulePatch struct { // Detailed properties for ScalingPlanPooledSchedule Properties *ScalingPlanPooledScheduleProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ScalingPlanPooledSchedulePatch - ScalingPlanPooledSchedule properties that can be patched.
func (ScalingPlanPooledSchedulePatch) MarshalJSON ¶
func (s ScalingPlanPooledSchedulePatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledSchedulePatch.
func (*ScalingPlanPooledSchedulePatch) UnmarshalJSON ¶
func (s *ScalingPlanPooledSchedulePatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledSchedulePatch.
type ScalingPlanPooledScheduleProperties ¶
type ScalingPlanPooledScheduleProperties struct { // Set of days of the week on which this schedule is active. DaysOfWeek []*DayOfWeek // Load balancing algorithm for off-peak period. OffPeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Starting time for off-peak period. OffPeakStartTime *Time // Load balancing algorithm for peak period. PeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Starting time for peak period. PeakStartTime *Time // Capacity threshold for ramp down period. RampDownCapacityThresholdPct *int32 // Should users be logged off forcefully from hosts. RampDownForceLogoffUsers *bool // Load balancing algorithm for ramp down period. RampDownLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Minimum host percentage for ramp down period. RampDownMinimumHostsPct *int32 // Notification message for users during ramp down period. RampDownNotificationMessage *string // Starting time for ramp down period. RampDownStartTime *Time // Specifies when to stop hosts during ramp down period. RampDownStopHostsWhen *StopHostsWhen // Number of minutes to wait to stop hosts during ramp down period. RampDownWaitTimeMinutes *int32 // Capacity threshold for ramp up period. RampUpCapacityThresholdPct *int32 // Load balancing algorithm for ramp up period. RampUpLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Minimum host percentage for ramp up period. RampUpMinimumHostsPct *int32 // Starting time for ramp up period. RampUpStartTime *Time }
ScalingPlanPooledScheduleProperties - A ScalingPlanPooledSchedule.
func (ScalingPlanPooledScheduleProperties) MarshalJSON ¶
func (s ScalingPlanPooledScheduleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledScheduleProperties.
func (*ScalingPlanPooledScheduleProperties) UnmarshalJSON ¶
func (s *ScalingPlanPooledScheduleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledScheduleProperties.
type ScalingPlanPooledSchedulesClient ¶
type ScalingPlanPooledSchedulesClient struct {
// contains filtered or unexported fields
}
ScalingPlanPooledSchedulesClient contains the methods for the ScalingPlanPooledSchedules group. Don't use this type directly, use NewScalingPlanPooledSchedulesClient() instead.
func NewScalingPlanPooledSchedulesClient ¶
func NewScalingPlanPooledSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlanPooledSchedulesClient, error)
NewScalingPlanPooledSchedulesClient creates a new instance of ScalingPlanPooledSchedulesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScalingPlanPooledSchedulesClient) Create ¶
func (client *ScalingPlanPooledSchedulesClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, scalingPlanSchedule ScalingPlanPooledSchedule, options *ScalingPlanPooledSchedulesClientCreateOptions) (ScalingPlanPooledSchedulesClientCreateResponse, error)
Create - Create or update a ScalingPlanPooledSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- scalingPlanSchedule - Object containing ScalingPlanPooledSchedule definitions.
- options - ScalingPlanPooledSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlanPooledSchedulesClient().Create(ctx, "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", armdesktopvirtualization.ScalingPlanPooledSchedule{ Properties: &armdesktopvirtualization.ScalingPlanPooledScheduleProperties{ DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ to.Ptr(armdesktopvirtualization.DayOfWeekMonday), to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), to.Ptr(armdesktopvirtualization.DayOfWeekThursday), to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), OffPeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](20), Minute: to.Ptr[int32](0), }, PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), PeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](8), Minute: to.Ptr[int32](0), }, RampDownCapacityThresholdPct: to.Ptr[int32](50), RampDownForceLogoffUsers: to.Ptr(true), RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), RampDownMinimumHostsPct: to.Ptr[int32](20), RampDownNotificationMessage: to.Ptr("message"), RampDownStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](18), Minute: to.Ptr[int32](0), }, RampDownWaitTimeMinutes: to.Ptr[int32](30), RampUpCapacityThresholdPct: to.Ptr[int32](80), RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), RampUpMinimumHostsPct: to.Ptr[int32](20), RampUpStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](6), Minute: to.Ptr[int32](0), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlanPooledSchedule = armdesktopvirtualization.ScalingPlanPooledSchedule{ // Name: to.Ptr("scalingPlanScheduleWeekdays1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/pooledSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPooledScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }, // }
Output:
func (*ScalingPlanPooledSchedulesClient) Delete ¶
func (client *ScalingPlanPooledSchedulesClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientDeleteOptions) (ScalingPlanPooledSchedulesClientDeleteResponse, error)
Delete - Remove a ScalingPlanPooledSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- options - ScalingPlanPooledSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewScalingPlanPooledSchedulesClient().Delete(ctx, "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScalingPlanPooledSchedulesClient) Get ¶
func (client *ScalingPlanPooledSchedulesClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientGetOptions) (ScalingPlanPooledSchedulesClientGetResponse, error)
Get - Get a ScalingPlanPooledSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- options - ScalingPlanPooledSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlanPooledSchedulesClient().Get(ctx, "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlanPooledSchedule = armdesktopvirtualization.ScalingPlanPooledSchedule{ // Name: to.Ptr("scalingPlanScheduleWeekdays1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/pooledSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPooledScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }, // }
Output:
func (*ScalingPlanPooledSchedulesClient) NewListPager ¶
func (client *ScalingPlanPooledSchedulesClient) NewListPager(resourceGroupName string, scalingPlanName string, options *ScalingPlanPooledSchedulesClientListOptions) *runtime.Pager[ScalingPlanPooledSchedulesClientListResponse]
NewListPager - List ScalingPlanPooledSchedules.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- options - ScalingPlanPooledSchedulesClientListOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScalingPlanPooledSchedulesClient().NewListPager("resourceGroup1", "scalingPlan1", &armdesktopvirtualization.ScalingPlanPooledSchedulesClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ScalingPlanPooledScheduleList = armdesktopvirtualization.ScalingPlanPooledScheduleList{ // Value: []*armdesktopvirtualization.ScalingPlanPooledSchedule{ // { // Name: to.Ptr("scalingPlanScheduleWeekdays1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/pooledSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPooledScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }, // }, // { // Name: to.Ptr("scalingPlanScheduleWeekends1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/pooledSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekends1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPooledScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekSaturday), // to.Ptr(armdesktopvirtualization.DayOfWeekSunday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](100), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](0), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](90), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](10), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }, // }}, // } }
Output:
func (*ScalingPlanPooledSchedulesClient) Update ¶
func (client *ScalingPlanPooledSchedulesClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientUpdateOptions) (ScalingPlanPooledSchedulesClientUpdateResponse, error)
Update - Update a ScalingPlanPooledSchedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlanScheduleName - The name of the ScalingPlanSchedule
- options - ScalingPlanPooledSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlanPooledSchedulesClient().Update(ctx, "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", &armdesktopvirtualization.ScalingPlanPooledSchedulesClientUpdateOptions{ScalingPlanSchedule: &armdesktopvirtualization.ScalingPlanPooledSchedulePatch{ Properties: &armdesktopvirtualization.ScalingPlanPooledScheduleProperties{ DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ to.Ptr(armdesktopvirtualization.DayOfWeekMonday), to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), to.Ptr(armdesktopvirtualization.DayOfWeekThursday), to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, PeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](8), Minute: to.Ptr[int32](0), }, RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), RampDownMinimumHostsPct: to.Ptr[int32](20), RampDownWaitTimeMinutes: to.Ptr[int32](30), RampUpCapacityThresholdPct: to.Ptr[int32](80), RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlanPooledSchedule = armdesktopvirtualization.ScalingPlanPooledSchedule{ // Name: to.Ptr("scalingPlanScheduleWeekdays1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans/pooledSchedules"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1/pooledSchedules/scalingPlanScheduleWeekdays1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.ScalingPlanPooledScheduleProperties{ // DaysOfWeek: []*armdesktopvirtualization.DayOfWeek{ // to.Ptr(armdesktopvirtualization.DayOfWeekMonday), // to.Ptr(armdesktopvirtualization.DayOfWeekTuesday), // to.Ptr(armdesktopvirtualization.DayOfWeekWednesday), // to.Ptr(armdesktopvirtualization.DayOfWeekThursday), // to.Ptr(armdesktopvirtualization.DayOfWeekFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }, // }
Output:
type ScalingPlanPooledSchedulesClientCreateOptions ¶
type ScalingPlanPooledSchedulesClientCreateOptions struct { }
ScalingPlanPooledSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Create method.
type ScalingPlanPooledSchedulesClientCreateResponse ¶
type ScalingPlanPooledSchedulesClientCreateResponse struct { // Represents a ScalingPlanPooledSchedule definition. ScalingPlanPooledSchedule }
ScalingPlanPooledSchedulesClientCreateResponse contains the response from method ScalingPlanPooledSchedulesClient.Create.
type ScalingPlanPooledSchedulesClientDeleteOptions ¶
type ScalingPlanPooledSchedulesClientDeleteOptions struct { }
ScalingPlanPooledSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Delete method.
type ScalingPlanPooledSchedulesClientDeleteResponse ¶
type ScalingPlanPooledSchedulesClientDeleteResponse struct { }
ScalingPlanPooledSchedulesClientDeleteResponse contains the response from method ScalingPlanPooledSchedulesClient.Delete.
type ScalingPlanPooledSchedulesClientGetOptions ¶
type ScalingPlanPooledSchedulesClientGetOptions struct { }
ScalingPlanPooledSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Get method.
type ScalingPlanPooledSchedulesClientGetResponse ¶
type ScalingPlanPooledSchedulesClientGetResponse struct { // Represents a ScalingPlanPooledSchedule definition. ScalingPlanPooledSchedule }
ScalingPlanPooledSchedulesClientGetResponse contains the response from method ScalingPlanPooledSchedulesClient.Get.
type ScalingPlanPooledSchedulesClientListOptions ¶
type ScalingPlanPooledSchedulesClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
ScalingPlanPooledSchedulesClientListOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.NewListPager method.
type ScalingPlanPooledSchedulesClientListResponse ¶
type ScalingPlanPooledSchedulesClientListResponse struct { // List of ScalingPlanPooledSchedule definitions. ScalingPlanPooledScheduleList }
ScalingPlanPooledSchedulesClientListResponse contains the response from method ScalingPlanPooledSchedulesClient.NewListPager.
type ScalingPlanPooledSchedulesClientUpdateOptions ¶
type ScalingPlanPooledSchedulesClientUpdateOptions struct { // Object containing ScalingPlanPooledSchedule definitions. ScalingPlanSchedule *ScalingPlanPooledSchedulePatch }
ScalingPlanPooledSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Update method.
type ScalingPlanPooledSchedulesClientUpdateResponse ¶
type ScalingPlanPooledSchedulesClientUpdateResponse struct { // Represents a ScalingPlanPooledSchedule definition. ScalingPlanPooledSchedule }
ScalingPlanPooledSchedulesClientUpdateResponse contains the response from method ScalingPlanPooledSchedulesClient.Update.
type ScalingPlanProperties ¶
type ScalingPlanProperties struct { // REQUIRED; Timezone of the scaling plan. TimeZone *string // Description of scaling plan. Description *string // Exclusion tag for scaling plan. ExclusionTag *string // User friendly name of scaling plan. FriendlyName *string // List of ScalingHostPoolReference definitions. HostPoolReferences []*ScalingHostPoolReference // HostPool type for desktop. HostPoolType *ScalingHostPoolType // List of ScalingPlanPooledSchedule definitions. Schedules []*ScalingSchedule // READ-ONLY; ObjectId of scaling plan. (internal use) ObjectID *string }
ScalingPlanProperties - Scaling plan properties.
func (ScalingPlanProperties) MarshalJSON ¶
func (s ScalingPlanProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingPlanProperties.
func (*ScalingPlanProperties) UnmarshalJSON ¶
func (s *ScalingPlanProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanProperties.
type ScalingPlansClient ¶
type ScalingPlansClient struct {
// contains filtered or unexported fields
}
ScalingPlansClient contains the methods for the ScalingPlans group. Don't use this type directly, use NewScalingPlansClient() instead.
func NewScalingPlansClient ¶
func NewScalingPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlansClient, error)
NewScalingPlansClient creates a new instance of ScalingPlansClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScalingPlansClient) Create ¶
func (client *ScalingPlansClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlan ScalingPlan, options *ScalingPlansClientCreateOptions) (ScalingPlansClientCreateResponse, error)
Create - Create or update a scaling plan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- scalingPlan - Object containing scaling plan definitions.
- options - ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlansClient().Create(ctx, "resourceGroup1", "scalingPlan1", armdesktopvirtualization.ScalingPlan{ Location: to.Ptr("centralus"), Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, Properties: &armdesktopvirtualization.ScalingPlanProperties{ Description: to.Ptr("Description of Scaling Plan"), ExclusionTag: to.Ptr("value"), FriendlyName: to.Ptr("Scaling Plan 1"), HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ { HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), ScalingPlanEnabled: to.Ptr(true), }}, HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), Schedules: []*armdesktopvirtualization.ScalingSchedule{ { Name: to.Ptr("schedule1"), DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), OffPeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](20), Minute: to.Ptr[int32](0), }, PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), PeakStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](8), Minute: to.Ptr[int32](0), }, RampDownCapacityThresholdPct: to.Ptr[int32](50), RampDownForceLogoffUsers: to.Ptr(true), RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), RampDownMinimumHostsPct: to.Ptr[int32](20), RampDownNotificationMessage: to.Ptr("message"), RampDownStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](18), Minute: to.Ptr[int32](0), }, RampDownWaitTimeMinutes: to.Ptr[int32](30), RampUpCapacityThresholdPct: to.Ptr[int32](80), RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), RampUpMinimumHostsPct: to.Ptr[int32](20), RampUpStartTime: &armdesktopvirtualization.Time{ Hour: to.Ptr[int32](6), Minute: to.Ptr[int32](0), }, }}, TimeZone: to.Ptr("Central Standard Time"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlan = armdesktopvirtualization.ScalingPlan{ // Name: to.Ptr("scalingPlan1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of Scaling Plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }
Output:
func (*ScalingPlansClient) Delete ¶
func (client *ScalingPlansClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientDeleteOptions) (ScalingPlansClientDeleteResponse, error)
Delete - Remove a scaling plan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- options - ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewScalingPlansClient().Delete(ctx, "resourceGroup1", "scalingPlan1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ScalingPlansClient) Get ¶
func (client *ScalingPlansClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientGetOptions) (ScalingPlansClientGetResponse, error)
Get - Get a scaling plan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- options - ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlansClient().Get(ctx, "resourceGroup1", "scalingPlan1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlan = armdesktopvirtualization.ScalingPlan{ // Name: to.Ptr("workspace1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of scaling plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }
Output:
func (*ScalingPlansClient) NewListByHostPoolPager ¶
func (client *ScalingPlansClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *ScalingPlansClientListByHostPoolOptions) *runtime.Pager[ScalingPlansClientListByHostPoolResponse]
NewListByHostPoolPager - List scaling plan associated with hostpool.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.NewListByHostPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListByHostPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScalingPlansClient().NewListByHostPoolPager("resourceGroup1", "hostPool1", &armdesktopvirtualization.ScalingPlansClientListByHostPoolOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ScalingPlanList = armdesktopvirtualization.ScalingPlanList{ // Value: []*armdesktopvirtualization.ScalingPlan{ // { // Name: to.Ptr("scalingPlan1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of Scaling Plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }}, // } }
Output:
func (*ScalingPlansClient) NewListByResourceGroupPager ¶
func (client *ScalingPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *ScalingPlansClientListByResourceGroupOptions) *runtime.Pager[ScalingPlansClientListByResourceGroupResponse]
NewListByResourceGroupPager - List scaling plans.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScalingPlansClient().NewListByResourceGroupPager("resourceGroup1", &armdesktopvirtualization.ScalingPlansClientListByResourceGroupOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ScalingPlanList = armdesktopvirtualization.ScalingPlanList{ // Value: []*armdesktopvirtualization.ScalingPlan{ // { // Name: to.Ptr("scalingPlan1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of Scaling Plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }, // { // Name: to.Ptr("scalingPlan2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of Scaling Plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(false), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownStopHostsWhen: to.Ptr(armdesktopvirtualization.StopHostsWhenZeroSessions), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }}, // } }
Output:
func (*ScalingPlansClient) NewListBySubscriptionPager ¶
func (client *ScalingPlansClient) NewListBySubscriptionPager(options *ScalingPlansClientListBySubscriptionOptions) *runtime.Pager[ScalingPlansClientListBySubscriptionResponse]
NewListBySubscriptionPager - List scaling plans in subscription.
Generated from API version 2024-04-03
- options - ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScalingPlansClient().NewListBySubscriptionPager(&armdesktopvirtualization.ScalingPlansClientListBySubscriptionOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ScalingPlanList = armdesktopvirtualization.ScalingPlanList{ // Value: []*armdesktopvirtualization.ScalingPlan{ // { // Name: to.Ptr("scalingPlan1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of Scaling Plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }, // { // Name: to.Ptr("scalingPlan2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of Scaling Plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(false), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownStopHostsWhen: to.Ptr(armdesktopvirtualization.StopHostsWhenZeroActiveSessions), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }}, // } }
Output:
func (*ScalingPlansClient) Update ¶
func (client *ScalingPlansClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientUpdateOptions) (ScalingPlansClientUpdateResponse, error)
Update - Update a scaling plan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- scalingPlanName - The name of the scaling plan.
- options - ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScalingPlansClient().Update(ctx, "resourceGroup1", "scalingPlan1", &armdesktopvirtualization.ScalingPlansClientUpdateOptions{ScalingPlan: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScalingPlan = armdesktopvirtualization.ScalingPlan{ // Name: to.Ptr("scalingPlan1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/scalingPlans"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/scalingPlan1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.ScalingPlanProperties{ // Description: to.Ptr("Description of Scaling Plan"), // ExclusionTag: to.Ptr("value"), // FriendlyName: to.Ptr("Scaling Plan 1"), // HostPoolReferences: []*armdesktopvirtualization.ScalingHostPoolReference{ // { // HostPoolArmPath: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1"), // ScalingPlanEnabled: to.Ptr(true), // }}, // HostPoolType: to.Ptr(armdesktopvirtualization.ScalingHostPoolTypePooled), // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), // Schedules: []*armdesktopvirtualization.ScalingSchedule{ // { // Name: to.Ptr("schedule1"), // DaysOfWeek: []*armdesktopvirtualization.ScalingScheduleDaysOfWeekItem{ // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemMonday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemTuesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemWednesday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemThursday), // to.Ptr(armdesktopvirtualization.ScalingScheduleDaysOfWeekItemFriday)}, // OffPeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // OffPeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](20), // Minute: to.Ptr[int32](0), // }, // PeakLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmBreadthFirst), // PeakStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](8), // Minute: to.Ptr[int32](0), // }, // RampDownCapacityThresholdPct: to.Ptr[int32](50), // RampDownForceLogoffUsers: to.Ptr(true), // RampDownLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampDownMinimumHostsPct: to.Ptr[int32](20), // RampDownNotificationMessage: to.Ptr("message"), // RampDownStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](18), // Minute: to.Ptr[int32](0), // }, // RampDownWaitTimeMinutes: to.Ptr[int32](30), // RampUpCapacityThresholdPct: to.Ptr[int32](80), // RampUpLoadBalancingAlgorithm: to.Ptr(armdesktopvirtualization.SessionHostLoadBalancingAlgorithmDepthFirst), // RampUpMinimumHostsPct: to.Ptr[int32](20), // RampUpStartTime: &armdesktopvirtualization.Time{ // Hour: to.Ptr[int32](6), // Minute: to.Ptr[int32](0), // }, // }}, // TimeZone: to.Ptr("Central Standard Time"), // }, // }
Output:
type ScalingPlansClientCreateOptions ¶
type ScalingPlansClientCreateOptions struct { }
ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method.
type ScalingPlansClientCreateResponse ¶
type ScalingPlansClientCreateResponse struct { // Represents a scaling plan definition. ScalingPlan }
ScalingPlansClientCreateResponse contains the response from method ScalingPlansClient.Create.
type ScalingPlansClientDeleteOptions ¶
type ScalingPlansClientDeleteOptions struct { }
ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method.
type ScalingPlansClientDeleteResponse ¶
type ScalingPlansClientDeleteResponse struct { }
ScalingPlansClientDeleteResponse contains the response from method ScalingPlansClient.Delete.
type ScalingPlansClientGetOptions ¶
type ScalingPlansClientGetOptions struct { }
ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method.
type ScalingPlansClientGetResponse ¶
type ScalingPlansClientGetResponse struct { // Represents a scaling plan definition. ScalingPlan }
ScalingPlansClientGetResponse contains the response from method ScalingPlansClient.Get.
type ScalingPlansClientListByHostPoolOptions ¶
type ScalingPlansClientListByHostPoolOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.NewListByHostPoolPager method.
type ScalingPlansClientListByHostPoolResponse ¶
type ScalingPlansClientListByHostPoolResponse struct { // List of scaling plan definitions. ScalingPlanList }
ScalingPlansClientListByHostPoolResponse contains the response from method ScalingPlansClient.NewListByHostPoolPager.
type ScalingPlansClientListByResourceGroupOptions ¶
type ScalingPlansClientListByResourceGroupOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.NewListByResourceGroupPager method.
type ScalingPlansClientListByResourceGroupResponse ¶
type ScalingPlansClientListByResourceGroupResponse struct { // List of scaling plan definitions. ScalingPlanList }
ScalingPlansClientListByResourceGroupResponse contains the response from method ScalingPlansClient.NewListByResourceGroupPager.
type ScalingPlansClientListBySubscriptionOptions ¶
type ScalingPlansClientListBySubscriptionOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.NewListBySubscriptionPager method.
type ScalingPlansClientListBySubscriptionResponse ¶
type ScalingPlansClientListBySubscriptionResponse struct { // List of scaling plan definitions. ScalingPlanList }
ScalingPlansClientListBySubscriptionResponse contains the response from method ScalingPlansClient.NewListBySubscriptionPager.
type ScalingPlansClientUpdateOptions ¶
type ScalingPlansClientUpdateOptions struct { // Object containing scaling plan definitions. ScalingPlan *ScalingPlanPatch }
ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method.
type ScalingPlansClientUpdateResponse ¶
type ScalingPlansClientUpdateResponse struct { // Represents a scaling plan definition. ScalingPlan }
ScalingPlansClientUpdateResponse contains the response from method ScalingPlansClient.Update.
type ScalingSchedule ¶
type ScalingSchedule struct { // Set of days of the week on which this schedule is active. DaysOfWeek []*ScalingScheduleDaysOfWeekItem // Name of the ScalingPlanPooledSchedule. Name *string // Load balancing algorithm for off-peak period. OffPeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Starting time for off-peak period. OffPeakStartTime *Time // Load balancing algorithm for peak period. PeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Starting time for peak period. PeakStartTime *Time // Capacity threshold for ramp down period. RampDownCapacityThresholdPct *int32 // Should users be logged off forcefully from hosts. RampDownForceLogoffUsers *bool // Load balancing algorithm for ramp down period. RampDownLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Minimum host percentage for ramp down period. RampDownMinimumHostsPct *int32 // Notification message for users during ramp down period. RampDownNotificationMessage *string // Starting time for ramp down period. RampDownStartTime *Time // Specifies when to stop hosts during ramp down period. RampDownStopHostsWhen *StopHostsWhen // Number of minutes to wait to stop hosts during ramp down period. RampDownWaitTimeMinutes *int32 // Capacity threshold for ramp up period. RampUpCapacityThresholdPct *int32 // Load balancing algorithm for ramp up period. RampUpLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm // Minimum host percentage for ramp up period. RampUpMinimumHostsPct *int32 // Starting time for ramp up period. RampUpStartTime *Time }
ScalingSchedule - A ScalingPlanPooledSchedule.
func (ScalingSchedule) MarshalJSON ¶
func (s ScalingSchedule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScalingSchedule.
func (*ScalingSchedule) UnmarshalJSON ¶
func (s *ScalingSchedule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScalingSchedule.
type ScalingScheduleDaysOfWeekItem ¶
type ScalingScheduleDaysOfWeekItem string
const ( ScalingScheduleDaysOfWeekItemFriday ScalingScheduleDaysOfWeekItem = "Friday" ScalingScheduleDaysOfWeekItemMonday ScalingScheduleDaysOfWeekItem = "Monday" ScalingScheduleDaysOfWeekItemSaturday ScalingScheduleDaysOfWeekItem = "Saturday" ScalingScheduleDaysOfWeekItemSunday ScalingScheduleDaysOfWeekItem = "Sunday" ScalingScheduleDaysOfWeekItemThursday ScalingScheduleDaysOfWeekItem = "Thursday" ScalingScheduleDaysOfWeekItemTuesday ScalingScheduleDaysOfWeekItem = "Tuesday" ScalingScheduleDaysOfWeekItemWednesday ScalingScheduleDaysOfWeekItem = "Wednesday" )
func PossibleScalingScheduleDaysOfWeekItemValues ¶
func PossibleScalingScheduleDaysOfWeekItemValues() []ScalingScheduleDaysOfWeekItem
PossibleScalingScheduleDaysOfWeekItemValues returns the possible values for the ScalingScheduleDaysOfWeekItem const type.
type SendMessage ¶
type SendMessage struct { // Body of message. MessageBody *string // Title of message. MessageTitle *string }
SendMessage - Represents message sent to a UserSession.
func (SendMessage) MarshalJSON ¶
func (s SendMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SendMessage.
func (*SendMessage) UnmarshalJSON ¶
func (s *SendMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SendMessage.
type ServiceSpecification ¶
type ServiceSpecification struct { // Specifications of the Log for Azure Monitoring LogSpecifications []*LogSpecification }
ServiceSpecification - Service specification payload
func (ServiceSpecification) MarshalJSON ¶
func (s ServiceSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.
func (*ServiceSpecification) UnmarshalJSON ¶
func (s *ServiceSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.
type SessionHandlingOperation ¶ added in v2.1.0
type SessionHandlingOperation string
SessionHandlingOperation - Action to be taken after a user disconnect during the ramp up period.
const ( SessionHandlingOperationDeallocate SessionHandlingOperation = "Deallocate" SessionHandlingOperationHibernate SessionHandlingOperation = "Hibernate" SessionHandlingOperationNone SessionHandlingOperation = "None" )
func PossibleSessionHandlingOperationValues ¶ added in v2.1.0
func PossibleSessionHandlingOperationValues() []SessionHandlingOperation
PossibleSessionHandlingOperationValues returns the possible values for the SessionHandlingOperation const type.
type SessionHost ¶
type SessionHost struct { // Detailed properties for SessionHost Properties *SessionHostProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
SessionHost - Represents a SessionHost definition.
func (SessionHost) MarshalJSON ¶
func (s SessionHost) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SessionHost.
func (*SessionHost) UnmarshalJSON ¶
func (s *SessionHost) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SessionHost.
type SessionHostComponentUpdateType ¶
type SessionHostComponentUpdateType string
SessionHostComponentUpdateType - The type of maintenance for session host components.
const ( // SessionHostComponentUpdateTypeDefault - Agent and other agent side components are delivery schedule is controlled by WVD // Infra. SessionHostComponentUpdateTypeDefault SessionHostComponentUpdateType = "Default" // SessionHostComponentUpdateTypeScheduled - TenantAdmin have opted in for Scheduled Component Update feature. SessionHostComponentUpdateTypeScheduled SessionHostComponentUpdateType = "Scheduled" )
func PossibleSessionHostComponentUpdateTypeValues ¶
func PossibleSessionHostComponentUpdateTypeValues() []SessionHostComponentUpdateType
PossibleSessionHostComponentUpdateTypeValues returns the possible values for the SessionHostComponentUpdateType const type.
type SessionHostHealthCheckFailureDetails ¶
type SessionHostHealthCheckFailureDetails struct { // READ-ONLY; Error code corresponding for the failure. ErrorCode *int32 // READ-ONLY; The timestamp of the last update. LastHealthCheckDateTime *time.Time // READ-ONLY; Failure message: hints on what is wrong and how to recover. Message *string }
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 // READ-ONLY; Represents the name of the health check operation performed. HealthCheckName *HealthCheckName // READ-ONLY; Represents the Health state of the health check we performed. HealthCheckResult *HealthCheckResult }
SessionHostHealthCheckReport - The report for session host information.
func (SessionHostHealthCheckReport) MarshalJSON ¶
func (s SessionHostHealthCheckReport) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SessionHostHealthCheckReport.
func (*SessionHostHealthCheckReport) UnmarshalJSON ¶
func (s *SessionHostHealthCheckReport) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostHealthCheckReport.
type SessionHostList ¶
type SessionHostList struct { // List of SessionHost definitions. Value []*SessionHost // READ-ONLY; Link to the next page of results. NextLink *string }
SessionHostList - List of SessionHost definitions.
func (SessionHostList) MarshalJSON ¶
func (s SessionHostList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SessionHostList.
func (*SessionHostList) UnmarshalJSON ¶
func (s *SessionHostList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller 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.
type SessionHostPatch ¶
type SessionHostPatch struct { // Detailed properties for SessionHost Properties *SessionHostPatchProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
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.
func (*SessionHostPatch) UnmarshalJSON ¶
func (s *SessionHostPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostPatch.
type SessionHostPatchProperties ¶
type SessionHostPatchProperties struct { // Allow a new session. AllowNewSession *bool // User assigned to SessionHost. AssignedUser *string // Friendly name of SessionHost FriendlyName *string }
SessionHostPatchProperties - SessionHost properties that can be patched.
func (SessionHostPatchProperties) MarshalJSON ¶
func (s SessionHostPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SessionHostPatchProperties.
func (*SessionHostPatchProperties) UnmarshalJSON ¶
func (s *SessionHostPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostPatchProperties.
type SessionHostProperties ¶
type SessionHostProperties struct { // Version of agent on SessionHost. AgentVersion *string // Allow a new session. AllowNewSession *bool // User assigned to SessionHost. AssignedUser *string // Friendly name of SessionHost FriendlyName *string // Last heart beat from SessionHost. LastHeartBeat *time.Time // The version of the OS on the session host. OSVersion *string // Number of sessions on SessionHost. Sessions *int32 // Status for a SessionHost. Status *Status // The version of the side by side stack on the session host. SxSStackVersion *string // The error message. UpdateErrorMessage *string // Update state of a SessionHost. UpdateState *UpdateState // READ-ONLY; The timestamp of the last update. LastUpdateTime *time.Time // READ-ONLY; ObjectId of SessionHost. (internal use) ObjectID *string // READ-ONLY; Resource Id of SessionHost's underlying virtual machine. ResourceID *string // READ-ONLY; List of SessionHostHealthCheckReports SessionHostHealthCheckResults []*SessionHostHealthCheckReport // READ-ONLY; The timestamp of the status. StatusTimestamp *time.Time // READ-ONLY; Virtual Machine Id of SessionHost's underlying virtual machine. VirtualMachineID *string }
SessionHostProperties - Schema for SessionHost properties.
func (SessionHostProperties) MarshalJSON ¶
func (s SessionHostProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SessionHostProperties.
func (*SessionHostProperties) UnmarshalJSON ¶
func (s *SessionHostProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostProperties.
type SessionHostsClient ¶
type SessionHostsClient struct {
// contains filtered or unexported fields
}
SessionHostsClient contains the methods for the SessionHosts group. Don't use this type directly, use NewSessionHostsClient() instead.
func NewSessionHostsClient ¶
func NewSessionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SessionHostsClient, error)
NewSessionHostsClient creates a new instance of SessionHostsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SessionHostsClient) Delete ¶
func (client *SessionHostsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientDeleteOptions) (SessionHostsClientDeleteResponse, error)
Delete - Remove a SessionHost. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- options - SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSessionHostsClient().Delete(ctx, "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", &armdesktopvirtualization.SessionHostsClientDeleteOptions{Force: to.Ptr(true)}) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*SessionHostsClient) Get ¶
func (client *SessionHostsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientGetOptions) (SessionHostsClientGetResponse, error)
Get - Get a session host. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- options - SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSessionHostsClient().Get(ctx, "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SessionHost = armdesktopvirtualization.SessionHost{ // Name: to.Ptr("sessionHost1.microsoft.com"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionHosts"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.SessionHostProperties{ // AgentVersion: to.Ptr("1.0.0.1391"), // AllowNewSession: to.Ptr(true), // AssignedUser: to.Ptr("user1@microsoft.com"), // FriendlyName: to.Ptr("friendly"), // LastHeartBeat: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // LastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // OSVersion: to.Ptr("10.0.17763"), // ResourceID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.Compute/virtualMachines/sessionHost1"), // SessionHostHealthCheckResults: []*armdesktopvirtualization.SessionHostHealthCheckReport{ // { // AdditionalFailureDetails: &armdesktopvirtualization.SessionHostHealthCheckFailureDetails{ // ErrorCode: to.Ptr[int32](0), // LastHealthCheckDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-14T02:09:37.623Z"); return t}()), // Message: to.Ptr("SessionHost healthy: is joined to domain ≤wvdarmtest1.net≥"), // }, // HealthCheckName: to.Ptr(armdesktopvirtualization.HealthCheckNameDomainJoinedCheck), // HealthCheckResult: to.Ptr(armdesktopvirtualization.HealthCheckResultHealthCheckSucceeded), // }}, // Sessions: to.Ptr[int32](1), // Status: to.Ptr(armdesktopvirtualization.StatusAvailable), // StatusTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // SxSStackVersion: to.Ptr("rdp-sxs190816002"), // UpdateErrorMessage: to.Ptr(""), // UpdateState: to.Ptr(armdesktopvirtualization.UpdateStateSucceeded), // VirtualMachineID: to.Ptr("29491b54-c033-4dec-b09a-18bf0ebafaef"), // }, // }
Output:
func (*SessionHostsClient) NewListPager ¶
func (client *SessionHostsClient) NewListPager(resourceGroupName string, hostPoolName string, options *SessionHostsClientListOptions) *runtime.Pager[SessionHostsClientListResponse]
NewListPager - List sessionHosts.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSessionHostsClient().NewListPager("resourceGroup1", "hostPool1", &armdesktopvirtualization.SessionHostsClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SessionHostList = armdesktopvirtualization.SessionHostList{ // Value: []*armdesktopvirtualization.SessionHost{ // { // Name: to.Ptr("sessionHost1.microsoft.com"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionhosts"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.SessionHostProperties{ // AgentVersion: to.Ptr("1.0.0.1391"), // AllowNewSession: to.Ptr(true), // AssignedUser: to.Ptr("user1@microsoft.com"), // FriendlyName: to.Ptr("friendly"), // LastHeartBeat: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // LastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // OSVersion: to.Ptr("10.0.17763"), // ResourceID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.Compute/virtualMachines/sessionHost1"), // SessionHostHealthCheckResults: []*armdesktopvirtualization.SessionHostHealthCheckReport{ // { // AdditionalFailureDetails: &armdesktopvirtualization.SessionHostHealthCheckFailureDetails{ // ErrorCode: to.Ptr[int32](0), // LastHealthCheckDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-14T02:09:37.623Z"); return t}()), // Message: to.Ptr("SessionHost healthy: is joined to domain ≤wvdarmtest1.net≥"), // }, // HealthCheckName: to.Ptr(armdesktopvirtualization.HealthCheckNameDomainJoinedCheck), // HealthCheckResult: to.Ptr(armdesktopvirtualization.HealthCheckResultHealthCheckSucceeded), // }}, // Sessions: to.Ptr[int32](1), // Status: to.Ptr(armdesktopvirtualization.StatusAvailable), // StatusTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // SxSStackVersion: to.Ptr("rdp-sxs190816002"), // UpdateErrorMessage: to.Ptr(""), // UpdateState: to.Ptr(armdesktopvirtualization.UpdateStateSucceeded), // VirtualMachineID: to.Ptr("29491b54-c033-4dec-b09a-18bf0ebafaef"), // }, // }, // { // Name: to.Ptr("sessionHost2.microsoft.com"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionhosts"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost2microsoft.com"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.SessionHostProperties{ // AgentVersion: to.Ptr("1.0.0.1391"), // AllowNewSession: to.Ptr(true), // AssignedUser: to.Ptr("user2@microsoft.com"), // FriendlyName: to.Ptr("friendly"), // LastHeartBeat: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // LastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // OSVersion: to.Ptr("10.0.17763"), // ResourceID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.Compute/virtualMachines/sessionHost2"), // SessionHostHealthCheckResults: []*armdesktopvirtualization.SessionHostHealthCheckReport{ // { // AdditionalFailureDetails: &armdesktopvirtualization.SessionHostHealthCheckFailureDetails{ // ErrorCode: to.Ptr[int32](0), // LastHealthCheckDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-14T02:09:37.623Z"); return t}()), // Message: to.Ptr("SessionHost healthy: is joined to domain ≤wvdarmtest1.net≥"), // }, // HealthCheckName: to.Ptr(armdesktopvirtualization.HealthCheckNameDomainJoinedCheck), // HealthCheckResult: to.Ptr(armdesktopvirtualization.HealthCheckResultHealthCheckSucceeded), // }}, // Sessions: to.Ptr[int32](1), // Status: to.Ptr(armdesktopvirtualization.StatusAvailable), // StatusTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // SxSStackVersion: to.Ptr("rdp-sxs190816002"), // UpdateErrorMessage: to.Ptr(""), // UpdateState: to.Ptr(armdesktopvirtualization.UpdateStateSucceeded), // VirtualMachineID: to.Ptr("39491b54-c033-4dec-b09a-18bf0ebafaef"), // }, // }}, // } }
Output:
func (*SessionHostsClient) Update ¶
func (client *SessionHostsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientUpdateOptions) (SessionHostsClientUpdateResponse, error)
Update - Update a session host. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- options - SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSessionHostsClient().Update(ctx, "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", &armdesktopvirtualization.SessionHostsClientUpdateOptions{Force: to.Ptr(true), SessionHost: &armdesktopvirtualization.SessionHostPatch{ Properties: &armdesktopvirtualization.SessionHostPatchProperties{ AllowNewSession: to.Ptr(true), AssignedUser: to.Ptr("user1@microsoft.com"), FriendlyName: to.Ptr("friendly"), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SessionHost = armdesktopvirtualization.SessionHost{ // Name: to.Ptr("sessionHost1.microsoft.com"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionhosts"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.SessionHostProperties{ // AgentVersion: to.Ptr("1.0.0.1391"), // AllowNewSession: to.Ptr(true), // AssignedUser: to.Ptr("user1@microsoft.com"), // FriendlyName: to.Ptr("friendly"), // LastHeartBeat: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-11T19:27:13.610Z"); return t}()), // LastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // OSVersion: to.Ptr("10.0.17763"), // ResourceID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.Compute/virtualMachines/sessionHost1"), // SessionHostHealthCheckResults: []*armdesktopvirtualization.SessionHostHealthCheckReport{ // { // AdditionalFailureDetails: &armdesktopvirtualization.SessionHostHealthCheckFailureDetails{ // ErrorCode: to.Ptr[int32](0), // LastHealthCheckDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-14T02:09:37.623Z"); return t}()), // Message: to.Ptr("SessionHost healthy: is joined to domain ≤wvdarmtest1.net≥"), // }, // HealthCheckName: to.Ptr(armdesktopvirtualization.HealthCheckNameDomainJoinedCheck), // HealthCheckResult: to.Ptr(armdesktopvirtualization.HealthCheckResultHealthCheckSucceeded), // }}, // Sessions: to.Ptr[int32](1), // Status: to.Ptr(armdesktopvirtualization.StatusAvailable), // StatusTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-24T20:00:08.289Z"); return t}()), // SxSStackVersion: to.Ptr("rdp-sxs190816002"), // UpdateErrorMessage: to.Ptr(""), // UpdateState: to.Ptr(armdesktopvirtualization.UpdateStateSucceeded), // VirtualMachineID: to.Ptr("29491b54-c033-4dec-b09a-18bf0ebafaef"), // }, // }
Output:
type SessionHostsClientDeleteOptions ¶
type SessionHostsClientDeleteOptions struct { // Force flag to force sessionHost deletion even when userSession exists. Force *bool }
SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method.
type SessionHostsClientDeleteResponse ¶
type SessionHostsClientDeleteResponse struct { }
SessionHostsClientDeleteResponse contains the response from method SessionHostsClient.Delete.
type SessionHostsClientGetOptions ¶
type SessionHostsClientGetOptions struct { }
SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method.
type SessionHostsClientGetResponse ¶
type SessionHostsClientGetResponse struct { // Represents a SessionHost definition. SessionHost }
SessionHostsClientGetResponse contains the response from method SessionHostsClient.Get.
type SessionHostsClientListOptions ¶
type SessionHostsClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.NewListPager method.
type SessionHostsClientListResponse ¶
type SessionHostsClientListResponse struct { // List of SessionHost definitions. SessionHostList }
SessionHostsClientListResponse contains the response from method SessionHostsClient.NewListPager.
type SessionHostsClientUpdateOptions ¶
type SessionHostsClientUpdateOptions struct { // Force flag to update assign, unassign or reassign personal desktop. Force *bool // Object containing SessionHost definitions. SessionHost *SessionHostPatch }
SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method.
type SessionHostsClientUpdateResponse ¶
type SessionHostsClientUpdateResponse struct { // Represents a SessionHost definition. SessionHost }
SessionHostsClientUpdateResponse contains the response from method SessionHostsClient.Update.
type SessionState ¶
type SessionState string
SessionState - State of user session.
const ( SessionStateActive SessionState = "Active" SessionStateDisconnected SessionState = "Disconnected" SessionStateLogOff SessionState = "LogOff" SessionStatePending SessionState = "Pending" SessionStateUnknown SessionState = "Unknown" SessionStateUserProfileDiskMounted SessionState = "UserProfileDiskMounted" )
func PossibleSessionStateValues ¶
func PossibleSessionStateValues() []SessionState
PossibleSessionStateValues returns the possible values for the SessionState const type.
type SetStartVMOnConnect ¶ added in v2.1.0
type SetStartVMOnConnect string
SetStartVMOnConnect - The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually.
const ( SetStartVMOnConnectDisable SetStartVMOnConnect = "Disable" SetStartVMOnConnectEnable SetStartVMOnConnect = "Enable" )
func PossibleSetStartVMOnConnectValues ¶ added in v2.1.0
func PossibleSetStartVMOnConnectValues() []SetStartVMOnConnect
PossibleSetStartVMOnConnectValues returns the possible values for the SetStartVMOnConnect const type.
type StartMenuItem ¶
type StartMenuItem struct { // Detailed properties for StartMenuItem Properties *StartMenuItemProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
StartMenuItem - Represents a StartMenuItem definition.
func (StartMenuItem) MarshalJSON ¶
func (s StartMenuItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StartMenuItem.
func (*StartMenuItem) UnmarshalJSON ¶
func (s *StartMenuItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StartMenuItem.
type StartMenuItemList ¶
type StartMenuItemList struct { // List of StartMenuItem definitions. Value []*StartMenuItem // READ-ONLY; Link to the next page of results. NextLink *string }
StartMenuItemList - List of StartMenuItem definitions.
func (StartMenuItemList) MarshalJSON ¶
func (s StartMenuItemList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StartMenuItemList.
func (*StartMenuItemList) UnmarshalJSON ¶
func (s *StartMenuItemList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StartMenuItemList.
type StartMenuItemProperties ¶
type StartMenuItemProperties struct { // Alias of StartMenuItem. AppAlias *string // Command line arguments for StartMenuItem. CommandLineArguments *string // Path to the file of StartMenuItem. FilePath *string // Index of the icon. IconIndex *int32 // Path to the icon. IconPath *string }
StartMenuItemProperties - Schema for StartMenuItem properties.
func (StartMenuItemProperties) MarshalJSON ¶
func (s StartMenuItemProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StartMenuItemProperties.
func (*StartMenuItemProperties) UnmarshalJSON ¶
func (s *StartMenuItemProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StartMenuItemProperties.
type StartMenuItemsClient ¶
type StartMenuItemsClient struct {
// contains filtered or unexported fields
}
StartMenuItemsClient contains the methods for the StartMenuItems group. Don't use this type directly, use NewStartMenuItemsClient() instead.
func NewStartMenuItemsClient ¶
func NewStartMenuItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StartMenuItemsClient, error)
NewStartMenuItemsClient creates a new instance of StartMenuItemsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StartMenuItemsClient) NewListPager ¶
func (client *StartMenuItemsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *StartMenuItemsClientListOptions) *runtime.Pager[StartMenuItemsClientListResponse]
NewListPager - List start menu items in the given application group.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- applicationGroupName - The name of the application group
- options - StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/StartMenuItem_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStartMenuItemsClient().NewListPager("resourceGroup1", "applicationGroup1", &armdesktopvirtualization.StartMenuItemsClientListOptions{PageSize: nil, IsDescending: nil, InitialSkip: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.StartMenuItemList = armdesktopvirtualization.StartMenuItemList{ // Value: []*armdesktopvirtualization.StartMenuItem{ // { // Name: to.Ptr("application1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/startMenuItems"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/startMenuItem/application1"), // Properties: &armdesktopvirtualization.StartMenuItemProperties{ // AppAlias: to.Ptr("word"), // CommandLineArguments: to.Ptr("arguments"), // FilePath: to.Ptr("/path/to/file"), // IconIndex: to.Ptr[int32](1), // IconPath: to.Ptr("/path/to/icon"), // }, // }, // { // Name: to.Ptr("application2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/applicationGroups/startMenuItems"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/applicationGroup1/startMenuItem/application2"), // Properties: &armdesktopvirtualization.StartMenuItemProperties{ // AppAlias: to.Ptr("excel"), // CommandLineArguments: to.Ptr("arguments"), // FilePath: to.Ptr("/path/to/file"), // IconIndex: to.Ptr[int32](1), // IconPath: to.Ptr("/path/to/icon"), // }, // }}, // } }
Output:
type StartMenuItemsClientListOptions ¶
type StartMenuItemsClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.NewListPager method.
type StartMenuItemsClientListResponse ¶
type StartMenuItemsClientListResponse struct { // List of StartMenuItem definitions. StartMenuItemList }
StartMenuItemsClientListResponse contains the response from method StartMenuItemsClient.NewListPager.
type StartupBehavior ¶ added in v2.1.0
type StartupBehavior string
StartupBehavior - The desired startup behavior during the ramp up period for personal vms in the hostpool.
const ( // StartupBehaviorAll - All personal session hosts in the hostpool will be started during ramp up. StartupBehaviorAll StartupBehavior = "All" // StartupBehaviorNone - Session hosts will not be started by the service. This setting depends on Start VM on Connect to // be enabled to start the session hosts. StartupBehaviorNone StartupBehavior = "None" // StartupBehaviorWithAssignedUser - Session hosts with an assigned user will be started during Ramp Up StartupBehaviorWithAssignedUser StartupBehavior = "WithAssignedUser" )
func PossibleStartupBehaviorValues ¶ added in v2.1.0
func PossibleStartupBehaviorValues() []StartupBehavior
PossibleStartupBehaviorValues returns the possible values for the StartupBehavior const type.
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" // to be able to route connections to this session host. Note this replaces previous 'NoHeartBeat' status. StatusUnavailable Status = "Unavailable" // StatusUpgradeFailed - Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, etc.) // failed. StatusUpgradeFailed Status = "UpgradeFailed" // StatusUpgrading - Session Host is unavailable because currently an upgrade of RDAgent/side-by-side stack is in progress. // Note: this state will be removed once the upgrade completes and the host is able to accept connections. StatusUpgrading Status = "Upgrading" )
func PossibleStatusValues ¶
func PossibleStatusValues() []Status
PossibleStatusValues returns the possible values for the Status const type.
type StopHostsWhen ¶
type StopHostsWhen string
StopHostsWhen - Specifies when to stop hosts during ramp down period.
const ( StopHostsWhenZeroActiveSessions StopHostsWhen = "ZeroActiveSessions" StopHostsWhenZeroSessions StopHostsWhen = "ZeroSessions" )
func PossibleStopHostsWhenValues ¶
func PossibleStopHostsWhenValues() []StopHostsWhen
PossibleStopHostsWhenValues returns the possible values for the StopHostsWhen const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
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 ¶
Time - The time for a scaling action to occur.
func (Time) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Time.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Time.
type UpdateState ¶
type UpdateState string
UpdateState - Update state of a SessionHost.
const ( UpdateStateFailed UpdateState = "Failed" UpdateStateInitial UpdateState = "Initial" UpdateStatePending UpdateState = "Pending" UpdateStateStarted UpdateState = "Started" UpdateStateSucceeded UpdateState = "Succeeded" )
func PossibleUpdateStateValues ¶
func PossibleUpdateStateValues() []UpdateState
PossibleUpdateStateValues returns the possible values for the UpdateState const type.
type UserSession ¶
type UserSession struct { // Detailed properties for UserSession Properties *UserSessionProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
UserSession - Represents a UserSession definition.
func (UserSession) MarshalJSON ¶
func (u UserSession) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserSession.
func (*UserSession) UnmarshalJSON ¶
func (u *UserSession) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserSession.
type UserSessionList ¶
type UserSessionList struct { // List of UserSession definitions. Value []*UserSession // READ-ONLY; Link to the next page of results. NextLink *string }
UserSessionList - List of UserSession definitions.
func (UserSessionList) MarshalJSON ¶
func (u UserSessionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserSessionList.
func (*UserSessionList) UnmarshalJSON ¶
func (u *UserSessionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserSessionList.
type UserSessionProperties ¶
type UserSessionProperties struct { // The active directory user name. ActiveDirectoryUserName *string // Application type of application. ApplicationType *ApplicationType // The timestamp of the user session create. CreateTime *time.Time // State of user session. SessionState *SessionState // The user principal name. UserPrincipalName *string // READ-ONLY; ObjectId of user session. (internal use) ObjectID *string }
UserSessionProperties - Schema for UserSession properties.
func (UserSessionProperties) MarshalJSON ¶
func (u UserSessionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserSessionProperties.
func (*UserSessionProperties) UnmarshalJSON ¶
func (u *UserSessionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserSessionProperties.
type UserSessionsClient ¶
type UserSessionsClient struct {
// contains filtered or unexported fields
}
UserSessionsClient contains the methods for the UserSessions group. Don't use this type directly, use NewUserSessionsClient() instead.
func NewUserSessionsClient ¶
func NewUserSessionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserSessionsClient, error)
NewUserSessionsClient creates a new instance of UserSessionsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*UserSessionsClient) Delete ¶
func (client *UserSessionsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDeleteOptions) (UserSessionsClientDeleteResponse, error)
Delete - Remove a userSession. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- userSessionID - The name of the user session within the specified session host
- options - UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewUserSessionsClient().Delete(ctx, "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", &armdesktopvirtualization.UserSessionsClientDeleteOptions{Force: to.Ptr(true)}) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*UserSessionsClient) Disconnect ¶
func (client *UserSessionsClient) Disconnect(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDisconnectOptions) (UserSessionsClientDisconnectResponse, error)
Disconnect - Disconnect a userSession. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- userSessionID - The name of the user session within the specified session host
- options - UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Disconnect_Post.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewUserSessionsClient().Disconnect(ctx, "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*UserSessionsClient) Get ¶
func (client *UserSessionsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientGetOptions) (UserSessionsClientGetResponse, error)
Get - Get a userSession. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- userSessionID - The name of the user session within the specified session host
- options - UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewUserSessionsClient().Get(ctx, "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.UserSession = armdesktopvirtualization.UserSession{ // Name: to.Ptr("1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionHosts/userSessions"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com/userSessions/1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.UserSessionProperties{ // ActiveDirectoryUserName: to.Ptr("WVDARM\\user1"), // ApplicationType: to.Ptr(armdesktopvirtualization.ApplicationTypeDesktop), // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // SessionState: to.Ptr(armdesktopvirtualization.SessionStateActive), // UserPrincipalName: to.Ptr("user1@microsoft.com"), // }, // }
Output:
func (*UserSessionsClient) NewListByHostPoolPager ¶
func (client *UserSessionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *UserSessionsClientListByHostPoolOptions) *runtime.Pager[UserSessionsClientListByHostPoolResponse]
NewListByHostPoolPager - List userSessions.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- options - UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.NewListByHostPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_ListByHostPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUserSessionsClient().NewListByHostPoolPager("resourceGroup1", "hostPool1", &armdesktopvirtualization.UserSessionsClientListByHostPoolOptions{Filter: to.Ptr("userPrincipalName eq 'user1@microsoft.com' and state eq 'active'"), PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UserSessionList = armdesktopvirtualization.UserSessionList{ // Value: []*armdesktopvirtualization.UserSession{ // { // Name: to.Ptr("1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionHosts/userSessions"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com/userSessions/1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.UserSessionProperties{ // ActiveDirectoryUserName: to.Ptr("WVDARM\\user1"), // ApplicationType: to.Ptr(armdesktopvirtualization.ApplicationTypeDesktop), // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // SessionState: to.Ptr(armdesktopvirtualization.SessionStateActive), // UserPrincipalName: to.Ptr("user1@microsoft.com"), // }, // }, // { // Name: to.Ptr("2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionHosts/userSessions"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com/userSessions/2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.UserSessionProperties{ // ActiveDirectoryUserName: to.Ptr("WVDARM\\user1"), // ApplicationType: to.Ptr(armdesktopvirtualization.ApplicationTypeDesktop), // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // SessionState: to.Ptr(armdesktopvirtualization.SessionStateActive), // UserPrincipalName: to.Ptr("user1@microsoft.com"), // }, // }}, // } }
Output:
func (*UserSessionsClient) NewListPager ¶
func (client *UserSessionsClient) NewListPager(resourceGroupName string, hostPoolName string, sessionHostName string, options *UserSessionsClientListOptions) *runtime.Pager[UserSessionsClientListResponse]
NewListPager - List userSessions.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- options - UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUserSessionsClient().NewListPager("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", &armdesktopvirtualization.UserSessionsClientListOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UserSessionList = armdesktopvirtualization.UserSessionList{ // Value: []*armdesktopvirtualization.UserSession{ // { // Name: to.Ptr("1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionHosts/userSessions"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com/userSessions/1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.UserSessionProperties{ // ActiveDirectoryUserName: to.Ptr("WVDARM\\user1"), // ApplicationType: to.Ptr(armdesktopvirtualization.ApplicationTypeDesktop), // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // SessionState: to.Ptr(armdesktopvirtualization.SessionStateActive), // UserPrincipalName: to.Ptr("user1@microsoft.com"), // }, // }, // { // Name: to.Ptr("2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/hostPools/sessionHosts/userSessions"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1/sessionHosts/sessionHost1.microsoft.com/userSessions/2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Properties: &armdesktopvirtualization.UserSessionProperties{ // ActiveDirectoryUserName: to.Ptr("WVDARM\\user1"), // ApplicationType: to.Ptr(armdesktopvirtualization.ApplicationTypeDesktop), // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2008-09-22T14:01:54.957Z"); return t}()), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // SessionState: to.Ptr(armdesktopvirtualization.SessionStateActive), // UserPrincipalName: to.Ptr("user1@microsoft.com"), // }, // }}, // } }
Output:
func (*UserSessionsClient) SendMessage ¶
func (client *UserSessionsClient) SendMessage(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientSendMessageOptions) (UserSessionsClientSendMessageResponse, error)
SendMessage - Send a message to a user. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- hostPoolName - The name of the host pool within the specified resource group
- sessionHostName - The name of the session host within the specified host pool
- userSessionID - The name of the user session within the specified session host
- options - UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_SendMessage_Post.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewUserSessionsClient().SendMessage(ctx, "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", &armdesktopvirtualization.UserSessionsClientSendMessageOptions{SendMessage: &armdesktopvirtualization.SendMessage{ MessageBody: to.Ptr("body"), MessageTitle: to.Ptr("title"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type UserSessionsClientDeleteOptions ¶
type UserSessionsClientDeleteOptions struct { // Force flag to login off userSession. Force *bool }
UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method.
type UserSessionsClientDeleteResponse ¶
type UserSessionsClientDeleteResponse struct { }
UserSessionsClientDeleteResponse contains the response from method UserSessionsClient.Delete.
type UserSessionsClientDisconnectOptions ¶
type UserSessionsClientDisconnectOptions struct { }
UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method.
type UserSessionsClientDisconnectResponse ¶
type UserSessionsClientDisconnectResponse struct { }
UserSessionsClientDisconnectResponse contains the response from method UserSessionsClient.Disconnect.
type UserSessionsClientGetOptions ¶
type UserSessionsClientGetOptions struct { }
UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method.
type UserSessionsClientGetResponse ¶
type UserSessionsClientGetResponse struct { // Represents a UserSession definition. UserSession }
UserSessionsClientGetResponse contains the response from method UserSessionsClient.Get.
type UserSessionsClientListByHostPoolOptions ¶
type UserSessionsClientListByHostPoolOptions struct { // OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. Filter *string // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.NewListByHostPoolPager method.
type UserSessionsClientListByHostPoolResponse ¶
type UserSessionsClientListByHostPoolResponse struct { // List of UserSession definitions. UserSessionList }
UserSessionsClientListByHostPoolResponse contains the response from method UserSessionsClient.NewListByHostPoolPager.
type UserSessionsClientListOptions ¶
type UserSessionsClientListOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.NewListPager method.
type UserSessionsClientListResponse ¶
type UserSessionsClientListResponse struct { // List of UserSession definitions. UserSessionList }
UserSessionsClientListResponse contains the response from method UserSessionsClient.NewListPager.
type UserSessionsClientSendMessageOptions ¶
type UserSessionsClientSendMessageOptions struct { // Object containing message includes title and message body SendMessage *SendMessage }
UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage method.
type UserSessionsClientSendMessageResponse ¶
type UserSessionsClientSendMessageResponse struct { }
UserSessionsClientSendMessageResponse contains the response from method UserSessionsClient.SendMessage.
type Workspace ¶
type Workspace struct { // REQUIRED; The geo-location where the resource lives Location *string Identity *ResourceModelWithAllowedPropertySetIdentity // 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 // 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 Plan *ResourceModelWithAllowedPropertySetPlan // Detailed properties for Workspace Properties *WorkspaceProperties SKU *ResourceModelWithAllowedPropertySetSKU // Resource tags. Tags map[string]*string // 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 // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Workspace - Represents a Workspace definition.
func (Workspace) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Workspace.
func (*Workspace) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Workspace.
type WorkspaceList ¶
type WorkspaceList struct { // List of Workspace definitions. Value []*Workspace // READ-ONLY; Link to the next page of results. NextLink *string }
WorkspaceList - List of Workspace definitions.
func (WorkspaceList) MarshalJSON ¶
func (w WorkspaceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkspaceList.
func (*WorkspaceList) UnmarshalJSON ¶
func (w *WorkspaceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceList.
type WorkspacePatch ¶
type WorkspacePatch struct { // Detailed properties for Workspace Properties *WorkspacePatchProperties // tags to be updated Tags map[string]*string }
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.
func (*WorkspacePatch) UnmarshalJSON ¶
func (w *WorkspacePatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatch.
type WorkspacePatchProperties ¶
type WorkspacePatchProperties struct { // List of applicationGroup links. ApplicationGroupReferences []*string // Description of Workspace. Description *string // Friendly name of Workspace. FriendlyName *string // Enabled to allow this resource to be access from the public network PublicNetworkAccess *PublicNetworkAccess }
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.
func (*WorkspacePatchProperties) UnmarshalJSON ¶
func (w *WorkspacePatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatchProperties.
type WorkspaceProperties ¶
type WorkspaceProperties struct { // List of applicationGroup resource Ids. ApplicationGroupReferences []*string // Description of Workspace. Description *string // Friendly name of Workspace. FriendlyName *string // 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 // READ-ONLY; Is cloud pc resource. CloudPcResource *bool // READ-ONLY; ObjectId of Workspace. (internal use) ObjectID *string // READ-ONLY; List of private endpoint connection associated with the specified resource PrivateEndpointConnections []*PrivateEndpointConnection }
WorkspaceProperties - Schema for Workspace properties.
func (WorkspaceProperties) MarshalJSON ¶
func (w WorkspaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties.
func (*WorkspaceProperties) UnmarshalJSON ¶
func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceProperties.
type WorkspacesClient ¶
type WorkspacesClient struct {
// contains filtered or unexported fields
}
WorkspacesClient contains the methods for the Workspaces group. Don't use this type directly, use NewWorkspacesClient() instead.
func NewWorkspacesClient ¶
func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error)
NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*WorkspacesClient) CreateOrUpdate ¶
func (client *WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientCreateOrUpdateOptions) (WorkspacesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- workspace - Object containing Workspace definitions.
- options - WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Create.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkspacesClient().CreateOrUpdate(ctx, "resourceGroup1", "workspace1", armdesktopvirtualization.Workspace{ Location: to.Ptr("centralus"), Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, Properties: &armdesktopvirtualization.WorkspaceProperties{ Description: to.Ptr("des1"), FriendlyName: to.Ptr("friendly"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Workspace = armdesktopvirtualization.Workspace{ // Name: to.Ptr("workspace1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.WorkspaceProperties{ // Description: to.Ptr("des1"), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }
Output:
func (*WorkspacesClient) Delete ¶
func (client *WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientDeleteOptions) (WorkspacesClientDeleteResponse, error)
Delete - Remove a workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- options - WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewWorkspacesClient().Delete(ctx, "resourceGroup1", "workspace1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*WorkspacesClient) Get ¶
func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error)
Get - Get a workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkspacesClient().Get(ctx, "resourceGroup1", "workspace1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Workspace = armdesktopvirtualization.Workspace{ // Name: to.Ptr("workspace1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.WorkspaceProperties{ // Description: to.Ptr("des1"), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }
Output:
func (*WorkspacesClient) NewListByResourceGroupPager ¶
func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse]
NewListByResourceGroupPager - List workspaces.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("resourceGroup1", &armdesktopvirtualization.WorkspacesClientListByResourceGroupOptions{PageSize: to.Ptr[int32](10), IsDescending: to.Ptr(true), InitialSkip: to.Ptr[int32](0), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.WorkspaceList = armdesktopvirtualization.WorkspaceList{ // Value: []*armdesktopvirtualization.Workspace{ // { // Name: to.Ptr("workspace1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.WorkspaceProperties{ // Description: to.Ptr("des1"), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }, // { // Name: to.Ptr("workspace2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.WorkspaceProperties{ // Description: to.Ptr("des1"), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }}, // } }
Output:
func (*WorkspacesClient) NewListBySubscriptionPager ¶
func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse]
NewListBySubscriptionPager - List workspaces in subscription.
Generated from API version 2024-04-03
- options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_ListBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewWorkspacesClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.WorkspaceList = armdesktopvirtualization.WorkspaceList{ // Value: []*armdesktopvirtualization.Workspace{ // { // Name: to.Ptr("workspace1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.WorkspaceProperties{ // Description: to.Ptr("des1"), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }, // { // Name: to.Ptr("workspace2"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace2"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.WorkspaceProperties{ // Description: to.Ptr("des1"), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }}, // } }
Output:
func (*WorkspacesClient) Update ¶
func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientUpdateOptions) (WorkspacesClientUpdateResponse, error)
Update - Update a workspace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-03
- resourceGroupName - The name of the resource group. The name is case insensitive.
- workspaceName - The name of the workspace
- options - WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdesktopvirtualization.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkspacesClient().Update(ctx, "resourceGroup1", "workspace1", &armdesktopvirtualization.WorkspacesClientUpdateOptions{Workspace: &armdesktopvirtualization.WorkspacePatch{ Properties: &armdesktopvirtualization.WorkspacePatchProperties{ Description: to.Ptr("des1"), FriendlyName: to.Ptr("friendly"), }, Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Workspace = armdesktopvirtualization.Workspace{ // Name: to.Ptr("workspace1"), // Type: to.Ptr("Microsoft.DesktopVirtualization/workspaces"), // ID: to.Ptr("/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/workspaces/workspace1"), // SystemData: &armdesktopvirtualization.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armdesktopvirtualization.CreatedByTypeUser), // }, // Location: to.Ptr("centralus"), // Tags: map[string]*string{ // "key1": to.Ptr("value1"), // "key2": to.Ptr("value2"), // }, // Properties: &armdesktopvirtualization.WorkspaceProperties{ // Description: to.Ptr("des1"), // CloudPcResource: to.Ptr(false), // FriendlyName: to.Ptr("friendly"), // ObjectID: to.Ptr("7877fb31-4bde-49fd-9df3-c046e0ec5325"), // }, // }
Output:
type WorkspacesClientCreateOrUpdateOptions ¶
type WorkspacesClientCreateOrUpdateOptions struct { }
WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate method.
type WorkspacesClientCreateOrUpdateResponse ¶
type WorkspacesClientCreateOrUpdateResponse struct { // Represents a Workspace definition. Workspace }
WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.CreateOrUpdate.
type WorkspacesClientDeleteOptions ¶
type WorkspacesClientDeleteOptions struct { }
WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method.
type WorkspacesClientDeleteResponse ¶
type WorkspacesClientDeleteResponse struct { }
WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete.
type WorkspacesClientGetOptions ¶
type WorkspacesClientGetOptions struct { }
WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.
type WorkspacesClientGetResponse ¶
type WorkspacesClientGetResponse struct { // Represents a Workspace definition. Workspace }
WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get.
type WorkspacesClientListByResourceGroupOptions ¶
type WorkspacesClientListByResourceGroupOptions struct { // Initial number of items to skip. InitialSkip *int32 // Indicates whether the collection is descending. IsDescending *bool // Number of items per page. PageSize *int32 }
WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager method.
type WorkspacesClientListByResourceGroupResponse ¶
type WorkspacesClientListByResourceGroupResponse struct { // List of Workspace definitions. WorkspaceList }
WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager.
type WorkspacesClientListBySubscriptionOptions ¶
type WorkspacesClientListBySubscriptionOptions struct { }
WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager method.
type WorkspacesClientListBySubscriptionResponse ¶
type WorkspacesClientListBySubscriptionResponse struct { // List of Workspace definitions. WorkspaceList }
WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.NewListBySubscriptionPager.
type WorkspacesClientUpdateOptions ¶
type WorkspacesClientUpdateOptions struct { // Object containing Workspace definitions. Workspace *WorkspacePatch }
WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method.
type WorkspacesClientUpdateResponse ¶
type WorkspacesClientUpdateResponse struct { // Represents a Workspace definition. Workspace }
WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update.
Source Files ¶
- appattachpackage_client.go
- appattachpackageinfo_client.go
- applicationgroups_client.go
- applications_client.go
- build.go
- client_factory.go
- constants.go
- desktops_client.go
- hostpools_client.go
- models.go
- models_serde.go
- msiximages_client.go
- msixpackages_client.go
- operations_client.go
- options.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- responses.go
- scalingplanpersonalschedules_client.go
- scalingplanpooledschedules_client.go
- scalingplans_client.go
- sessionhosts_client.go
- startmenuitems_client.go
- time_rfc3339.go
- usersessions_client.go
- workspaces_client.go