operationalinsights

package
v17.2.0+incompatible Latest Latest
Warning

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

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

Documentation

Overview

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

Operational Insights Data 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
	WorkspaceID string
}

BaseClient is the base client for Operationalinsights.

func New

func New(workspaceID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, workspaceID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

func (BaseClient) Query

func (client BaseClient) Query(ctx context.Context, body QueryBody) (result QueryResults, err error)

Query executes an Analytics query for data. [Here](/documentation/2-Using-the-API/Query) is an example for using POST with an Analytics query. Parameters: body - the Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)

func (BaseClient) QueryPreparer

func (client BaseClient) QueryPreparer(ctx context.Context, body QueryBody) (*http.Request, error)

QueryPreparer prepares the Query request.

func (BaseClient) QueryResponder

func (client BaseClient) QueryResponder(resp *http.Response) (result QueryResults, err error)

QueryResponder handles the response to the Query request. The method always closes the http.Response Body.

func (BaseClient) QuerySender

func (client BaseClient) QuerySender(req *http.Request) (*http.Response, error)

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

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 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