topquerystatistics

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/topquerystatistics Documentation

The topquerystatistics SDK allows for interaction with the Azure Resource Manager Service mariadb (API Version 2018-06-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-sdk/resource-manager/mariadb/2018-06-01/topquerystatistics"

Client Initialization

client := topquerystatistics.NewTopQueryStatisticsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TopQueryStatisticsClient.Get

ctx := context.TODO()
id := topquerystatistics.NewTopQueryStatisticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "queryStatisticIdValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TopQueryStatisticsClient.ListByServer

ctx := context.TODO()
id := topquerystatistics.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue")

payload := topquerystatistics.TopQueryStatisticsInput{
	// ...
}


// alternatively `client.ListByServer(ctx, id, payload)` can be used to do batched pagination
items, err := client.ListByServerComplete(ctx, id, payload)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateServerID

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

ValidateServerID checks that 'input' can be parsed as a Server ID

func ValidateTopQueryStatisticID

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

ValidateTopQueryStatisticID checks that 'input' can be parsed as a Top Query Statistic ID

Types

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *QueryStatistic
}

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []QueryStatistic
}

type ListByServerOperationResponse

type ListByServerOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]QueryStatistic
	// contains filtered or unexported fields
}

func (ListByServerOperationResponse) HasMore

func (r ListByServerOperationResponse) HasMore() bool

func (ListByServerOperationResponse) LoadMore

type QueryStatistic

type QueryStatistic struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *QueryStatisticProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type QueryStatisticOperationPredicate

type QueryStatisticOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (QueryStatisticOperationPredicate) Matches

type QueryStatisticProperties

type QueryStatisticProperties struct {
	AggregationFunction *string   `json:"aggregationFunction,omitempty"`
	DatabaseNames       *[]string `json:"databaseNames,omitempty"`
	EndTime             *string   `json:"endTime,omitempty"`
	MetricDisplayName   *string   `json:"metricDisplayName,omitempty"`
	MetricName          *string   `json:"metricName,omitempty"`
	MetricValue         *float64  `json:"metricValue,omitempty"`
	MetricValueUnit     *string   `json:"metricValueUnit,omitempty"`
	QueryExecutionCount *int64    `json:"queryExecutionCount,omitempty"`
	QueryId             *string   `json:"queryId,omitempty"`
	StartTime           *string   `json:"startTime,omitempty"`
}

func (*QueryStatisticProperties) GetEndTimeAsTime

func (o *QueryStatisticProperties) GetEndTimeAsTime() (*time.Time, error)

func (*QueryStatisticProperties) GetStartTimeAsTime

func (o *QueryStatisticProperties) GetStartTimeAsTime() (*time.Time, error)

func (*QueryStatisticProperties) SetEndTimeAsTime

func (o *QueryStatisticProperties) SetEndTimeAsTime(input time.Time)

func (*QueryStatisticProperties) SetStartTimeAsTime

func (o *QueryStatisticProperties) SetStartTimeAsTime(input time.Time)

type ServerId

type ServerId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
}

ServerId is a struct representing the Resource ID for a Server

func NewServerID

func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId

NewServerID returns a new ServerId struct

func ParseServerID

func ParseServerID(input string) (*ServerId, error)

ParseServerID parses 'input' into a ServerId

func ParseServerIDInsensitively

func ParseServerIDInsensitively(input string) (*ServerId, error)

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

func (ServerId) ID

func (id ServerId) ID() string

ID returns the formatted Server ID

func (ServerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Server ID

func (ServerId) String

func (id ServerId) String() string

String returns a human-readable description of this Server ID

type TopQueryStatisticId

type TopQueryStatisticId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	QueryStatisticId  string
}

TopQueryStatisticId is a struct representing the Resource ID for a Top Query Statistic

func NewTopQueryStatisticID

func NewTopQueryStatisticID(subscriptionId string, resourceGroupName string, serverName string, queryStatisticId string) TopQueryStatisticId

NewTopQueryStatisticID returns a new TopQueryStatisticId struct

func ParseTopQueryStatisticID

func ParseTopQueryStatisticID(input string) (*TopQueryStatisticId, error)

ParseTopQueryStatisticID parses 'input' into a TopQueryStatisticId

func ParseTopQueryStatisticIDInsensitively

func ParseTopQueryStatisticIDInsensitively(input string) (*TopQueryStatisticId, error)

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

func (TopQueryStatisticId) ID

func (id TopQueryStatisticId) ID() string

ID returns the formatted Top Query Statistic ID

func (TopQueryStatisticId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Top Query Statistic ID

func (TopQueryStatisticId) String

func (id TopQueryStatisticId) String() string

String returns a human-readable description of this Top Query Statistic ID

type TopQueryStatisticsClient

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

func NewTopQueryStatisticsClientWithBaseURI

func NewTopQueryStatisticsClientWithBaseURI(endpoint string) TopQueryStatisticsClient

func (TopQueryStatisticsClient) Get

Get ...

func (TopQueryStatisticsClient) ListByServer

ListByServer ...

func (TopQueryStatisticsClient) ListByServerComplete

ListByServerComplete retrieves all of the results into a single object

func (TopQueryStatisticsClient) ListByServerCompleteMatchingPredicate

func (c TopQueryStatisticsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, input TopQueryStatisticsInput, predicate QueryStatisticOperationPredicate) (resp ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type TopQueryStatisticsInput

type TopQueryStatisticsInput struct {
	Properties TopQueryStatisticsInputProperties `json:"properties"`
}

type TopQueryStatisticsInputProperties

type TopQueryStatisticsInputProperties struct {
	AggregationFunction  string `json:"aggregationFunction"`
	AggregationWindow    string `json:"aggregationWindow"`
	NumberOfTopQueries   int64  `json:"numberOfTopQueries"`
	ObservationEndTime   string `json:"observationEndTime"`
	ObservationStartTime string `json:"observationStartTime"`
	ObservedMetric       string `json:"observedMetric"`
}

func (*TopQueryStatisticsInputProperties) GetObservationEndTimeAsTime

func (o *TopQueryStatisticsInputProperties) GetObservationEndTimeAsTime() (*time.Time, error)

func (*TopQueryStatisticsInputProperties) GetObservationStartTimeAsTime

func (o *TopQueryStatisticsInputProperties) GetObservationStartTimeAsTime() (*time.Time, error)

func (*TopQueryStatisticsInputProperties) SetObservationEndTimeAsTime

func (o *TopQueryStatisticsInputProperties) SetObservationEndTimeAsTime(input time.Time)

func (*TopQueryStatisticsInputProperties) SetObservationStartTimeAsTime

func (o *TopQueryStatisticsInputProperties) SetObservationStartTimeAsTime(input time.Time)

Jump to

Keyboard shortcuts

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