Documentation ¶
Overview ¶
Package operationalinsights implements the Azure ARM Operationalinsights service API version v1.
Operational Insights Data Client
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type BaseClient
- func (client BaseClient) Query(ctx context.Context, body QueryBody) (result QueryResults, err error)
- func (client BaseClient) QueryPreparer(ctx context.Context, body QueryBody) (*http.Request, error)
- func (client BaseClient) QueryResponder(resp *http.Response) (result QueryResults, err error)
- func (client BaseClient) QuerySender(req *http.Request) (*http.Response, error)
- type Column
- type ErrorDetail
- type ErrorInfo
- type ErrorResponse
- type QueryBody
- type QueryResults
- type Table
Constants ¶
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 ¶
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 ¶
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 ¶
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.