savedsearches

package
v0.20220809.1081932 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MPL-2.0 Imports: 7 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches Documentation

The savedsearches SDK allows for interaction with the Azure Resource Manager Service operationalinsights (API Version 2020-08-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches"

Client Initialization

client := savedsearches.NewSavedSearchesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SavedSearchesClient.CreateOrUpdate

ctx := context.TODO()
id := savedsearches.NewSavedSearcheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "savedSearchIdValue")

payload := savedsearches.SavedSearch{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SavedSearchesClient.Delete

ctx := context.TODO()
id := savedsearches.NewSavedSearcheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "savedSearchIdValue")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SavedSearchesClient.Get

ctx := context.TODO()
id := savedsearches.NewSavedSearcheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "savedSearchIdValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SavedSearchesClient.ListByWorkspace

ctx := context.TODO()
id := savedsearches.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")

read, err := client.ListByWorkspace(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSavedSearcheID

func ValidateSavedSearcheID(input interface{}, key string) (warnings []string, errors []error)

ValidateSavedSearcheID checks that 'input' can be parsed as a Saved Searche ID

func ValidateWorkspaceID

func ValidateWorkspaceID(input interface{}, key string) (warnings []string, errors []error)

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *SavedSearch
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *SavedSearch
}

type ListByWorkspaceOperationResponse

type ListByWorkspaceOperationResponse struct {
	HttpResponse *http.Response
	Model        *SavedSearchesListResult
}

type SavedSearch

type SavedSearch struct {
	Etag       *string               `json:"etag,omitempty"`
	Id         *string               `json:"id,omitempty"`
	Name       *string               `json:"name,omitempty"`
	Properties SavedSearchProperties `json:"properties"`
	Type       *string               `json:"type,omitempty"`
}

type SavedSearchProperties

type SavedSearchProperties struct {
	Category           string  `json:"category"`
	DisplayName        string  `json:"displayName"`
	FunctionAlias      *string `json:"functionAlias,omitempty"`
	FunctionParameters *string `json:"functionParameters,omitempty"`
	Query              string  `json:"query"`
	Tags               *[]Tag  `json:"tags,omitempty"`
	Version            *int64  `json:"version,omitempty"`
}

type SavedSearcheId

type SavedSearcheId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	SavedSearchId     string
}

SavedSearcheId is a struct representing the Resource ID for a Saved Searche

func NewSavedSearcheID

func NewSavedSearcheID(subscriptionId string, resourceGroupName string, workspaceName string, savedSearchId string) SavedSearcheId

NewSavedSearcheID returns a new SavedSearcheId struct

func ParseSavedSearcheID

func ParseSavedSearcheID(input string) (*SavedSearcheId, error)

ParseSavedSearcheID parses 'input' into a SavedSearcheId

func ParseSavedSearcheIDInsensitively

func ParseSavedSearcheIDInsensitively(input string) (*SavedSearcheId, error)

ParseSavedSearcheIDInsensitively parses 'input' case-insensitively into a SavedSearcheId note: this method should only be used for API response data and not user input

func (SavedSearcheId) ID

func (id SavedSearcheId) ID() string

ID returns the formatted Saved Searche ID

func (SavedSearcheId) Segments

func (id SavedSearcheId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Saved Searche ID

func (SavedSearcheId) String

func (id SavedSearcheId) String() string

String returns a human-readable description of this Saved Searche ID

type SavedSearchesClient

type SavedSearchesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewSavedSearchesClientWithBaseURI

func NewSavedSearchesClientWithBaseURI(endpoint string) SavedSearchesClient

func (SavedSearchesClient) CreateOrUpdate

CreateOrUpdate ...

func (SavedSearchesClient) Delete

Delete ...

func (SavedSearchesClient) Get

Get ...

func (SavedSearchesClient) ListByWorkspace

func (c SavedSearchesClient) ListByWorkspace(ctx context.Context, id WorkspaceId) (result ListByWorkspaceOperationResponse, err error)

ListByWorkspace ...

type SavedSearchesListResult

type SavedSearchesListResult struct {
	Value *[]SavedSearch `json:"value,omitempty"`
}

type Tag

type Tag struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

ParseWorkspaceIDInsensitively parses 'input' case-insensitively into a WorkspaceId note: this method should only be used for API response data and not user input

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

func (id WorkspaceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Workspace ID

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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