metricdefinitions

package
v0.20240524.1074426 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/metricdefinitions Documentation

The metricdefinitions SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2016-03-01).

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/insights/2016-03-01/metricdefinitions"

Client Initialization

client := metricdefinitions.NewMetricDefinitionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MetricDefinitionsClient.List

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.List(ctx, id, metricdefinitions.DefaultListOperationOptions())
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 PossibleValuesForAggregationType

func PossibleValuesForAggregationType() []string

func PossibleValuesForUnit

func PossibleValuesForUnit() []string

Types

type AggregationType

type AggregationType string
const (
	AggregationTypeAverage AggregationType = "Average"
	AggregationTypeCount   AggregationType = "Count"
	AggregationTypeMaximum AggregationType = "Maximum"
	AggregationTypeMinimum AggregationType = "Minimum"
	AggregationTypeNone    AggregationType = "None"
	AggregationTypeTotal   AggregationType = "Total"
)

func (*AggregationType) UnmarshalJSON added in v0.20240229.1102109

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20240229.1102109

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20240229.1102109

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20240229.1102109

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetricDefinitionCollection
}

type LocalizableString

type LocalizableString struct {
	LocalizedValue *string `json:"localizedValue,omitempty"`
	Value          string  `json:"value"`
}

type MetricAvailability

type MetricAvailability struct {
	Retention *string `json:"retention,omitempty"`
	TimeGrain *string `json:"timeGrain,omitempty"`
}

type MetricDefinition

type MetricDefinition struct {
	Id                     *string               `json:"id,omitempty"`
	MetricAvailabilities   *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
	Name                   *LocalizableString    `json:"name,omitempty"`
	PrimaryAggregationType *AggregationType      `json:"primaryAggregationType,omitempty"`
	ResourceId             *string               `json:"resourceId,omitempty"`
	Unit                   *Unit                 `json:"unit,omitempty"`
}

type MetricDefinitionCollection

type MetricDefinitionCollection struct {
	Value []MetricDefinition `json:"value"`
}

type MetricDefinitionsClient

type MetricDefinitionsClient struct {
	Client *resourcemanager.Client
}

func NewMetricDefinitionsClientWithBaseURI

func NewMetricDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricDefinitionsClient, error)

func (MetricDefinitionsClient) List

List ...

type Unit

type Unit string
const (
	UnitBitsPerSecond  Unit = "BitsPerSecond"
	UnitByteSeconds    Unit = "ByteSeconds"
	UnitBytes          Unit = "Bytes"
	UnitBytesPerSecond Unit = "BytesPerSecond"
	UnitCores          Unit = "Cores"
	UnitCount          Unit = "Count"
	UnitCountPerSecond Unit = "CountPerSecond"
	UnitMilliCores     Unit = "MilliCores"
	UnitMilliSeconds   Unit = "MilliSeconds"
	UnitNanoCores      Unit = "NanoCores"
	UnitPercent        Unit = "Percent"
	UnitSeconds        Unit = "Seconds"
	UnitUnspecified    Unit = "Unspecified"
)

func (*Unit) UnmarshalJSON added in v0.20240229.1102109

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

Jump to

Keyboard shortcuts

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