monitor

package
v43.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package monitor implements the Azure ARM Monitor service API version 2018-09-01-preview.

Monitor Management Client

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Monitor
	DefaultBaseURI = "https://monitoring.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type APIError

type APIError struct {
	// Code - Gets or sets the azure metrics error code
	Code *string `json:"code,omitempty"`
	// Message - Gets or sets the azure metrics error message
	Message *string `json:"message,omitempty"`
}

APIError ...

type APIFailureResponse

type APIFailureResponse struct {
	Error *APIError `json:"error,omitempty"`
}

APIFailureResponse ...

type AzureMetricsBaseData

type AzureMetricsBaseData struct {
	// Metric - Gets or sets the Metric name
	Metric *string `json:"metric,omitempty"`
	// Namespace - Gets or sets the Metric namespace
	Namespace *string `json:"namespace,omitempty"`
	// DimNames - Gets or sets the list of dimension names (optional)
	DimNames *[]string `json:"dimNames,omitempty"`
	// Series - Gets or sets the list of time series data for the metric (one per unique dimension combination)
	Series *[]AzureTimeSeriesData `json:"series,omitempty"`
}

AzureMetricsBaseData ...

type AzureMetricsData

type AzureMetricsData struct {
	BaseData *AzureMetricsBaseData `json:"baseData,omitempty"`
}

AzureMetricsData ...

type AzureMetricsDocument

type AzureMetricsDocument struct {
	// Time - Gets or sets Time property (in ISO 8601 format)
	Time *string           `json:"time,omitempty"`
	Data *AzureMetricsData `json:"data,omitempty"`
}

AzureMetricsDocument ...

type AzureMetricsResult

type AzureMetricsResult struct {
	autorest.Response `json:"-"`
	// StatusCode - Http status code response
	StatusCode         *int32              `json:"statusCode,omitempty"`
	APIFailureResponse *APIFailureResponse `json:"apiFailureResponse,omitempty"`
}

AzureMetricsResult ...

type AzureTimeSeriesData

type AzureTimeSeriesData struct {
	// DimValues - Gets or sets dimension values
	DimValues *[]string `json:"dimValues,omitempty"`
	// Min - Gets or sets Min value
	Min *float64 `json:"min,omitempty"`
	// Max - Gets or sets Max value
	Max *float64 `json:"max,omitempty"`
	// Sum - Gets or sets Sum value
	Sum *float64 `json:"sum,omitempty"`
	// Count - Gets or sets Count value
	Count *int32 `json:"count,omitempty"`
}

AzureTimeSeriesData ...

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI string
}

BaseClient is the base client for Monitor.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type MetricsClient

type MetricsClient struct {
	BaseClient
}

MetricsClient is the monitor Management Client

func NewMetricsClient

func NewMetricsClient() MetricsClient

NewMetricsClient creates an instance of the MetricsClient client.

func NewMetricsClientWithBaseURI

func NewMetricsClientWithBaseURI(baseURI string) MetricsClient

NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (MetricsClient) Create

func (client MetricsClient) Create(ctx context.Context, contentType string, contentLength int32, subscriptionID string, resourceGroupName string, resourceProvider string, resourceTypeName string, resourceName string, body AzureMetricsDocument) (result AzureMetricsResult, err error)

Create **Post the metric values for a resource**. Parameters: contentType - supports application/json and application/x-ndjson contentLength - content length of the payload subscriptionID - the azure subscription id resourceGroupName - the ARM resource group name resourceProvider - the ARM resource provider name resourceTypeName - the ARM resource type name resourceName - the ARM resource name body - the Azure metrics document json payload

func (MetricsClient) CreatePreparer

func (client MetricsClient) CreatePreparer(ctx context.Context, contentType string, contentLength int32, subscriptionID string, resourceGroupName string, resourceProvider string, resourceTypeName string, resourceName string, body AzureMetricsDocument) (*http.Request, error)

CreatePreparer prepares the Create request.

func (MetricsClient) CreateResponder

func (client MetricsClient) CreateResponder(resp *http.Response) (result AzureMetricsResult, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (MetricsClient) CreateSender

func (client MetricsClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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