sessionhost

package
v0.20230523.1140858 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/sessionhost Documentation

The sessionhost SDK allows for interaction with the Azure Resource Manager Service desktopvirtualization (API Version 2022-09-09).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/sessionhost"

Client Initialization

client := sessionhost.NewSessionHostClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SessionHostClient.Delete

ctx := context.TODO()
id := sessionhost.NewSessionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "sessionHostValue")

read, err := client.Delete(ctx, id, sessionhost.DefaultDeleteOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SessionHostClient.Get

ctx := context.TODO()
id := sessionhost.NewSessionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "sessionHostValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SessionHostClient.List

ctx := context.TODO()
id := sessionhost.NewHostPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue")

// alternatively `client.List(ctx, id, sessionhost.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, sessionhost.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: SessionHostClient.Update

ctx := context.TODO()
id := sessionhost.NewSessionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hostPoolValue", "sessionHostValue")

payload := sessionhost.SessionHostPatch{
	// ...
}


read, err := client.Update(ctx, id, payload, sessionhost.DefaultUpdateOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForHealthCheckName

func PossibleValuesForHealthCheckName() []string

func PossibleValuesForHealthCheckResult

func PossibleValuesForHealthCheckResult() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func PossibleValuesForUpdateState

func PossibleValuesForUpdateState() []string

func ValidateHostPoolID

func ValidateHostPoolID(input interface{}, key string) (warnings []string, errors []error)

ValidateHostPoolID checks that 'input' can be parsed as a Host Pool ID

func ValidateSessionHostID

func ValidateSessionHostID(input interface{}, key string) (warnings []string, errors []error)

ValidateSessionHostID checks that 'input' can be parsed as a Session Host ID

Types

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders added in v0.20230420.1093529

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData added in v0.20230420.1093529

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery added in v0.20230420.1093529

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SessionHost
}

type HealthCheckName

type HealthCheckName string
const (
	HealthCheckNameAppAttachHealthCheck     HealthCheckName = "AppAttachHealthCheck"
	HealthCheckNameDomainJoinedCheck        HealthCheckName = "DomainJoinedCheck"
	HealthCheckNameDomainReachable          HealthCheckName = "DomainReachable"
	HealthCheckNameDomainTrustCheck         HealthCheckName = "DomainTrustCheck"
	HealthCheckNameFSLogixHealthCheck       HealthCheckName = "FSLogixHealthCheck"
	HealthCheckNameMetaDataServiceCheck     HealthCheckName = "MetaDataServiceCheck"
	HealthCheckNameMonitoringAgentCheck     HealthCheckName = "MonitoringAgentCheck"
	HealthCheckNameSupportedEncryptionCheck HealthCheckName = "SupportedEncryptionCheck"
	HealthCheckNameSxSStackListenerCheck    HealthCheckName = "SxSStackListenerCheck"
	HealthCheckNameUrlsAccessibleCheck      HealthCheckName = "UrlsAccessibleCheck"
	HealthCheckNameWebRTCRedirectorCheck    HealthCheckName = "WebRTCRedirectorCheck"
)

func (*HealthCheckName) UnmarshalJSON added in v0.20230420.1093529

func (s *HealthCheckName) UnmarshalJSON(bytes []byte) error

type HealthCheckResult

type HealthCheckResult string
const (
	HealthCheckResultHealthCheckFailed    HealthCheckResult = "HealthCheckFailed"
	HealthCheckResultHealthCheckSucceeded HealthCheckResult = "HealthCheckSucceeded"
	HealthCheckResultSessionHostShutdown  HealthCheckResult = "SessionHostShutdown"
	HealthCheckResultUnknown              HealthCheckResult = "Unknown"
)

func (*HealthCheckResult) UnmarshalJSON added in v0.20230420.1093529

func (s *HealthCheckResult) UnmarshalJSON(bytes []byte) error

type HostPoolId

type HostPoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	HostPoolName      string
}

HostPoolId is a struct representing the Resource ID for a Host Pool

func NewHostPoolID

func NewHostPoolID(subscriptionId string, resourceGroupName string, hostPoolName string) HostPoolId

NewHostPoolID returns a new HostPoolId struct

func ParseHostPoolID

func ParseHostPoolID(input string) (*HostPoolId, error)

ParseHostPoolID parses 'input' into a HostPoolId

func ParseHostPoolIDInsensitively

func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error)

ParseHostPoolIDInsensitively parses 'input' case-insensitively into a HostPoolId note: this method should only be used for API response data and not user input

func (HostPoolId) ID

func (id HostPoolId) ID() string

ID returns the formatted Host Pool ID

func (HostPoolId) Segments

func (id HostPoolId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Host Pool ID

func (HostPoolId) String

func (id HostPoolId) String() string

String returns a human-readable description of this Host Pool ID

type ListCompleteResult

type ListCompleteResult struct {
	Items []SessionHost
}

type ListOperationOptions

type ListOperationOptions struct {
	InitialSkip  *int64
	IsDescending *bool
	PageSize     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230420.1093529

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20230420.1093529

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20230420.1093529

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SessionHost
}

type SessionHost

type SessionHost struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *SessionHostProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type SessionHostClient

type SessionHostClient struct {
	Client *resourcemanager.Client
}

func NewSessionHostClientWithBaseURI

func NewSessionHostClientWithBaseURI(api environments.Api) (*SessionHostClient, error)

func (SessionHostClient) Delete

Delete ...

func (SessionHostClient) Get

Get ...

func (SessionHostClient) List

List ...

func (SessionHostClient) ListComplete

ListComplete retrieves all the results into a single object

func (SessionHostClient) ListCompleteMatchingPredicate

func (c SessionHostClient) ListCompleteMatchingPredicate(ctx context.Context, id HostPoolId, options ListOperationOptions, predicate SessionHostOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SessionHostClient) Update

Update ...

type SessionHostHealthCheckFailureDetails

type SessionHostHealthCheckFailureDetails struct {
	ErrorCode               *int64  `json:"errorCode,omitempty"`
	LastHealthCheckDateTime *string `json:"lastHealthCheckDateTime,omitempty"`
	Message                 *string `json:"message,omitempty"`
}

func (*SessionHostHealthCheckFailureDetails) GetLastHealthCheckDateTimeAsTime

func (o *SessionHostHealthCheckFailureDetails) GetLastHealthCheckDateTimeAsTime() (*time.Time, error)

func (*SessionHostHealthCheckFailureDetails) SetLastHealthCheckDateTimeAsTime

func (o *SessionHostHealthCheckFailureDetails) SetLastHealthCheckDateTimeAsTime(input time.Time)

type SessionHostHealthCheckReport

type SessionHostHealthCheckReport struct {
	AdditionalFailureDetails *SessionHostHealthCheckFailureDetails `json:"additionalFailureDetails,omitempty"`
	HealthCheckName          *HealthCheckName                      `json:"healthCheckName,omitempty"`
	HealthCheckResult        *HealthCheckResult                    `json:"healthCheckResult,omitempty"`
}

type SessionHostId

type SessionHostId struct {
	SubscriptionId    string
	ResourceGroupName string
	HostPoolName      string
	SessionHostName   string
}

SessionHostId is a struct representing the Resource ID for a Session Host

func NewSessionHostID

func NewSessionHostID(subscriptionId string, resourceGroupName string, hostPoolName string, sessionHostName string) SessionHostId

NewSessionHostID returns a new SessionHostId struct

func ParseSessionHostID

func ParseSessionHostID(input string) (*SessionHostId, error)

ParseSessionHostID parses 'input' into a SessionHostId

func ParseSessionHostIDInsensitively

func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error)

ParseSessionHostIDInsensitively parses 'input' case-insensitively into a SessionHostId note: this method should only be used for API response data and not user input

func (SessionHostId) ID

func (id SessionHostId) ID() string

ID returns the formatted Session Host ID

func (SessionHostId) Segments

func (id SessionHostId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Session Host ID

func (SessionHostId) String

func (id SessionHostId) String() string

String returns a human-readable description of this Session Host ID

type SessionHostOperationPredicate

type SessionHostOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (SessionHostOperationPredicate) Matches

type SessionHostPatch

type SessionHostPatch struct {
	Id         *string                     `json:"id,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *SessionHostPatchProperties `json:"properties,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type SessionHostPatchProperties

type SessionHostPatchProperties struct {
	AllowNewSession *bool   `json:"allowNewSession,omitempty"`
	AssignedUser    *string `json:"assignedUser,omitempty"`
	FriendlyName    *string `json:"friendlyName,omitempty"`
}

type SessionHostProperties

type SessionHostProperties struct {
	AgentVersion                  *string                         `json:"agentVersion,omitempty"`
	AllowNewSession               *bool                           `json:"allowNewSession,omitempty"`
	AssignedUser                  *string                         `json:"assignedUser,omitempty"`
	FriendlyName                  *string                         `json:"friendlyName,omitempty"`
	LastHeartBeat                 *string                         `json:"lastHeartBeat,omitempty"`
	LastUpdateTime                *string                         `json:"lastUpdateTime,omitempty"`
	ObjectId                      *string                         `json:"objectId,omitempty"`
	OsVersion                     *string                         `json:"osVersion,omitempty"`
	ResourceId                    *string                         `json:"resourceId,omitempty"`
	SessionHostHealthCheckResults *[]SessionHostHealthCheckReport `json:"sessionHostHealthCheckResults,omitempty"`
	Sessions                      *int64                          `json:"sessions,omitempty"`
	Status                        *Status                         `json:"status,omitempty"`
	StatusTimestamp               *string                         `json:"statusTimestamp,omitempty"`
	SxSStackVersion               *string                         `json:"sxSStackVersion,omitempty"`
	UpdateErrorMessage            *string                         `json:"updateErrorMessage,omitempty"`
	UpdateState                   *UpdateState                    `json:"updateState,omitempty"`
	VirtualMachineId              *string                         `json:"virtualMachineId,omitempty"`
}

func (*SessionHostProperties) GetLastHeartBeatAsTime

func (o *SessionHostProperties) GetLastHeartBeatAsTime() (*time.Time, error)

func (*SessionHostProperties) GetLastUpdateTimeAsTime

func (o *SessionHostProperties) GetLastUpdateTimeAsTime() (*time.Time, error)

func (*SessionHostProperties) GetStatusTimestampAsTime

func (o *SessionHostProperties) GetStatusTimestampAsTime() (*time.Time, error)

func (*SessionHostProperties) SetLastHeartBeatAsTime

func (o *SessionHostProperties) SetLastHeartBeatAsTime(input time.Time)

func (*SessionHostProperties) SetLastUpdateTimeAsTime

func (o *SessionHostProperties) SetLastUpdateTimeAsTime(input time.Time)

func (*SessionHostProperties) SetStatusTimestampAsTime

func (o *SessionHostProperties) SetStatusTimestampAsTime(input time.Time)

type Status

type Status string
const (
	StatusAvailable                   Status = "Available"
	StatusDisconnected                Status = "Disconnected"
	StatusDomainTrustRelationshipLost Status = "DomainTrustRelationshipLost"
	StatusFSLogixNotHealthy           Status = "FSLogixNotHealthy"
	StatusNeedsAssistance             Status = "NeedsAssistance"
	StatusNoHeartbeat                 Status = "NoHeartbeat"
	StatusNotJoinedToDomain           Status = "NotJoinedToDomain"
	StatusShutdown                    Status = "Shutdown"
	StatusSxSStackListenerNotReady    Status = "SxSStackListenerNotReady"
	StatusUnavailable                 Status = "Unavailable"
	StatusUpgradeFailed               Status = "UpgradeFailed"
	StatusUpgrading                   Status = "Upgrading"
)

func (*Status) UnmarshalJSON added in v0.20230420.1093529

func (s *Status) UnmarshalJSON(bytes []byte) error

type UpdateOperationOptions

type UpdateOperationOptions struct {
	Force *bool
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders added in v0.20230420.1093529

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData added in v0.20230420.1093529

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery added in v0.20230420.1093529

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SessionHost
}

type UpdateState

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

func (*UpdateState) UnmarshalJSON added in v0.20230420.1093529

func (s *UpdateState) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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