README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2018-06-01/waitstatistics
Documentation
The waitstatistics
SDK allows for interaction with the Azure Resource Manager Service postgresql
(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/postgresql/2018-06-01/waitstatistics"
Client Initialization
client := waitstatistics.NewWaitStatisticsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: WaitStatisticsClient.Get
ctx := context.TODO()
id := waitstatistics.NewWaitStatisticID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "waitStatisticsIdValue")
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: WaitStatisticsClient.ListByServer
ctx := context.TODO()
id := waitstatistics.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue")
payload := waitstatistics.WaitStatisticsInput{
// ...
}
// 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 ¶
- func ValidateServerID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateWaitStatisticID(input interface{}, key string) (warnings []string, errors []error)
- type GetOperationResponse
- type ListByServerCompleteResult
- type ListByServerOperationResponse
- type ServerId
- type WaitStatistic
- type WaitStatisticId
- type WaitStatisticOperationPredicate
- type WaitStatisticProperties
- type WaitStatisticsClient
- func (c WaitStatisticsClient) Get(ctx context.Context, id WaitStatisticId) (result GetOperationResponse, err error)
- func (c WaitStatisticsClient) ListByServer(ctx context.Context, id ServerId, input WaitStatisticsInput) (resp ListByServerOperationResponse, err error)
- func (c WaitStatisticsClient) ListByServerComplete(ctx context.Context, id ServerId, input WaitStatisticsInput) (ListByServerCompleteResult, error)
- func (c WaitStatisticsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, input WaitStatisticsInput, ...) (resp ListByServerCompleteResult, err error)
- type WaitStatisticsInput
- type WaitStatisticsInputProperties
- func (o *WaitStatisticsInputProperties) GetObservationEndTimeAsTime() (*time.Time, error)
- func (o *WaitStatisticsInputProperties) GetObservationStartTimeAsTime() (*time.Time, error)
- func (o *WaitStatisticsInputProperties) SetObservationEndTimeAsTime(input time.Time)
- func (o *WaitStatisticsInputProperties) SetObservationStartTimeAsTime(input time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateServerID ¶
ValidateServerID checks that 'input' can be parsed as a Server ID
func ValidateWaitStatisticID ¶
ValidateWaitStatisticID checks that 'input' can be parsed as a Wait Statistic ID
Types ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response Model *WaitStatistic }
type ListByServerCompleteResult ¶
type ListByServerCompleteResult struct {
Items []WaitStatistic
}
type ListByServerOperationResponse ¶
type ListByServerOperationResponse struct { HttpResponse *http.Response Model *[]WaitStatistic // contains filtered or unexported fields }
func (ListByServerOperationResponse) HasMore ¶
func (r ListByServerOperationResponse) HasMore() bool
func (ListByServerOperationResponse) LoadMore ¶
func (r ListByServerOperationResponse) LoadMore(ctx context.Context) (resp ListByServerOperationResponse, err error)
type ServerId ¶
ServerId is a struct representing the Resource ID for a Server
func NewServerID ¶
NewServerID returns a new ServerId struct
func ParseServerID ¶
ParseServerID parses 'input' into a ServerId
func ParseServerIDInsensitively ¶
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) Segments ¶
func (id ServerId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Server ID
type WaitStatistic ¶
type WaitStatistic struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *WaitStatisticProperties `json:"properties,omitempty"` Type *string `json:"type,omitempty"` }
type WaitStatisticId ¶
type WaitStatisticId struct { SubscriptionId string ResourceGroupName string ServerName string WaitStatisticsId string }
WaitStatisticId is a struct representing the Resource ID for a Wait Statistic
func NewWaitStatisticID ¶
func NewWaitStatisticID(subscriptionId string, resourceGroupName string, serverName string, waitStatisticsId string) WaitStatisticId
NewWaitStatisticID returns a new WaitStatisticId struct
func ParseWaitStatisticID ¶
func ParseWaitStatisticID(input string) (*WaitStatisticId, error)
ParseWaitStatisticID parses 'input' into a WaitStatisticId
func ParseWaitStatisticIDInsensitively ¶
func ParseWaitStatisticIDInsensitively(input string) (*WaitStatisticId, error)
ParseWaitStatisticIDInsensitively parses 'input' case-insensitively into a WaitStatisticId note: this method should only be used for API response data and not user input
func (WaitStatisticId) ID ¶
func (id WaitStatisticId) ID() string
ID returns the formatted Wait Statistic ID
func (WaitStatisticId) Segments ¶
func (id WaitStatisticId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Wait Statistic ID
func (WaitStatisticId) String ¶
func (id WaitStatisticId) String() string
String returns a human-readable description of this Wait Statistic ID
type WaitStatisticOperationPredicate ¶
func (WaitStatisticOperationPredicate) Matches ¶
func (p WaitStatisticOperationPredicate) Matches(input WaitStatistic) bool
type WaitStatisticProperties ¶
type WaitStatisticProperties struct { Count *int64 `json:"count,omitempty"` DatabaseName *string `json:"databaseName,omitempty"` EndTime *string `json:"endTime,omitempty"` EventName *string `json:"eventName,omitempty"` EventTypeName *string `json:"eventTypeName,omitempty"` QueryId *int64 `json:"queryId,omitempty"` StartTime *string `json:"startTime,omitempty"` TotalTimeInMs *float64 `json:"totalTimeInMs,omitempty"` UserId *int64 `json:"userId,omitempty"` }
func (*WaitStatisticProperties) GetEndTimeAsTime ¶
func (o *WaitStatisticProperties) GetEndTimeAsTime() (*time.Time, error)
func (*WaitStatisticProperties) GetStartTimeAsTime ¶
func (o *WaitStatisticProperties) GetStartTimeAsTime() (*time.Time, error)
func (*WaitStatisticProperties) SetEndTimeAsTime ¶
func (o *WaitStatisticProperties) SetEndTimeAsTime(input time.Time)
func (*WaitStatisticProperties) SetStartTimeAsTime ¶
func (o *WaitStatisticProperties) SetStartTimeAsTime(input time.Time)
type WaitStatisticsClient ¶
type WaitStatisticsClient struct { Client autorest.Client // contains filtered or unexported fields }
func NewWaitStatisticsClientWithBaseURI ¶
func NewWaitStatisticsClientWithBaseURI(endpoint string) WaitStatisticsClient
func (WaitStatisticsClient) Get ¶
func (c WaitStatisticsClient) Get(ctx context.Context, id WaitStatisticId) (result GetOperationResponse, err error)
Get ...
func (WaitStatisticsClient) ListByServer ¶
func (c WaitStatisticsClient) ListByServer(ctx context.Context, id ServerId, input WaitStatisticsInput) (resp ListByServerOperationResponse, err error)
ListByServer ...
func (WaitStatisticsClient) ListByServerComplete ¶
func (c WaitStatisticsClient) ListByServerComplete(ctx context.Context, id ServerId, input WaitStatisticsInput) (ListByServerCompleteResult, error)
ListByServerComplete retrieves all of the results into a single object
func (WaitStatisticsClient) ListByServerCompleteMatchingPredicate ¶
func (c WaitStatisticsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, input WaitStatisticsInput, predicate WaitStatisticOperationPredicate) (resp ListByServerCompleteResult, err error)
ListByServerCompleteMatchingPredicate retrieves all of the results and then applied the predicate
type WaitStatisticsInput ¶
type WaitStatisticsInput struct {
Properties WaitStatisticsInputProperties `json:"properties"`
}
type WaitStatisticsInputProperties ¶
type WaitStatisticsInputProperties struct { AggregationWindow string `json:"aggregationWindow"` ObservationEndTime string `json:"observationEndTime"` ObservationStartTime string `json:"observationStartTime"` }
func (*WaitStatisticsInputProperties) GetObservationEndTimeAsTime ¶
func (o *WaitStatisticsInputProperties) GetObservationEndTimeAsTime() (*time.Time, error)
func (*WaitStatisticsInputProperties) GetObservationStartTimeAsTime ¶
func (o *WaitStatisticsInputProperties) GetObservationStartTimeAsTime() (*time.Time, error)
func (*WaitStatisticsInputProperties) SetObservationEndTimeAsTime ¶
func (o *WaitStatisticsInputProperties) SetObservationEndTimeAsTime(input time.Time)
func (*WaitStatisticsInputProperties) SetObservationStartTimeAsTime ¶
func (o *WaitStatisticsInputProperties) SetObservationStartTimeAsTime(input time.Time)