scalingplan

package
v0.20230425.1021638 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan Documentation

The scalingplan SDK allows for interaction with the Azure Resource Manager Service desktopvirtualization (API Version 2022-02-10-preview).

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-02-10-preview/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)` can be used to do batched pagination
items, err := client.ListByHostPoolComplete(ctx, id)
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)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
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)` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id)
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
	OData        *odata.OData
	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"
)

func (*DaysOfWeek) UnmarshalJSON added in v0.20230420.1093529

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

type DeleteOperationResponse

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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 ListByHostPoolOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []ScalingPlan
}

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []ScalingPlan
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ScalingPlan
}

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

func (*ScalingHostPoolType) UnmarshalJSON added in v0.20230420.1093529

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

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,omitempty"`
	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 *resourcemanager.Client
}

func NewScalingPlanClientWithBaseURI

func NewScalingPlanClientWithBaseURI(api environments.Api) (*ScalingPlanClient, error)

func (ScalingPlanClient) Create

Create ...

func (ScalingPlanClient) Delete

Delete ...

func (ScalingPlanClient) Get

Get ...

func (ScalingPlanClient) ListByHostPool

func (c ScalingPlanClient) ListByHostPool(ctx context.Context, id HostPoolId) (result ListByHostPoolOperationResponse, err error)

ListByHostPool ...

func (ScalingPlanClient) ListByHostPoolComplete

func (c ScalingPlanClient) ListByHostPoolComplete(ctx context.Context, id HostPoolId) (ListByHostPoolCompleteResult, error)

ListByHostPoolComplete retrieves all the results into a single object

func (ScalingPlanClient) ListByHostPoolCompleteMatchingPredicate

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

ListByHostPoolCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ScalingPlanClient) ListByResourceGroup

ListByResourceGroup ...

func (ScalingPlanClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ScalingPlanClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ScalingPlanClient) ListBySubscription

ListBySubscription ...

func (ScalingPlanClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (ScalingPlanClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies 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,omitempty"`
}

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

func (*SessionHostLoadBalancingAlgorithm) UnmarshalJSON added in v0.20230420.1093529

func (s *SessionHostLoadBalancingAlgorithm) 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 added in v0.20230420.1093529

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

type StopHostsWhen

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

func (*StopHostsWhen) UnmarshalJSON added in v0.20230420.1093529

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

type Time

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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