azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights Index | Files | Directories

package operationalinsights

import "github.com/Azure/azure-sdk-for-go/services/operationalinsights/v1/operationalinsights"

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

Log Analytics Data Plane Client

Index

Package Files

client.go models.go query.go version.go

Constants

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

func UserAgent Uses

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version Uses

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

type BaseClient Uses

type BaseClient struct {
    autorest.Client
    BaseURI string
}

BaseClient is the base client for Operationalinsights.

func New Uses

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI Uses

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type Column Uses

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 Uses

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 Uses

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 Uses

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

ErrorResponse contains details when the response code indicates an error.

type QueryBody Uses

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 Uses

type QueryClient struct {
    BaseClient
}

QueryClient is the log Analytics Data Plane Client

func NewQueryClient Uses

func NewQueryClient() QueryClient

NewQueryClient creates an instance of the QueryClient client.

func NewQueryClientWithBaseURI Uses

func NewQueryClientWithBaseURI(baseURI string) QueryClient

NewQueryClientWithBaseURI creates an instance of the QueryClient client.

func (QueryClient) Execute Uses

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 Uses

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

ExecutePreparer prepares the Execute request.

func (QueryClient) ExecuteResponder Uses

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 Uses

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 Uses

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 Uses

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 *[][]interface{} `json:"rows,omitempty"`
}

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

Directories

PathSynopsis
operationalinsightsapi

Package operationalinsights imports 7 packages (graph) and is imported by 4 packages. Updated 2019-08-02. Refresh now. Tools for package owners.