autoscaleapis

package
v0.20240319.1180522 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/autoscaleapis Documentation

The autoscaleapis SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2021-05-01-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/insights/2021-05-01-preview/autoscaleapis"

Client Initialization

client := autoscaleapis.NewAutoscaleAPIsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AutoscaleAPIsClient.AutoscaleSettingsUpdate

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

payload := autoscaleapis.AutoscaleSettingResourcePatch{
	// ...
}


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

func PossibleValuesForComparisonOperationType() []string

func PossibleValuesForMetricStatisticType

func PossibleValuesForMetricStatisticType() []string

func PossibleValuesForOperationType

func PossibleValuesForOperationType() []string

func PossibleValuesForPredictiveAutoscalePolicyScaleMode

func PossibleValuesForPredictiveAutoscalePolicyScaleMode() []string

func PossibleValuesForRecurrenceFrequency

func PossibleValuesForRecurrenceFrequency() []string

func PossibleValuesForScaleDirection

func PossibleValuesForScaleDirection() []string

func PossibleValuesForScaleRuleMetricDimensionOperationType

func PossibleValuesForScaleRuleMetricDimensionOperationType() []string

func PossibleValuesForScaleType

func PossibleValuesForScaleType() []string

func PossibleValuesForTimeAggregationType

func PossibleValuesForTimeAggregationType() []string

func ValidateAutoScaleSettingID

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

ValidateAutoScaleSettingID checks that 'input' can be parsed as a Auto Scale Setting ID

Types

type AutoScaleSettingId

type AutoScaleSettingId struct {
	SubscriptionId       string
	ResourceGroupName    string
	AutoScaleSettingName string
}

AutoScaleSettingId is a struct representing the Resource ID for a Auto Scale Setting

func NewAutoScaleSettingID

func NewAutoScaleSettingID(subscriptionId string, resourceGroupName string, autoScaleSettingName string) AutoScaleSettingId

NewAutoScaleSettingID returns a new AutoScaleSettingId struct

func ParseAutoScaleSettingID

func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error)

ParseAutoScaleSettingID parses 'input' into a AutoScaleSettingId

func ParseAutoScaleSettingIDInsensitively

func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, error)

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

func (*AutoScaleSettingId) FromParseResult

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

func (AutoScaleSettingId) ID

func (id AutoScaleSettingId) ID() string

ID returns the formatted Auto Scale Setting ID

func (AutoScaleSettingId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Auto Scale Setting ID

func (AutoScaleSettingId) String

func (id AutoScaleSettingId) String() string

String returns a human-readable description of this Auto Scale Setting ID

type AutoscaleAPIsClient

type AutoscaleAPIsClient struct {
	Client *resourcemanager.Client
}

func NewAutoscaleAPIsClientWithBaseURI

func NewAutoscaleAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoscaleAPIsClient, error)

func (AutoscaleAPIsClient) AutoscaleSettingsUpdate

AutoscaleSettingsUpdate ...

type AutoscaleNotification

type AutoscaleNotification struct {
	Email     *EmailNotification     `json:"email,omitempty"`
	Operation OperationType          `json:"operation"`
	WebHooks  *[]WebhookNotification `json:"webhooks,omitempty"`
}

type AutoscaleProfile

type AutoscaleProfile struct {
	Capacity   ScaleCapacity `json:"capacity"`
	FixedDate  *TimeWindow   `json:"fixedDate,omitempty"`
	Name       string        `json:"name"`
	Recurrence *Recurrence   `json:"recurrence,omitempty"`
	Rules      []ScaleRule   `json:"rules"`
}

type AutoscaleSetting

type AutoscaleSetting struct {
	Enabled                   *bool                      `json:"enabled,omitempty"`
	Name                      *string                    `json:"name,omitempty"`
	Notifications             *[]AutoscaleNotification   `json:"notifications,omitempty"`
	PredictiveAutoscalePolicy *PredictiveAutoscalePolicy `json:"predictiveAutoscalePolicy,omitempty"`
	Profiles                  []AutoscaleProfile         `json:"profiles"`
	TargetResourceLocation    *string                    `json:"targetResourceLocation,omitempty"`
	TargetResourceUri         *string                    `json:"targetResourceUri,omitempty"`
}

type AutoscaleSettingResource

type AutoscaleSettingResource struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties AutoscaleSetting       `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type AutoscaleSettingResourcePatch

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

type AutoscaleSettingsUpdateOperationResponse

type AutoscaleSettingsUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AutoscaleSettingResource
}

type ComparisonOperationType

type ComparisonOperationType string
const (
	ComparisonOperationTypeEquals             ComparisonOperationType = "Equals"
	ComparisonOperationTypeGreaterThan        ComparisonOperationType = "GreaterThan"
	ComparisonOperationTypeGreaterThanOrEqual ComparisonOperationType = "GreaterThanOrEqual"
	ComparisonOperationTypeLessThan           ComparisonOperationType = "LessThan"
	ComparisonOperationTypeLessThanOrEqual    ComparisonOperationType = "LessThanOrEqual"
	ComparisonOperationTypeNotEquals          ComparisonOperationType = "NotEquals"
)

func (*ComparisonOperationType) UnmarshalJSON added in v0.20240229.1102109

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

type EmailNotification

type EmailNotification struct {
	CustomEmails                       *[]string `json:"customEmails,omitempty"`
	SendToSubscriptionAdministrator    *bool     `json:"sendToSubscriptionAdministrator,omitempty"`
	SendToSubscriptionCoAdministrators *bool     `json:"sendToSubscriptionCoAdministrators,omitempty"`
}

type MetricStatisticType

type MetricStatisticType string
const (
	MetricStatisticTypeAverage MetricStatisticType = "Average"
	MetricStatisticTypeCount   MetricStatisticType = "Count"
	MetricStatisticTypeMax     MetricStatisticType = "Max"
	MetricStatisticTypeMin     MetricStatisticType = "Min"
	MetricStatisticTypeSum     MetricStatisticType = "Sum"
)

func (*MetricStatisticType) UnmarshalJSON added in v0.20240229.1102109

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

type MetricTrigger

type MetricTrigger struct {
	Dimensions             *[]ScaleRuleMetricDimension `json:"dimensions,omitempty"`
	DividePerInstance      *bool                       `json:"dividePerInstance,omitempty"`
	MetricName             string                      `json:"metricName"`
	MetricNamespace        *string                     `json:"metricNamespace,omitempty"`
	MetricResourceLocation *string                     `json:"metricResourceLocation,omitempty"`
	MetricResourceUri      string                      `json:"metricResourceUri"`
	Operator               ComparisonOperationType     `json:"operator"`
	Statistic              MetricStatisticType         `json:"statistic"`
	Threshold              float64                     `json:"threshold"`
	TimeAggregation        TimeAggregationType         `json:"timeAggregation"`
	TimeGrain              string                      `json:"timeGrain"`
	TimeWindow             string                      `json:"timeWindow"`
}

type OperationType

type OperationType string
const (
	OperationTypeScale OperationType = "Scale"
)

func (*OperationType) UnmarshalJSON added in v0.20240229.1102109

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

type PredictiveAutoscalePolicy

type PredictiveAutoscalePolicy struct {
	ScaleLookAheadTime *string                            `json:"scaleLookAheadTime,omitempty"`
	ScaleMode          PredictiveAutoscalePolicyScaleMode `json:"scaleMode"`
}

type PredictiveAutoscalePolicyScaleMode

type PredictiveAutoscalePolicyScaleMode string
const (
	PredictiveAutoscalePolicyScaleModeDisabled     PredictiveAutoscalePolicyScaleMode = "Disabled"
	PredictiveAutoscalePolicyScaleModeEnabled      PredictiveAutoscalePolicyScaleMode = "Enabled"
	PredictiveAutoscalePolicyScaleModeForecastOnly PredictiveAutoscalePolicyScaleMode = "ForecastOnly"
)

func (*PredictiveAutoscalePolicyScaleMode) UnmarshalJSON added in v0.20240229.1102109

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

type Recurrence

type Recurrence struct {
	Frequency RecurrenceFrequency `json:"frequency"`
	Schedule  RecurrentSchedule   `json:"schedule"`
}

type RecurrenceFrequency

type RecurrenceFrequency string
const (
	RecurrenceFrequencyDay    RecurrenceFrequency = "Day"
	RecurrenceFrequencyHour   RecurrenceFrequency = "Hour"
	RecurrenceFrequencyMinute RecurrenceFrequency = "Minute"
	RecurrenceFrequencyMonth  RecurrenceFrequency = "Month"
	RecurrenceFrequencyNone   RecurrenceFrequency = "None"
	RecurrenceFrequencySecond RecurrenceFrequency = "Second"
	RecurrenceFrequencyWeek   RecurrenceFrequency = "Week"
	RecurrenceFrequencyYear   RecurrenceFrequency = "Year"
)

func (*RecurrenceFrequency) UnmarshalJSON added in v0.20240229.1102109

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

type RecurrentSchedule

type RecurrentSchedule struct {
	Days     []string `json:"days"`
	Hours    []int64  `json:"hours"`
	Minutes  []int64  `json:"minutes"`
	TimeZone string   `json:"timeZone"`
}

type ScaleAction

type ScaleAction struct {
	Cooldown  string         `json:"cooldown"`
	Direction ScaleDirection `json:"direction"`
	Type      ScaleType      `json:"type"`
	Value     *string        `json:"value,omitempty"`
}

type ScaleCapacity

type ScaleCapacity struct {
	Default string `json:"default"`
	Maximum string `json:"maximum"`
	Minimum string `json:"minimum"`
}

type ScaleDirection

type ScaleDirection string
const (
	ScaleDirectionDecrease ScaleDirection = "Decrease"
	ScaleDirectionIncrease ScaleDirection = "Increase"
	ScaleDirectionNone     ScaleDirection = "None"
)

func (*ScaleDirection) UnmarshalJSON added in v0.20240229.1102109

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

type ScaleRule

type ScaleRule struct {
	MetricTrigger MetricTrigger `json:"metricTrigger"`
	ScaleAction   ScaleAction   `json:"scaleAction"`
}

type ScaleRuleMetricDimension

type ScaleRuleMetricDimension struct {
	DimensionName string                                `json:"DimensionName"`
	Operator      ScaleRuleMetricDimensionOperationType `json:"Operator"`
	Values        []string                              `json:"Values"`
}

type ScaleRuleMetricDimensionOperationType

type ScaleRuleMetricDimensionOperationType string
const (
	ScaleRuleMetricDimensionOperationTypeEquals    ScaleRuleMetricDimensionOperationType = "Equals"
	ScaleRuleMetricDimensionOperationTypeNotEquals ScaleRuleMetricDimensionOperationType = "NotEquals"
)

func (*ScaleRuleMetricDimensionOperationType) UnmarshalJSON added in v0.20240229.1102109

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

type ScaleType

type ScaleType string
const (
	ScaleTypeChangeCount             ScaleType = "ChangeCount"
	ScaleTypeExactCount              ScaleType = "ExactCount"
	ScaleTypePercentChangeCount      ScaleType = "PercentChangeCount"
	ScaleTypeServiceAllowedNextValue ScaleType = "ServiceAllowedNextValue"
)

func (*ScaleType) UnmarshalJSON added in v0.20240229.1102109

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

type TimeAggregationType

type TimeAggregationType string
const (
	TimeAggregationTypeAverage TimeAggregationType = "Average"
	TimeAggregationTypeCount   TimeAggregationType = "Count"
	TimeAggregationTypeLast    TimeAggregationType = "Last"
	TimeAggregationTypeMaximum TimeAggregationType = "Maximum"
	TimeAggregationTypeMinimum TimeAggregationType = "Minimum"
	TimeAggregationTypeTotal   TimeAggregationType = "Total"
)

func (*TimeAggregationType) UnmarshalJSON added in v0.20240229.1102109

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

type TimeWindow

type TimeWindow struct {
	End      string  `json:"end"`
	Start    string  `json:"start"`
	TimeZone *string `json:"timeZone,omitempty"`
}

func (*TimeWindow) GetEndAsTime

func (o *TimeWindow) GetEndAsTime() (*time.Time, error)

func (*TimeWindow) GetStartAsTime

func (o *TimeWindow) GetStartAsTime() (*time.Time, error)

func (*TimeWindow) SetEndAsTime

func (o *TimeWindow) SetEndAsTime(input time.Time)

func (*TimeWindow) SetStartAsTime

func (o *TimeWindow) SetStartAsTime(input time.Time)

type WebhookNotification

type WebhookNotification struct {
	Properties *map[string]string `json:"properties,omitempty"`
	ServiceUri *string            `json:"serviceUri,omitempty"`
}

Jump to

Keyboard shortcuts

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