metrics

package
v0.20230727.1080023 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := metrics.NewMetricsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MetricsClient.PredictiveMetricGet

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

read, err := client.PredictiveMetricGet(ctx, id, metrics.DefaultPredictiveMetricGetOperationOptions())
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 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) 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 MetricsClient

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

func NewMetricsClientWithBaseURI

func NewMetricsClientWithBaseURI(endpoint string) MetricsClient

func (MetricsClient) PredictiveMetricGet

PredictiveMetricGet ...

type PredictiveMetricGetOperationOptions

type PredictiveMetricGetOperationOptions struct {
	Aggregation     *string
	Interval        *string
	MetricName      *string
	MetricNamespace *string
	Timespan        *string
}

func DefaultPredictiveMetricGetOperationOptions

func DefaultPredictiveMetricGetOperationOptions() PredictiveMetricGetOperationOptions

type PredictiveMetricGetOperationResponse

type PredictiveMetricGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *PredictiveResponse
}

type PredictiveResponse

type PredictiveResponse struct {
	Data             *[]PredictiveValue `json:"data,omitempty"`
	Interval         *string            `json:"interval,omitempty"`
	MetricName       *string            `json:"metricName,omitempty"`
	TargetResourceId *string            `json:"targetResourceId,omitempty"`
	Timespan         *string            `json:"timespan,omitempty"`
}

type PredictiveValue

type PredictiveValue struct {
	TimeStamp string  `json:"timeStamp"`
	Value     float64 `json:"value"`
}

func (*PredictiveValue) GetTimeStampAsTime

func (o *PredictiveValue) GetTimeStampAsTime() (*time.Time, error)

func (*PredictiveValue) SetTimeStampAsTime

func (o *PredictiveValue) SetTimeStampAsTime(input time.Time)

Jump to

Keyboard shortcuts

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