scalingplan

package
v0.20230227.1195936 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

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

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

Client Initialization

client := scalingplan.NewScalingPlanClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ScalingPlanClient.Create

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

payload := scalingplan.ScalingPlan{
	// ...
}


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

Example Usage: ScalingPlanClient.Delete

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

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

Example Usage: ScalingPlanClient.Get

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

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: ScalingPlanClient.ListByHostPool

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

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

Example Usage: ScalingPlanClient.ListByResourceGroup

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

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

Example Usage: ScalingPlanClient.ListBySubscription

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

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

Example Usage: ScalingPlanClient.Update

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

payload := scalingplan.ScalingPlanPatch{
	// ...
}


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 PossibleValuesForDaysOfWeek

func PossibleValuesForDaysOfWeek() []string

func PossibleValuesForScalingHostPoolType

func PossibleValuesForScalingHostPoolType() []string

func PossibleValuesForSessionHostLoadBalancingAlgorithm

func PossibleValuesForSessionHostLoadBalancingAlgorithm() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func PossibleValuesForStopHostsWhen

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

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

ValidateScalingPlanID checks that 'input' can be parsed as a Scaling Plan ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScalingPlan
}

type DaysOfWeek

type DaysOfWeek string
const (
	DaysOfWeekFriday    DaysOfWeek = "Friday"
	DaysOfWeekMonday    DaysOfWeek = "Monday"
	DaysOfWeekSaturday  DaysOfWeek = "Saturday"
	DaysOfWeekSunday    DaysOfWeek = "Sunday"
	DaysOfWeekThursday  DaysOfWeek = "Thursday"
	DaysOfWeekTuesday   DaysOfWeek = "Tuesday"
	DaysOfWeekWednesday DaysOfWeek = "Wednesday"
)

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScalingPlan
}

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 ListByHostPoolCompleteResult

type ListByHostPoolCompleteResult struct {
	Items []ScalingPlan
}

type ListByHostPoolOperationOptions

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

func DefaultListByHostPoolOperationOptions

func DefaultListByHostPoolOperationOptions() ListByHostPoolOperationOptions

type ListByHostPoolOperationResponse

type ListByHostPoolOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ScalingPlan
	// contains filtered or unexported fields
}

func (ListByHostPoolOperationResponse) HasMore

func (ListByHostPoolOperationResponse) LoadMore

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []ScalingPlan
}

type ListByResourceGroupOperationOptions

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

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ScalingPlan
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []ScalingPlan
}

type ListBySubscriptionOperationOptions

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

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ScalingPlan
	// contains filtered or unexported fields
}

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

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 ScalingHostPoolReference

type ScalingHostPoolReference struct {
	HostPoolArmPath    *string `json:"hostPoolArmPath,omitempty"`
	ScalingPlanEnabled *bool   `json:"scalingPlanEnabled,omitempty"`
}

type ScalingHostPoolType

type ScalingHostPoolType string
const (
	ScalingHostPoolTypePooled ScalingHostPoolType = "Pooled"
)

type ScalingPlan

type ScalingPlan 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 ScalingPlanProperties    `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 ScalingPlanClient

type ScalingPlanClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewScalingPlanClientWithBaseURI

func NewScalingPlanClientWithBaseURI(endpoint string) ScalingPlanClient

func (ScalingPlanClient) Create

Create ...

func (ScalingPlanClient) Delete

Delete ...

func (ScalingPlanClient) Get

Get ...

func (ScalingPlanClient) ListByHostPool

ListByHostPool ...

func (ScalingPlanClient) ListByHostPoolComplete

ListByHostPoolComplete retrieves all of the results into a single object

func (ScalingPlanClient) ListByHostPoolCompleteMatchingPredicate

func (c ScalingPlanClient) ListByHostPoolCompleteMatchingPredicate(ctx context.Context, id HostPoolId, options ListByHostPoolOperationOptions, predicate ScalingPlanOperationPredicate) (resp ListByHostPoolCompleteResult, err error)

ListByHostPoolCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScalingPlanClient) ListByResourceGroup

ListByResourceGroup ...

func (ScalingPlanClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (ScalingPlanClient) ListByResourceGroupCompleteMatchingPredicate

func (c ScalingPlanClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ScalingPlanOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScalingPlanClient) ListBySubscription

ListBySubscription ...

func (ScalingPlanClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (ScalingPlanClient) ListBySubscriptionCompleteMatchingPredicate

func (c ScalingPlanClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate ScalingPlanOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScalingPlanClient) Update

Update ...

type ScalingPlanId

type ScalingPlanId struct {
	SubscriptionId    string
	ResourceGroupName string
	ScalingPlanName   string
}

ScalingPlanId is a struct representing the Resource ID for a Scaling Plan

func NewScalingPlanID

func NewScalingPlanID(subscriptionId string, resourceGroupName string, scalingPlanName string) ScalingPlanId

NewScalingPlanID returns a new ScalingPlanId struct

func ParseScalingPlanID

func ParseScalingPlanID(input string) (*ScalingPlanId, error)

ParseScalingPlanID parses 'input' into a ScalingPlanId

func ParseScalingPlanIDInsensitively

func ParseScalingPlanIDInsensitively(input string) (*ScalingPlanId, error)

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

func (ScalingPlanId) ID

func (id ScalingPlanId) ID() string

ID returns the formatted Scaling Plan ID

func (ScalingPlanId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scaling Plan ID

func (ScalingPlanId) String

func (id ScalingPlanId) String() string

String returns a human-readable description of this Scaling Plan ID

type ScalingPlanOperationPredicate

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

func (ScalingPlanOperationPredicate) Matches

type ScalingPlanPatch

type ScalingPlanPatch struct {
	Properties *ScalingPlanPatchProperties `json:"properties,omitempty"`
	Tags       *map[string]string          `json:"tags,omitempty"`
}

type ScalingPlanPatchProperties

type ScalingPlanPatchProperties struct {
	Description        *string                     `json:"description,omitempty"`
	ExclusionTag       *string                     `json:"exclusionTag,omitempty"`
	FriendlyName       *string                     `json:"friendlyName,omitempty"`
	HostPoolReferences *[]ScalingHostPoolReference `json:"hostPoolReferences,omitempty"`
	Schedules          *[]ScalingSchedule          `json:"schedules,omitempty"`
	TimeZone           *string                     `json:"timeZone,omitempty"`
}

type ScalingPlanProperties

type ScalingPlanProperties struct {
	Description        *string                     `json:"description,omitempty"`
	ExclusionTag       *string                     `json:"exclusionTag,omitempty"`
	FriendlyName       *string                     `json:"friendlyName,omitempty"`
	HostPoolReferences *[]ScalingHostPoolReference `json:"hostPoolReferences,omitempty"`
	HostPoolType       *ScalingHostPoolType        `json:"hostPoolType,omitempty"`
	ObjectId           *string                     `json:"objectId,omitempty"`
	Schedules          *[]ScalingSchedule          `json:"schedules,omitempty"`
	TimeZone           string                      `json:"timeZone"`
}

type ScalingSchedule

type ScalingSchedule struct {
	DaysOfWeek                     *[]DaysOfWeek                      `json:"daysOfWeek,omitempty"`
	Name                           *string                            `json:"name,omitempty"`
	OffPeakLoadBalancingAlgorithm  *SessionHostLoadBalancingAlgorithm `json:"offPeakLoadBalancingAlgorithm,omitempty"`
	OffPeakStartTime               *Time                              `json:"offPeakStartTime,omitempty"`
	PeakLoadBalancingAlgorithm     *SessionHostLoadBalancingAlgorithm `json:"peakLoadBalancingAlgorithm,omitempty"`
	PeakStartTime                  *Time                              `json:"peakStartTime,omitempty"`
	RampDownCapacityThresholdPct   *int64                             `json:"rampDownCapacityThresholdPct,omitempty"`
	RampDownForceLogoffUsers       *bool                              `json:"rampDownForceLogoffUsers,omitempty"`
	RampDownLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"rampDownLoadBalancingAlgorithm,omitempty"`
	RampDownMinimumHostsPct        *int64                             `json:"rampDownMinimumHostsPct,omitempty"`
	RampDownNotificationMessage    *string                            `json:"rampDownNotificationMessage,omitempty"`
	RampDownStartTime              *Time                              `json:"rampDownStartTime,omitempty"`
	RampDownStopHostsWhen          *StopHostsWhen                     `json:"rampDownStopHostsWhen,omitempty"`
	RampDownWaitTimeMinutes        *int64                             `json:"rampDownWaitTimeMinutes,omitempty"`
	RampUpCapacityThresholdPct     *int64                             `json:"rampUpCapacityThresholdPct,omitempty"`
	RampUpLoadBalancingAlgorithm   *SessionHostLoadBalancingAlgorithm `json:"rampUpLoadBalancingAlgorithm,omitempty"`
	RampUpMinimumHostsPct          *int64                             `json:"rampUpMinimumHostsPct,omitempty"`
	RampUpStartTime                *Time                              `json:"rampUpStartTime,omitempty"`
}

type SessionHostLoadBalancingAlgorithm

type SessionHostLoadBalancingAlgorithm string
const (
	SessionHostLoadBalancingAlgorithmBreadthFirst SessionHostLoadBalancingAlgorithm = "BreadthFirst"
	SessionHostLoadBalancingAlgorithmDepthFirst   SessionHostLoadBalancingAlgorithm = "DepthFirst"
)

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

type StopHostsWhen

type StopHostsWhen string
const (
	StopHostsWhenZeroActiveSessions StopHostsWhen = "ZeroActiveSessions"
	StopHostsWhenZeroSessions       StopHostsWhen = "ZeroSessions"
)

type Time

type Time struct {
	Hour   int64 `json:"hour"`
	Minute int64 `json:"minute"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScalingPlan
}

Jump to

Keyboard shortcuts

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