operationalinsights

package
v21.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package operationalinsights implements the Azure ARM Operationalinsights service API version v1.

Log Analytics Data Plane Client

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Operationalinsights
	DefaultBaseURI = "https://api.loganalytics.io/v1"
)

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 BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI string
}

BaseClient is the base client for Operationalinsights.

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.

type Column

type Column struct {
	// Name - The name of this column.
	Name *string `json:"name,omitempty"`
	// Type - The data type of this column.
	Type *string `json:"type,omitempty"`
}

Column a column in a table.

type ErrorDetail

type ErrorDetail struct {
	// Code - The error's code.
	Code *string `json:"code,omitempty"`
	// Message - A human readable error message.
	Message *string `json:"message,omitempty"`
	// Target - Indicates which property in the request is responsible for the error.
	Target *string `json:"target,omitempty"`
	// Value - Indicates which value in 'target' is responsible for the error.
	Value *string `json:"value,omitempty"`
	// Resources - Indicates resources which were responsible for the error.
	Resources            *[]string   `json:"resources,omitempty"`
	AdditionalProperties interface{} `json:"additionalProperties,omitempty"`
}

ErrorDetail ...

type ErrorInfo

type ErrorInfo struct {
	// Code - A machine readable error code.
	Code *string `json:"code,omitempty"`
	// Message - A human readable error message.
	Message *string `json:"message,omitempty"`
	// Details - error details.
	Details *[]ErrorDetail `json:"details,omitempty"`
	// Innererror - Inner error details if they exist.
	Innererror           *ErrorInfo  `json:"innererror,omitempty"`
	AdditionalProperties interface{} `json:"additionalProperties,omitempty"`
}

ErrorInfo ...

type ErrorResponse

type ErrorResponse struct {
	// Error - The error details.
	Error *ErrorInfo `json:"error,omitempty"`
}

ErrorResponse contains details when the response code indicates an error.

type QueryBody

type QueryBody struct {
	// Query - The query to execute.
	Query *string `json:"query,omitempty"`
	// Timespan - Optional. The timespan over which to query data. This is an ISO8601 time period value.  This timespan is applied in addition to any that are specified in the query expression.
	Timespan *string `json:"timespan,omitempty"`
	// Workspaces - A list of workspaces that are included in the query.
	Workspaces *[]string `json:"workspaces,omitempty"`
}

QueryBody the Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)

type QueryClient

type QueryClient struct {
	BaseClient
}

QueryClient is the log Analytics Data Plane Client

func NewQueryClient

func NewQueryClient() QueryClient

NewQueryClient creates an instance of the QueryClient client.

func NewQueryClientWithBaseURI

func NewQueryClientWithBaseURI(baseURI string) QueryClient

NewQueryClientWithBaseURI creates an instance of the QueryClient client.

func (QueryClient) Execute

func (client QueryClient) Execute(ctx context.Context, workspaceID string, body QueryBody) (result QueryResults, err error)

Execute executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. Parameters: workspaceID - ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. body - the Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)

func (QueryClient) ExecutePreparer

func (client QueryClient) ExecutePreparer(ctx context.Context, workspaceID string, body QueryBody) (*http.Request, error)

ExecutePreparer prepares the Execute request.

func (QueryClient) ExecuteResponder

func (client QueryClient) ExecuteResponder(resp *http.Response) (result QueryResults, err error)

ExecuteResponder handles the response to the Execute request. The method always closes the http.Response Body.

func (QueryClient) ExecuteSender

func (client QueryClient) ExecuteSender(req *http.Request) (*http.Response, error)

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

type QueryResults

type QueryResults struct {
	autorest.Response `json:"-"`
	// Tables - The list of tables, columns and rows.
	Tables *[]Table `json:"tables,omitempty"`
}

QueryResults contains the tables, columns & rows resulting from a query.

type Table

type Table struct {
	// Name - The name of the table.
	Name *string `json:"name,omitempty"`
	// Columns - The list of columns in this table.
	Columns *[]Column `json:"columns,omitempty"`
	// Rows - The resulting rows from this query.
	Rows *[][]string `json:"rows,omitempty"`
}

Table contains the columns and rows for one table in a query response.

Jump to

Keyboard shortcuts

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