usersession

package
v0.20240422.1112441 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

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

The usersession 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/usersession"

Client Initialization

client := usersession.NewUserSessionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UserSessionClient.Delete

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

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

Example Usage: UserSessionClient.Disconnect

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

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

Example Usage: UserSessionClient.Get

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

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: UserSessionClient.List

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

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

Example Usage: UserSessionClient.ListByHostPool

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

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

Example Usage: UserSessionClient.SendMessage

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

payload := usersession.SendMessage{
	// ...
}


read, err := client.SendMessage(ctx, id, payload)
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 PossibleValuesForApplicationType

func PossibleValuesForApplicationType() []string

func PossibleValuesForSessionState

func PossibleValuesForSessionState() []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

func ValidateUserSessionID

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

ValidateUserSessionID checks that 'input' can be parsed as a User Session ID

Types

type ApplicationType

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

func (*ApplicationType) UnmarshalJSON

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type DisconnectOperationResponse

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

type GetOperationResponse

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

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) FromParseResult

func (id *HostPoolId) FromParseResult(input resourceids.ParseResult) error

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 ListByHostPoolCompleteResult

type ListByHostPoolCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []UserSession
}

type ListByHostPoolOperationOptions

type ListByHostPoolOperationOptions struct {
	Filter       *string
	InitialSkip  *int64
	IsDescending *bool
	PageSize     *int64
}

func DefaultListByHostPoolOperationOptions

func DefaultListByHostPoolOperationOptions() ListByHostPoolOperationOptions

func (ListByHostPoolOperationOptions) ToHeaders

func (ListByHostPoolOperationOptions) ToOData

func (ListByHostPoolOperationOptions) ToQuery

type ListByHostPoolOperationResponse

type ListByHostPoolOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]UserSession
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []UserSession
}

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

type SendMessage

type SendMessage struct {
	MessageBody  *string `json:"messageBody,omitempty"`
	MessageTitle *string `json:"messageTitle,omitempty"`
}

type SendMessageOperationResponse

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

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) FromParseResult

func (id *SessionHostId) FromParseResult(input resourceids.ParseResult) error

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 SessionState

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

func (*SessionState) UnmarshalJSON

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

type UserSession

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

type UserSessionClient

type UserSessionClient struct {
	Client *resourcemanager.Client
}

func NewUserSessionClientWithBaseURI

func NewUserSessionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSessionClient, error)

func (UserSessionClient) Delete

Delete ...

func (UserSessionClient) Disconnect

Disconnect ...

func (UserSessionClient) Get

Get ...

func (UserSessionClient) List

List ...

func (UserSessionClient) ListByHostPool

ListByHostPool ...

func (UserSessionClient) ListByHostPoolComplete

ListByHostPoolComplete retrieves all the results into a single object

func (UserSessionClient) ListByHostPoolCompleteMatchingPredicate

func (c UserSessionClient) ListByHostPoolCompleteMatchingPredicate(ctx context.Context, id HostPoolId, options ListByHostPoolOperationOptions, predicate UserSessionOperationPredicate) (result ListByHostPoolCompleteResult, err error)

ListByHostPoolCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UserSessionClient) ListComplete

ListComplete retrieves all the results into a single object

func (UserSessionClient) ListCompleteMatchingPredicate

func (c UserSessionClient) ListCompleteMatchingPredicate(ctx context.Context, id SessionHostId, options ListOperationOptions, predicate UserSessionOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UserSessionClient) SendMessage

func (c UserSessionClient) SendMessage(ctx context.Context, id UserSessionId, input SendMessage) (result SendMessageOperationResponse, err error)

SendMessage ...

type UserSessionId

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

UserSessionId is a struct representing the Resource ID for a User Session

func NewUserSessionID

func NewUserSessionID(subscriptionId string, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionId string) UserSessionId

NewUserSessionID returns a new UserSessionId struct

func ParseUserSessionID

func ParseUserSessionID(input string) (*UserSessionId, error)

ParseUserSessionID parses 'input' into a UserSessionId

func ParseUserSessionIDInsensitively

func ParseUserSessionIDInsensitively(input string) (*UserSessionId, error)

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

func (*UserSessionId) FromParseResult

func (id *UserSessionId) FromParseResult(input resourceids.ParseResult) error

func (UserSessionId) ID

func (id UserSessionId) ID() string

ID returns the formatted User Session ID

func (UserSessionId) Segments

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

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

func (UserSessionId) String

func (id UserSessionId) String() string

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

type UserSessionOperationPredicate

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

func (UserSessionOperationPredicate) Matches

type UserSessionProperties

type UserSessionProperties struct {
	ActiveDirectoryUserName *string          `json:"activeDirectoryUserName,omitempty"`
	ApplicationType         *ApplicationType `json:"applicationType,omitempty"`
	CreateTime              *string          `json:"createTime,omitempty"`
	ObjectId                *string          `json:"objectId,omitempty"`
	SessionState            *SessionState    `json:"sessionState,omitempty"`
	UserPrincipalName       *string          `json:"userPrincipalName,omitempty"`
}

func (*UserSessionProperties) GetCreateTimeAsTime

func (o *UserSessionProperties) GetCreateTimeAsTime() (*time.Time, error)

func (*UserSessionProperties) SetCreateTimeAsTime

func (o *UserSessionProperties) SetCreateTimeAsTime(input time.Time)

Jump to

Keyboard shortcuts

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