hostpool

package
v0.20240320.1105218 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

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

The hostpool 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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/hostpool"

Client Initialization

client := hostpool.NewHostPoolClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HostPoolClient.CreateOrUpdate

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

payload := hostpool.HostPool{
	// ...
}


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

Example Usage: HostPoolClient.Delete

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

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

Example Usage: HostPoolClient.Get

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

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

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: HostPoolClient.ListByResourceGroup

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

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

Example Usage: HostPoolClient.RetrieveRegistrationToken

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

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

Example Usage: HostPoolClient.Update

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

payload := hostpool.HostPoolPatch{
	// ...
}


read, err := client.Update(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 PossibleValuesForDayOfWeek

func PossibleValuesForDayOfWeek() []string

func PossibleValuesForHostPoolType

func PossibleValuesForHostPoolType() []string

func PossibleValuesForLoadBalancerType

func PossibleValuesForLoadBalancerType() []string

func PossibleValuesForPersonalDesktopAssignmentType

func PossibleValuesForPersonalDesktopAssignmentType() []string

func PossibleValuesForPreferredAppGroupType

func PossibleValuesForPreferredAppGroupType() []string

func PossibleValuesForRegistrationTokenOperation

func PossibleValuesForRegistrationTokenOperation() []string

func PossibleValuesForSSOSecretType

func PossibleValuesForSSOSecretType() []string

func PossibleValuesForSessionHostComponentUpdateType

func PossibleValuesForSessionHostComponentUpdateType() []string

func PossibleValuesForSkuTier

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

Types

type AgentUpdatePatchProperties

type AgentUpdatePatchProperties struct {
	MaintenanceWindowTimeZone *string                             `json:"maintenanceWindowTimeZone,omitempty"`
	MaintenanceWindows        *[]MaintenanceWindowPatchProperties `json:"maintenanceWindows,omitempty"`
	Type                      *SessionHostComponentUpdateType     `json:"type,omitempty"`
	UseSessionHostLocalTime   *bool                               `json:"useSessionHostLocalTime,omitempty"`
}

type AgentUpdateProperties

type AgentUpdateProperties struct {
	MaintenanceWindowTimeZone *string                         `json:"maintenanceWindowTimeZone,omitempty"`
	MaintenanceWindows        *[]MaintenanceWindowProperties  `json:"maintenanceWindows,omitempty"`
	Type                      *SessionHostComponentUpdateType `json:"type,omitempty"`
	UseSessionHostLocalTime   *bool                           `json:"useSessionHostLocalTime,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HostPool
}

type DayOfWeek

type DayOfWeek string
const (
	DayOfWeekFriday    DayOfWeek = "Friday"
	DayOfWeekMonday    DayOfWeek = "Monday"
	DayOfWeekSaturday  DayOfWeek = "Saturday"
	DayOfWeekSunday    DayOfWeek = "Sunday"
	DayOfWeekThursday  DayOfWeek = "Thursday"
	DayOfWeekTuesday   DayOfWeek = "Tuesday"
	DayOfWeekWednesday DayOfWeek = "Wednesday"
)

func (*DayOfWeek) UnmarshalJSON

func (s *DayOfWeek) 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 GetOperationResponse

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

type HostPool

type HostPool struct {
	Etag       *string                  `json:"etag,omitempty"`
	Id         *string                  `json:"id,omitempty"`
	Identity   *identity.SystemAssigned `json:"identity,omitempty"`
	Kind       *string                  `json:"kind,omitempty"`
	Location   *string                  `json:"location,omitempty"`
	ManagedBy  *string                  `json:"managedBy,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Plan       *Plan                    `json:"plan,omitempty"`
	Properties HostPoolProperties       `json:"properties"`
	Sku        *Sku                     `json:"sku,omitempty"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type HostPoolClient

type HostPoolClient struct {
	Client *resourcemanager.Client
}

func NewHostPoolClientWithBaseURI

func NewHostPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*HostPoolClient, error)

func (HostPoolClient) CreateOrUpdate

func (c HostPoolClient) CreateOrUpdate(ctx context.Context, id HostPoolId, input HostPool) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (HostPoolClient) Delete

Delete ...

func (HostPoolClient) Get

func (c HostPoolClient) Get(ctx context.Context, id HostPoolId) (result GetOperationResponse, err error)

Get ...

func (HostPoolClient) List

List ...

func (HostPoolClient) ListByResourceGroup

ListByResourceGroup ...

func (HostPoolClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (HostPoolClient) ListByResourceGroupCompleteMatchingPredicate

func (c HostPoolClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate HostPoolOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HostPoolClient) ListComplete

ListComplete retrieves all the results into a single object

func (HostPoolClient) ListCompleteMatchingPredicate

func (c HostPoolClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate HostPoolOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HostPoolClient) RetrieveRegistrationToken

func (c HostPoolClient) RetrieveRegistrationToken(ctx context.Context, id HostPoolId) (result RetrieveRegistrationTokenOperationResponse, err error)

RetrieveRegistrationToken ...

func (HostPoolClient) Update

func (c HostPoolClient) Update(ctx context.Context, id HostPoolId, input HostPoolPatch) (result UpdateOperationResponse, err error)

Update ...

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 HostPoolOperationPredicate

type HostPoolOperationPredicate struct {
	Etag      *string
	Id        *string
	Kind      *string
	Location  *string
	ManagedBy *string
	Name      *string
	Type      *string
}

func (HostPoolOperationPredicate) Matches

func (p HostPoolOperationPredicate) Matches(input HostPool) bool

type HostPoolPatch

type HostPoolPatch struct {
	Id         *string                  `json:"id,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *HostPoolPatchProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type HostPoolPatchProperties

type HostPoolPatchProperties struct {
	AgentUpdate                   *AgentUpdatePatchProperties    `json:"agentUpdate,omitempty"`
	CustomRdpProperty             *string                        `json:"customRdpProperty,omitempty"`
	Description                   *string                        `json:"description,omitempty"`
	FriendlyName                  *string                        `json:"friendlyName,omitempty"`
	LoadBalancerType              *LoadBalancerType              `json:"loadBalancerType,omitempty"`
	MaxSessionLimit               *int64                         `json:"maxSessionLimit,omitempty"`
	PersonalDesktopAssignmentType *PersonalDesktopAssignmentType `json:"personalDesktopAssignmentType,omitempty"`
	PreferredAppGroupType         *PreferredAppGroupType         `json:"preferredAppGroupType,omitempty"`
	RegistrationInfo              *RegistrationInfoPatch         `json:"registrationInfo,omitempty"`
	Ring                          *int64                         `json:"ring,omitempty"`
	SsoClientId                   *string                        `json:"ssoClientId,omitempty"`
	SsoClientSecretKeyVaultPath   *string                        `json:"ssoClientSecretKeyVaultPath,omitempty"`
	SsoSecretType                 *SSOSecretType                 `json:"ssoSecretType,omitempty"`
	SsoadfsAuthority              *string                        `json:"ssoadfsAuthority,omitempty"`
	StartVMOnConnect              *bool                          `json:"startVMOnConnect,omitempty"`
	VMTemplate                    *string                        `json:"vmTemplate,omitempty"`
	ValidationEnvironment         *bool                          `json:"validationEnvironment,omitempty"`
}

type HostPoolProperties

type HostPoolProperties struct {
	AgentUpdate                   *AgentUpdateProperties         `json:"agentUpdate,omitempty"`
	ApplicationGroupReferences    *[]string                      `json:"applicationGroupReferences,omitempty"`
	CloudPcResource               *bool                          `json:"cloudPcResource,omitempty"`
	CustomRdpProperty             *string                        `json:"customRdpProperty,omitempty"`
	Description                   *string                        `json:"description,omitempty"`
	FriendlyName                  *string                        `json:"friendlyName,omitempty"`
	HostPoolType                  HostPoolType                   `json:"hostPoolType"`
	LoadBalancerType              LoadBalancerType               `json:"loadBalancerType"`
	MaxSessionLimit               *int64                         `json:"maxSessionLimit,omitempty"`
	ObjectId                      *string                        `json:"objectId,omitempty"`
	PersonalDesktopAssignmentType *PersonalDesktopAssignmentType `json:"personalDesktopAssignmentType,omitempty"`
	PreferredAppGroupType         PreferredAppGroupType          `json:"preferredAppGroupType"`
	RegistrationInfo              *RegistrationInfo              `json:"registrationInfo,omitempty"`
	Ring                          *int64                         `json:"ring,omitempty"`
	SsoClientId                   *string                        `json:"ssoClientId,omitempty"`
	SsoClientSecretKeyVaultPath   *string                        `json:"ssoClientSecretKeyVaultPath,omitempty"`
	SsoSecretType                 *SSOSecretType                 `json:"ssoSecretType,omitempty"`
	SsoadfsAuthority              *string                        `json:"ssoadfsAuthority,omitempty"`
	StartVMOnConnect              *bool                          `json:"startVMOnConnect,omitempty"`
	VMTemplate                    *string                        `json:"vmTemplate,omitempty"`
	ValidationEnvironment         *bool                          `json:"validationEnvironment,omitempty"`
}

type HostPoolType

type HostPoolType string
const (
	HostPoolTypeBYODesktop HostPoolType = "BYODesktop"
	HostPoolTypePersonal   HostPoolType = "Personal"
	HostPoolTypePooled     HostPoolType = "Pooled"
)

func (*HostPoolType) UnmarshalJSON

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []HostPool
}

type ListByResourceGroupOperationOptions

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

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

func (ListByResourceGroupOperationOptions) ToHeaders

func (ListByResourceGroupOperationOptions) ToOData

func (ListByResourceGroupOperationOptions) ToQuery

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]HostPool
}

type ListCompleteResult

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

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        *[]HostPool
}

type LoadBalancerType

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

func (*LoadBalancerType) UnmarshalJSON

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

type MaintenanceWindowPatchProperties

type MaintenanceWindowPatchProperties struct {
	DayOfWeek *DayOfWeek `json:"dayOfWeek,omitempty"`
	Hour      *int64     `json:"hour,omitempty"`
}

type MaintenanceWindowProperties

type MaintenanceWindowProperties struct {
	DayOfWeek *DayOfWeek `json:"dayOfWeek,omitempty"`
	Hour      *int64     `json:"hour,omitempty"`
}

type PersonalDesktopAssignmentType

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

func (*PersonalDesktopAssignmentType) UnmarshalJSON

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

type Plan

type Plan struct {
	Name          string  `json:"name"`
	Product       string  `json:"product"`
	PromotionCode *string `json:"promotionCode,omitempty"`
	Publisher     string  `json:"publisher"`
	Version       *string `json:"version,omitempty"`
}

type PreferredAppGroupType

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

func (*PreferredAppGroupType) UnmarshalJSON

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

type RegistrationInfo

type RegistrationInfo struct {
	ExpirationTime             *string                     `json:"expirationTime,omitempty"`
	RegistrationTokenOperation *RegistrationTokenOperation `json:"registrationTokenOperation,omitempty"`
	Token                      *string                     `json:"token,omitempty"`
}

func (*RegistrationInfo) GetExpirationTimeAsTime

func (o *RegistrationInfo) GetExpirationTimeAsTime() (*time.Time, error)

func (*RegistrationInfo) SetExpirationTimeAsTime

func (o *RegistrationInfo) SetExpirationTimeAsTime(input time.Time)

type RegistrationInfoPatch

type RegistrationInfoPatch struct {
	ExpirationTime             *string                     `json:"expirationTime,omitempty"`
	RegistrationTokenOperation *RegistrationTokenOperation `json:"registrationTokenOperation,omitempty"`
}

func (*RegistrationInfoPatch) GetExpirationTimeAsTime

func (o *RegistrationInfoPatch) GetExpirationTimeAsTime() (*time.Time, error)

func (*RegistrationInfoPatch) SetExpirationTimeAsTime

func (o *RegistrationInfoPatch) SetExpirationTimeAsTime(input time.Time)

type RegistrationTokenOperation

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

func (*RegistrationTokenOperation) UnmarshalJSON

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

type RetrieveRegistrationTokenOperationResponse

type RetrieveRegistrationTokenOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RegistrationInfo
}

type SSOSecretType

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

func (*SSOSecretType) UnmarshalJSON

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

type SessionHostComponentUpdateType

type SessionHostComponentUpdateType string
const (
	SessionHostComponentUpdateTypeDefault   SessionHostComponentUpdateType = "Default"
	SessionHostComponentUpdateTypeScheduled SessionHostComponentUpdateType = "Scheduled"
)

func (*SessionHostComponentUpdateType) UnmarshalJSON

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

type Sku

type Sku struct {
	Capacity *int64   `json:"capacity,omitempty"`
	Family   *string  `json:"family,omitempty"`
	Name     string   `json:"name"`
	Size     *string  `json:"size,omitempty"`
	Tier     *SkuTier `json:"tier,omitempty"`
}

type SkuTier

type SkuTier string
const (
	SkuTierBasic    SkuTier = "Basic"
	SkuTierFree     SkuTier = "Free"
	SkuTierPremium  SkuTier = "Premium"
	SkuTierStandard SkuTier = "Standard"
)

func (*SkuTier) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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