metricdefinitions

package
v0.20240419.1132837 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2024-02-01/metricdefinitions Documentation

The metricdefinitions SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2024-02-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/2024-02-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
}

Example Usage: MetricDefinitionsClient.ListAtSubscriptionScope

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

read, err := client.ListAtSubscriptionScope(ctx, id, metricdefinitions.DefaultListAtSubscriptionScopeOperationOptions())
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 PossibleValuesForMetricAggregationType

func PossibleValuesForMetricAggregationType() []string

func PossibleValuesForMetricClass

func PossibleValuesForMetricClass() []string

func PossibleValuesForMetricUnit

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

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

type ListAtSubscriptionScopeOperationOptions

type ListAtSubscriptionScopeOperationOptions struct {
	Metricnamespace *string
	Region          *string
}

func DefaultListAtSubscriptionScopeOperationOptions

func DefaultListAtSubscriptionScopeOperationOptions() ListAtSubscriptionScopeOperationOptions

func (ListAtSubscriptionScopeOperationOptions) ToHeaders

func (ListAtSubscriptionScopeOperationOptions) ToOData

func (ListAtSubscriptionScopeOperationOptions) ToQuery

type ListAtSubscriptionScopeOperationResponse

type ListAtSubscriptionScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SubscriptionScopeMetricDefinitionCollection
}

type ListOperationOptions

type ListOperationOptions struct {
	Metricnamespace *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

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 MetricAggregationType

type MetricAggregationType string
const (
	MetricAggregationTypeAverage MetricAggregationType = "Average"
	MetricAggregationTypeCount   MetricAggregationType = "Count"
	MetricAggregationTypeMaximum MetricAggregationType = "Maximum"
	MetricAggregationTypeMinimum MetricAggregationType = "Minimum"
	MetricAggregationTypeNone    MetricAggregationType = "None"
	MetricAggregationTypeTotal   MetricAggregationType = "Total"
)

func (*MetricAggregationType) UnmarshalJSON

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

type MetricAvailability

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

type MetricClass

type MetricClass string
const (
	MetricClassAvailability MetricClass = "Availability"
	MetricClassErrors       MetricClass = "Errors"
	MetricClassLatency      MetricClass = "Latency"
	MetricClassSaturation   MetricClass = "Saturation"
	MetricClassTransactions MetricClass = "Transactions"
)

func (*MetricClass) UnmarshalJSON

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

type MetricDefinition

type MetricDefinition struct {
	Category                  *string               `json:"category,omitempty"`
	Dimensions                *[]LocalizableString  `json:"dimensions,omitempty"`
	DisplayDescription        *string               `json:"displayDescription,omitempty"`
	Id                        *string               `json:"id,omitempty"`
	IsDimensionRequired       *bool                 `json:"isDimensionRequired,omitempty"`
	MetricAvailabilities      *[]MetricAvailability `json:"metricAvailabilities,omitempty"`
	MetricClass               *MetricClass          `json:"metricClass,omitempty"`
	Name                      *LocalizableString    `json:"name,omitempty"`
	Namespace                 *string               `json:"namespace,omitempty"`
	PrimaryAggregationType    *AggregationType      `json:"primaryAggregationType,omitempty"`
	ResourceId                *string               `json:"resourceId,omitempty"`
	SupportedAggregationTypes *[]AggregationType    `json:"supportedAggregationTypes,omitempty"`
	Unit                      *MetricUnit           `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 ...

func (MetricDefinitionsClient) ListAtSubscriptionScope

ListAtSubscriptionScope ...

type MetricUnit

type MetricUnit string
const (
	MetricUnitBitsPerSecond  MetricUnit = "BitsPerSecond"
	MetricUnitByteSeconds    MetricUnit = "ByteSeconds"
	MetricUnitBytes          MetricUnit = "Bytes"
	MetricUnitBytesPerSecond MetricUnit = "BytesPerSecond"
	MetricUnitCores          MetricUnit = "Cores"
	MetricUnitCount          MetricUnit = "Count"
	MetricUnitCountPerSecond MetricUnit = "CountPerSecond"
	MetricUnitMilliCores     MetricUnit = "MilliCores"
	MetricUnitMilliSeconds   MetricUnit = "MilliSeconds"
	MetricUnitNanoCores      MetricUnit = "NanoCores"
	MetricUnitPercent        MetricUnit = "Percent"
	MetricUnitSeconds        MetricUnit = "Seconds"
	MetricUnitUnspecified    MetricUnit = "Unspecified"
)

func (*MetricUnit) UnmarshalJSON

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

type SubscriptionScopeMetricDefinition

type SubscriptionScopeMetricDefinition struct {
	Category                  *string                  `json:"category,omitempty"`
	Dimensions                *[]LocalizableString     `json:"dimensions,omitempty"`
	DisplayDescription        *string                  `json:"displayDescription,omitempty"`
	Id                        *string                  `json:"id,omitempty"`
	IsDimensionRequired       *bool                    `json:"isDimensionRequired,omitempty"`
	MetricAvailabilities      *[]MetricAvailability    `json:"metricAvailabilities,omitempty"`
	MetricClass               *MetricClass             `json:"metricClass,omitempty"`
	Name                      *LocalizableString       `json:"name,omitempty"`
	Namespace                 *string                  `json:"namespace,omitempty"`
	PrimaryAggregationType    *MetricAggregationType   `json:"primaryAggregationType,omitempty"`
	ResourceId                *string                  `json:"resourceId,omitempty"`
	SupportedAggregationTypes *[]MetricAggregationType `json:"supportedAggregationTypes,omitempty"`
	Unit                      *MetricUnit              `json:"unit,omitempty"`
}

type SubscriptionScopeMetricDefinitionCollection

type SubscriptionScopeMetricDefinitionCollection struct {
	Value []SubscriptionScopeMetricDefinition `json:"value"`
}

Jump to

Keyboard shortcuts

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