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
- type Column
- type ErrorDetail
- type ErrorInfo
- type ErrorResponse
- type QueryBody
- type QueryClient
- func (client QueryClient) Get(ctx context.Context, query string, timespan *string) (result QueryResults, err error)
- func (client QueryClient) GetPreparer(ctx context.Context, query string, timespan *string) (*http.Request, error)
- func (client QueryClient) GetResponder(resp *http.Response) (result QueryResults, err error)
- func (client QueryClient) GetSender(req *http.Request) (*http.Response, error)
- func (client QueryClient) Post(ctx context.Context, body QueryBody) (result QueryResults, err error)
- func (client QueryClient) PostPreparer(ctx context.Context, body QueryBody) (*http.Request, error)
- func (client QueryClient) PostResponder(resp *http.Response) (result QueryResults, err error)
- func (client QueryClient) PostSender(req *http.Request) (*http.Response, error)
- 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.
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 operational Insights Data Client
func NewQueryClient ¶
func NewQueryClient(workspaceID string) QueryClient
NewQueryClient creates an instance of the QueryClient client.
func NewQueryClientWithBaseURI ¶
func NewQueryClientWithBaseURI(baseURI string, workspaceID string) QueryClient
NewQueryClientWithBaseURI creates an instance of the QueryClient client.
func (QueryClient) Get ¶
func (client QueryClient) Get(ctx context.Context, query string, timespan *string) (result QueryResults, err error)
Get executes an Analytics query for data Parameters: query - the Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) 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.
func (QueryClient) GetPreparer ¶
func (client QueryClient) GetPreparer(ctx context.Context, query string, timespan *string) (*http.Request, error)
GetPreparer prepares the Get request.
func (QueryClient) GetResponder ¶
func (client QueryClient) GetResponder(resp *http.Response) (result QueryResults, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (QueryClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (QueryClient) Post ¶
func (client QueryClient) Post(ctx context.Context, body QueryBody) (result QueryResults, err error)
Post 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 (QueryClient) PostPreparer ¶
PostPreparer prepares the Post request.
func (QueryClient) PostResponder ¶
func (client QueryClient) PostResponder(resp *http.Response) (result QueryResults, err error)
PostResponder handles the response to the Post request. The method always closes the http.Response Body.
func (QueryClient) PostSender ¶
PostSender sends the Post 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.